# Tag Info

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

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

How about an O(N log(n)) solution ? To be a viable trading strategy, you often expect them variances to be similar, so just calculate ordinary volatility and put it in an ordered array. Of course that's going to be period dependent, so pick a few arbitrary periods and see which instruments end up being together. Then you get clusters of vastly smaller ...

2

Another reason for C++ is control, or at least the illusion of it. If you really care about what exactly is going to happen and when it is going to happen then C++ is the best option. If you are prepared to put in the effort you can know and control everything all the way down to the metal. Of course the price for more control in C++ is that you often have ...

2

The late Thomas Cover , (likely the leading "Information Theorist" of his generation), considered "Universal" approaches to things like data compression and portfolio allocations as true genetic algorithms. Evolution has no parameters to fit or train. Why should true genetic algorithms? Universal approaches make no assumptions about the underlying ...

2

Some reading that may be of interest to you and which proceeds along similar lines of thought is that of Shmilovici in "Predicting Stock Returns Using a Variable Order Markov Tree Model". Abstract: "The weak form of the Efficient Market Hypothesis (EMH) states that the current market price fully reflects the information of past prices and rules out ...

2

Perhaps to detect fractal behaviour you could fit something like a Daubechies wavelet. That is, $W(a,b) := \frac{1}{\sqrt{|a|}} \int_{-\infty}^{\infty} f(t) \phi((t-b)/a)dt$. Then you want to check the set $\{W(a,b) : a \in \mathbb{R}_+\}$ where $a$ is the scale, for some fixed $b$. If all the coefficients are similar then this might be some indication of ...

1

Assume $n$ markets where each market $n$ has features $Bid(n)$, $Ask(n)$, bid volume, $BidV(n)$, ask volume, $AskV(n)$, fixed costs, $FixC(n)$, and variable costs, $VarC(n)$. Assume you buy on market $n$ and sell on market $n+1$. The profit $\Pi(n,n+1)$ of each arbitrage opportunity amounts to  \Pi(n,n+1) = V * [(1+VarC(n+1))*Bid(n+1) - ...

1

You might want to check out the book Evidence Based Technical Analysis by David Aronson. In it he applies statistical techniques to determine whether certain time series patterns have any predictive power. It's an interesting read and should equip you with some ideas on how to differentiate between folklore and statistical rigor. It also gives you ample ...

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