July 13, 2020
The following was posted in a Quantopian forum dealing with “Quality Companies in an Uptrend”. The original strategy template is (was) available free for anyone to copy and use as they see fit. The trading strategy itself is fairly basic: it selects a set of the highest momentum stocks from top-quality companies that are estimated to be in an uptrend. The assumption is made that such a trend would continue forward. The portfolio is rebalanced at the end of each month. Thereby, continuously chasing the higher momentum stocks. Nothing unreasonable about that proposition.
This post comes after having considerably modified the strategy in order to enhance its long-term outcome. The results from simulations where leveraging was used were also presented in that post (see the 4 listed HTML files (no longer available)).
I stated before that the modifications made to this strategy (which more than tripled its code size) have made it trade mainly on market noise (which it also did before).
On such a premise, it almost surely precludes over-fitting in the conventional sense. See my latest posts in the above-mentioned forum for more details.
For that matter, it would not even make sense mathematically to ascertain any kind of over or under-fitting in such a scenario without providing corroborating evidence of some kind. Something more than just an “opinion” would do. I would accept any academic paper, even on the flimsiest of evidence, demonstrating that trading on market noise will generate alpha and lead to over-fitting on prolonged time intervals. At least, there would be some data making that point.
I could see an exception in the form of some outlier, an extremely lucky streak, for instance. But an outlier might not, in all probability, stretch the extent of a 17-year time interval. To statistically over-fit 140,000+ trades over the life of a portfolio would be stretching it really really way beyond realistic expectation probabilities.
Expected Value Of Market Noise
The expected value of trading on market noise is very simple to determine; it has been so for centuries. It is zero.
We get: F(t) = F0 + $X = F0 + Σ (H ∙ ΔP) → F0, which implies Σ (H ∙ ΔP) → 0, meaning that the strategy's whole payoff matrix, whatever its composition, would tend to zero. Even more so the longer you played the game.
There is no edge there, and understandably, it also means that Σ (H ∙ ΔP) = n ∙ xavg → 0, where your average net profit per trade tends to zero since n is certainly not zero, nor will it tend to zero. In fact, in trading, n is a monotonic, ever-increasing time function; it only goes up.
Designing a long-term winning trading strategy would uphold the hypothesis that the market is not purely random but does exhibit some secular underlying trend, at least in the historical US market. Designing a long-term trend-following strategy in an upward secular trending market appears as the way to go. And since the market does not go up all the time, you put in some protective measures for periods when the market is identified as declining. Just common sense stuff.
It Is Always Your Choice
Some think that because they can't do it, others can't either. That is very sad and, (I will use a kind word), “shortsighted”. You will always find someone doing better, just as you can easily find people doing worse. Still, overall, you remain the one ultimately making all the decisions, and a trading program is just a means to automate those decisions you might think are to your own benefit. You will win some and lose some. That is the promise of trading on quasi-market noise. If you want more than that, you will have to do more. That too, is very simple. At least, you will need to do it differently.
I would reiterate what was said in the previous post: “If you go for conventional trading methods, you should get what should be expected: conventional results.“
It is your trading strategy that has to extract from the market every penny it is going to make. And the market will not make it easy for you. You will have to work for every penny. You will also lose or pay for every “mistake” you make. All you can do is make a bet based on whatever data you have and determine later if it was productive or not.
There is only one person that needs to be convinced of what your trading strategy can do, no other, and that is you. Without that, your strategy is not worth much if you do not even understand or have enough confidence in your own work to know what your strategy really does. But then, everybody has to make those trading choices and live by them.
All my modifications to this strategy dealt with the payoff matrix and its equivalent functions. I make the program answer to these equations. Because of the time element, these functions are accepted as dynamic and chaotic. They will change over time the value of their controlling parameters at the market's whim or your own.
Is It Over-Fitting Or Leveraging?
Some confuse over-fitting with leveraging. My version of this program uses leveraging. The amount of leverage used is printed on the equity charts. All 4 HTML files presented saw leveraging hover around 1.5x to 1.6x.
As was said in my last post, if α – expt > 0, it can become worthwhile leveraging a portfolio. As long as you cover more than the added leveraging expenses, your trading strategy can increase its overall return. What those 4 HTML files showed is just that: you increase the leveraging slightly, and you should get higher returns. Otherwise, why would you ever even consider leveraging your portfolio in the first place?
These 4 HTML notebooks mostly show that adding leverage to a positive alpha strategy can be a means to achieving higher profits. Evidently, there are added operational costs to it, just like in any other business.
The strategy does not demonstrate over-fitting. However, it does show the tremendous impact leveraging can have on the final result.
Leveraging is an administrative decision. It is not your program that, out of the blue, will decide to use some. It is you coding its use and magnitude based on whatever data you consider relevant to the task. And with a 1.5x to 1.6x average gross leverage, the strategy is not in the over-leveraging business yet.
Why Do These Simulations?
I do these simulations to answer questions: How far can this trading strategy go? How much leverage can it take? Do I want to go that far? Can I accept that level of added risks and added expenses? Those questions can only be answered by doing those simulations and should be part of anyone's battery of tests for any “worthwhile” strategy. Otherwise, how could you ever know a strategy's full potential, strengths, and weaknesses?
Related Recent Articles:
The Stock Trading Unit Allocation Function
Gaining A Long-Term Portfolio Perspective
Toward Playing A Smarter Stock Trading Game
Stock Trading Game - Gambling It Out
The Portfolio Rebalancing Gambit – Part III
The Portfolio Rebalancing Gambit – Part II
The Portfolio Rebalancing Gambit – Part I
July 13, 2020, © Guy R. Fleury. All rights reserved.