Feb. 18, 2019

The following was posted on a Quantopian forum. It deals with a stock trading strategy transformed to have a long-term game plan and objectives. It also treats multi-strategy portfolio scenarios where allocation distribution might matter more than one might expect. An example of the originating trading strategy is linked to in the Quantopian forum. Unfortunately, Quantopian shut down in 2020.

Somewhere along the line, you will have to mix trading strategies together, meaning playing more than one at a time. And the overall result will depend on their sum. Each strategy will be allocated some initial capital and ran simultaneously with the others in the group. This group of strategies could be of any size and will constitute the entire portfolio.

The payoff matrix equation for this is: F(t) = F0 + Ʃ(H∙ΔP). And for a group of strategies, it is the same equation.

What would change are the matrix dimensions going from 2 to 3. Also, F0 would need to be divided into those k strategies. The holding matrix would have for elements: h(k,i,j), and the price matrix: p(k,i,j). This is sufficient to identify every trade from i to n on any stock j in any strategy k.

We could rewrite the equation as: F(t) = Ʃk F0/k + Ʃk Ʃn (H∙ΔP). Note that the previous equation did the same job.

All that to make the following point: adding strategies together in the same portfolio will average out some of the stuff on these regrouped strategies. One could ask the question: what is the average or actual drawdown for the first 10 portfolios participating in the contest, for instance? The answer should be something less than the highest drawdown of the group but more than the lowest of the group.

If you have two trading strategies with drawdowns of -0.10, you will not be getting a sum of -0.20 for the combined drawdowns. But maybe more, something like -0.07 to -0.09, since your two strategies might not reach their lowest drawdown at the same time. Note that having two strategies, the initial capital would have been divided in two too. It goes the same if you handle 10 strategies or more at a time. The strategy diversification will help reduce the overall drawdown.

You have some of this stuff that will average out, like volatility, drawdowns, and Sharpe ratios. As for profits or losses, you can still make averages of the lot, but mostly you will simply add them up. And this is a major distinction.

Each of the trading strategies could be ordered by outcome. We would have: Ha > Hb > … > Hk. And thereby having each strategy contribute less and less to the overall results. Nonetheless, the total outcome would not be changed. You would still get the cumulative sum of all the profits and losses on all the trades taken.

Managing Things Out

The average portfolio strategy result is simple, it is F(t)/k. Determining the total outcome is trickier since you do not have any of the future data. Still, you do know the general outcome in terms of its CAGR or something close to it based on some long-term backtest.  gr(t) = [(F0 + Ʃ(H∙ΔP)) /F0 ](1/t) -1 where gr(t) is the average growth rate.

For instance, if you take the first 10 strategies from the contest and they average out to something like a 5.0% CAGR, you could recompose the equation with F(t) = F0 ∙ (1 + gr)t and get an estimate of where the sum of these strategies is going. With 10 million each for a duration of 14 years, one should expect to get: F(t)∙10 = 10∙F0∙(1 + gr)t and this in numbers gives: 10,000,000∙10 = 10∙10,000,000∙(1 + 0.05)14. If you do the calculations, it comes out to 197,993,159 for the 100,000,000 put on the table. Note that strategies participating in the contest have stability, low volatility, low drawdowns, and near-zero beta, which explains their low CAGRs.

Say you add one more trading strategy to the mix. Take a look at the attached notebook shown HERE (Link no longer available due to Quantopian shutdown), where the outcome was 4,243,029,746, and add this to the 197,993,159 from the first 10 contest participants. Then, take the outcome for the 11 trading strategies combined using: gr(t) = [(F0 +Ʃ(H∙ΔP)) / F0 ](1/t) -1, which would give:

gr(t) = [(120,000,000 + 4,441,022,905)/120,000,000](1/14) -1 = 0.30

This one-added trading strategy raised the overall CAGR for the 11-strategy portfolio from 0.05 to 0.30 over its 14-year trading interval. These might be only guesstimates. But nonetheless, they do provide a reasonable approximation.

If you put two such strategies in the mix, you would get:

gr(t) = [(140,000,000 + 9,300,038,971)/140,000,000 ](1/14) -1 = 0.35

The two heavy strategies would still have their big drawdowns, but now the impact of their respective drawdowns would be reduced by the 10 low drawdown contest strategies. The average drawdown would now be around -0.16, a much more amenable portfolio figure.


Extrapolating for an added 10 years based on the above 35% CAGR would come close to a portfolio value of $187B. But in reality, it would be more like $395B since the portfolio is compensating for return decay due to the two high profile strategies. While extrapolating, add 6 more years to make it 30, and the total portfolio value would rise to something like $3.935T. That is more than pocket change for just watching a set of programs do their thing. But then, one would have to have a long-term vision of where he/she wants to go.

Things To Do

If, after some modifications to the program, I bring down the drawdowns in the vicinity of -0.30, then the overall average drawdown for the 12 strategies will fall to about -0.09, which would make it a reasonable portfolio of strategies and still get the outstanding rewards. Even with these 2 strategies, going to cash is an acceptable protection measure in times of market turmoil. And this kind of minimal protection should be relatively easy to add to those two high drawdown strategies.

After all these tests, which were only to raise my interest in the thing, I will have not only to finally read the code but also bring some modifications to it in order to make it do what I want. What has been demonstrated in the step-by-step modifications made was that the high-profile strategy could survive. It did it over a 14-year period. It was scalable, and it could be controlled. However, it does lack protective measures, and bringing in some will be part of the job.

I see all the tests I have made as preliminary work to see if there was something there. And if a trading strategy passes these acid tests, then I stand ready to go forward. My job will be to enhance the strategy's strengths and alleviate, reduce, or eliminate some of its weaknesses. At least I started knowing how far it could go.

Created...February 19,  2019, © Guy R. Fleury. All rights reserved