# Tag Info

25

I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the ...

22

I am a big believer in do-it-yourself (DIY) backtesting and data analysis, that is, obtaining your own data and writing your own code. I use my own simple Python scripts to process, test, analyze, and backtest, starting with text-input data files (either OHLC bars or tick data). The reason for DIY: in order to have an effective backtest, analysis, etc., ...

21

As mentioned elsewhere on this site, Lo, Mamaysky, and Wang (2000) do exactly what you're talking about, namely algorithmic detection of head and shoulders patterns. Their definition: Head-and-shoulders (HS) and inverted head-and-shoulders (IHS) patterns are characterized by a sequence of five consecutive local extrema $E_1,...,E_5$ such that  HS ...

19

I think the biggest problem that genetic algorithms have are overfitting, data snooping bias and that they are black boxes (not so much like Neural Networks but still - it depends on the way they are implemented). I think they are not used very much. I guess there are a few hedge funds out there that use it but all in all they were hyped and then busted. ...

15

I've applied GA to all sorts of things. I had some success in the deterministic world where a pattern actually existed and I knew that some physical structure existed (seismic analysis, vibration analysis, inventory calcs, etc). After I found a GA model that behaved, the real work started....figuring out why it behaved. I also generated a lot of GA ...

14

There are tons of languages used in this field. As for Java-based trading platforms, Marketcetera is popular with customers. To justify switching languages, you'd need to show that there is a bottleneck preventing your team from collecting more P&L. Have you run a profiler and compared the results with tcpdump? You must show that your existing platform ...

12

I would recommend that you read "Evidence-Based Technical Analysis" by David Aronson. Firstly, I am mentioning it because it is a highly worthwhile book. Secondly, on pp151--161 he attempts to "objectify subjective TA", using the head-and-shoulders pattern as an example.

12

Some of us see this as a data-driven, empirical problem. And for Programming with Data, you could do a lot worse than picking R which was made for the task. The CRAN Task View on Finance lists a number of relevant packages. For trading strategies in particular, the quantstrat and blotter packages --which are both still on R-Forge in the TradeAnalytics ...

12

Oracle hosted a Trading Applications Developer Workshop in New York on March 15th, 2011. The slides from each of the presentations are here. One of them covers java for Trading Applications, and it seemed to me that the biggest issue raised by the audience was garbage collection. The presentation talks about some configuration parameters that can limit ...

11

There's a lot of people here talking about how GAs are empirical, don't have theoretical foundations, are black-boxes, and the like. I beg to differ! There's a whole branch of economics devoted to looking at markets in terms of evolutionary metaphors: Evolutionary Economics! I highly recommend the Dopfer book, The Evolutionary Foundations of Economics, ...

10

