Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Playing a Long-Term Game

Part of the attached notebook is based on the Numpy Tutorial on this site.

Random price series were generated using a normal distribution with a 3% standard deviation over 1, 2, 5, 10, and 20 years to show the impact of trading over the long term. Such a strategy will breakdown over time. In the beginning, it might not be that visible, but as the time interval increases, it becomes more and more apparent since return degradation is technically built-in.

Some alpha is then added to the mix to compensate for the strategy's breakdown as part of the available compensation measures. The impact is shown to be considerable over the long term even with a small alpha.

Run the program a few times, change the initial settings, especially with a long-term horizon.

This presentation is based on the portfolio payoff matrix as I've discussed before. See, for instance, my posts in the following threads should you wish to dig deeper.

What I Have Seen Over The Past Few Weeks

New Strategy - Presenting the “Quality Companies in an Uptrend” Model

The Payoff Matrix

[Added] Since the formulas and there are some do not display correctly, here is the notebook's HTML equivalent:

https://alphapowertrading.com/quantopian/Long-Term_Game_Part_1.html

2 responses

The previous notebook put some emphasis on having an edge to overpower built-in long-term return degradation. There are many ways of doing this. The payoff matrix equations can have gazillions of solutions. They all depend on how you deal with the ongoing inventory matrix H. Trading implies doing a lot of trades, and doing so brings along with it the Law of large numbers.

This new notebook extends the understanding of these notions by making hundreds of simulations based on the program presented in fist notebook.

Hope it helps some.

[Added]

Follows the HTML equivalent file. LaTex Math formulas will come out better.

https://alphapowertrading.com/quantopian/Long-Term_Game_Part_II.html

The how you generate your alpha is not the real topic of the attached notebook since a multitude of different approaches could achieve the same if not about the same or better results. Sure, you need to not only look for your own alpha generation, but also for methods that can be sustained as you go along since the game is in continuous motion, ever-changing before your eyes.

How hard is it to do this? Any trading strategy that could extract, on average, some 0.35% profit per trade, based on its trading procedures, could be within the parameters as illustrated in the chart with the highest alpha. Of note, a 100 dollar stock fluctuates by more than 35 cents (0.35%) almost any day of the week. Does it matter how you do it if you can?

These simulations (over 500 in the series) demonstrated that even under randomness, you could, at least, profit from the historical upward drift. And if you added trading skills (alpha), you could do incrementally better, and even much better. Like I often say: it is all up to you.

All of this 3-part series do show that it is not necessary to do extraordinary stuff in your trading strategies in order to achieve outstanding results. Nonetheless, understanding what you do and why should be paramount.

Link to HTML file: http://alphapowertrading.com/quantopian/Long-Term_Game_Part_III.html