# Tag Info

8

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 ...

6

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 ...

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

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 ...

3

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 ...

3

Zipline, the opensource python backtester, has a batch and iterative implementation for max drawdown. Here is the batch: https://github.com/quantopian/zipline/blob/master/zipline/finance/risk.py#L284 Here is the iterative: https://github.com/quantopian/zipline/blob/master/zipline/finance/risk.py#L578 disclosure: I'm one of the zipline maintainers

2

Yes there is a way to find kth largest element in an unsorted list in linear time here. However, depending on what program you are using, implementing the algorithm might not increase performance. The built-in sort function is probably optimized in C, and hence is very fast.

1

Regarding Joshua's inspired answer, I'm still not sure how you guarantee that scaling gives you the exact high and low values. I suppose that you could simulate until you get a result that is close enough. But that could be hard when, e.g., Open is near High and far from Low. An alternative solution is to construct a Brownian Bridge between Open and High, ...

1

(After the clarification, this answer is no longer relevant) Expected maximum drawdown is going to be highly sensitive to your choice of SDE, and to your calibration of it. Therefore you should play with a variety of parameterizations to estimate your model error. So far as efficient computation goes, we can regard this as a payoff very similar to a ...

1

Well pattern recognition and image processing is so developed these days. This is cutting edge in CS now and if we could identify cancer or brain tumor on a hazy image or a suspect face on an industry cam then recognizing head and shoulders on a chart is really really easy. Support Vector Machines or entropy come to mind but there is a myriad of ...

1

Regarding trading, it depends upon one's style and temperament. Don't rely solely on Aronson's book and his views and a phrase quoted by Andrew Lo in his study. The formula posted by Tal Fishman of Head and Shoulders as quoted by Lo, Mamaysky and Wang (2000) is not exhaustive. There is a lot of scope for further improvement. However, there are many studies ...

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