In a typical HFT scenario (process incoming UDP quotes and send TCP order entry responses) well written Java can compete with C++ for pure speed. If you need more speed, look to improve the following: Your code (setup a good benchmark and then profile and tune) Your networking environment (low-latency switches, DMA NICs) Your architecture (are you doing ...

9

I have these posts favorited from stackoverflow. They might help you. High Frequency Trading What programming language(s) is algorithmic trading software written in? Why does a derivative trading position always require C++ knowledge? Jane Street Capital, a high-frequency market making firm, uses OCaml. Here are videos from the head programmer where he ...

9

Assuming you avoid data-snooping bias and all the potential pitfalls of using the past to predict the future, trusting genetic algorithms to find the "right" solution pretty much boils down to the same bet you make when you actively manage a portfolio, whether quantitatively or discretionary. If you believe in market efficiency then increasing your ...

9

For years, I performed this brute-force search daily on my universe of tradable stocks and futures. It is a waste of time. If your computer discovers that hog futures and MSFT are cointegrated, for example, do you really care? I would never trade that pair. There is no economic connection between hogs and Microsoft, so I must assume that the reported, small ...

8

I develop strategies for a lot of these different platforms and the one that I feel offers the most is NinjaTrader. It uses C# which is a bit slower than MetaTrader, which if I remember correctly uses a variant of C++, in fact in MT5 there should be almost no difference. However, it makes up for the slowness in spades with the freedom it allows you. Not only ...

8

Theoretically, the answer to the question is yes, a correlation matrix for potential pairs trades can be computed in $O\left((n^2t)^{(\omega+\epsilon)/3}\right)$ time, for any $\epsilon > 0$, where $\omega < 2.38$ is the so-called exponent of matrix multiplication. However, these algorithms have a reputation for having a very large constant factor ...

7

Measuring expected shortfall (also known as conditional value-at-risk) answers the simpler question of "what is my average expected loss at the i-th quantile?" given the empirical distribution of returns. A variation is value-at-risk which measures the loss at the i-th quantile. Arguably you could leave at this this and you have your answer. You probably ...

7

You can find an exact algorithm with a step-by-step explanation here: https://www.dropbox.com/s/t4fq067kzx26mhw/project_paper.pdf As you can see from the URL it is an archived document because the original site is unfortunately long gone and the tool referenced in the paper with it :-( But it should be helpful anyway to understand what is going on. Notice ...

6

The most basic strategy is beta-based quantiles. That is to say, you first control for losses on your individual stock versus overall market performance. (Your trading strategy may or may not wish to hedge away the market factor using, say, SPX futures). Then you choose a quantile, call it the 5th percentile, beyond which you consider a move to be ...

6

Dynamic Time Warping, recursive, time-delayed feedforward neural networks, wavelets, empirical mode decomposition, ..., there's plenty of it. BUT If you want my advice, don't go this way, I wasted too much time doing things like that. Neither big nor small players (profitably and consistently) trade this way and for a good reason. Technical analysis is a ...

6

I have worked with C++, java and C# implementing a google like search engine for DOD in along with many other software that require high performance (using low level memory mapping and named pipes/tcp). In my experience, you cannot match speed of C++ with the managed code. In managed code, every call to new, garbage collection, etc. requires multiple ...

5

I know (by word of mouth from persons directly involved, so cannot back it up with a reference) that Goldman Sachs uses Java a lot in algo trading.

5

I just made a Genetic Algorithms calculator you can try at http://www.gregthatcher.com/Stocks/GeneticAlgorithmCalculator.aspx I'm not a "quant expert" like all of you (I'm just a programmer), but here is what I've found. 1.) If you set the constraints up correctly, the results are amazing. e.g. you can get portfolios that have very high return and low ...

5

I would create categories, and work on risk parity among the categories. Otherwise, variance is not really a good measure of downside risk: Change your risk measure, use a rolling window historical VaR or Expected Shortfall at some horizon that matches your investment style. downside semi-variance could do the trick too if don't want to change your algo ...

4

Like @Pete mentioned; knowing what assumptions you are making in your testing and what impact those assumptions could have on your algorithm's results are one of the major drivers to rolling your own trading simulation engine. The framework listed below is based on daily bar needs. Your mileage may vary if you're focused on intra-day. Good data. If your ...

4

All things being equal, stocks with the highest bid-ask spread present the greatest opportunity for the market maker The size of the opportunity (i.e. revenue expectation) can be represented as Volume * Bid-Ask Spread. Your algorithm should rank-order that revenue expectation Stocks with high current market values will tend to have narrower spreads and be ...

4

You question is quite strange: so you do not want to use methods inspired by bioinfo and genetics (neural networks, GA, geometry of folding, etc) but methods that are used in these fields? In terms of modeling, the problematics in bioinfo and genetics are mainly: tree or graph matching (to build metrics in the space of molecules), like in SIGMA: a ...

4

I won't give you the answer delivered on a silver platter but hopefully the following will get your started: a) you need to define exactly over which look-back period you aim to derive the maximum drawdown. b) you need to keep track of the max price while you iterate the look-back window. c) you need to keep track of the min price SUBSEQUENT to any NEW ...

4

Perhaps construct a Brownian Bridge between the day's open and close, then scale it according to the day's high and low.

4

Assume $p_i(x)$ is a payoff of one particular option. You can try to reproduce the diagram using a bunch of options with strikes on the breakpoints (underlying is useless, because its payoff can always be modelled by buy&sell of a certain call and put). Then you can create a system of k equations with n unknowns (number of each kind of option). All other ...

Only top voted, non community-wiki answers of a minimum length are eligible