April 13th, 2016

The Value of a Stock Trading Strategy

Finding badly designed stock trading strategies is easy. I have hundreds of those on my machines. Took only a few minutes to locate one to illustrate my point. Didn't look at the code, technically, it was not required. But did perform a 20-year simulation on a small group of stocks. The same 10 stocks I used in recent months to explore a strategy's strengths, weaknesses, and limitations. The main reason for using that group was keeping the ability to compare strategies, and performance levels, while seeking the answer to the question: is strategy A better than strategy B?

The only way to find out is to do a simulation over the same past data. No one is interested in waiting for the next 20 years to get the answer. If at least a trading program could handle its past profitably, maybe it could also handle its future? Very simple logic. Naturally, the future will give different numbers. But, nonetheless, why would a poor trading strategy perform any better than it did in the past when confronted with its future?

First, a definition. I classify as a poorly designed stock trading strategy any strategy that underperforms long term averages, meaning that it can be positive, generate a profit, but doesn't beat the Buy & Hold scenario. The same as saying: performed worst than buying an index fund.

Then, there is this other class of really bad programs that can't even preserve one's capital over the long term. They are so bad, they are actually, automatically, losing money producing a negative portfolio CAGR. That is they satisfy: A(t) = A(0)*(1 – r)^t which will deplete a portfolio over time.

The selected program is part of the really bad strategies. It was designed in 2004 from the trading procedures given in a book on trading. The book is still available. I only want to look at the output of the program, and only consider what it does.

For me, it is not because a trading strategy appears in a book that it is good. It might be debugged and run on your computer, but that does not make it, de facto, a profitable trading program. If you don't test such programs for yourself before using them, you become responsible for not doing so.

Only testing can reveal if there is a profit potential in a trading system or not. One should see that an opinion on the merits of a trading strategy without substantiating data has practically no value.

If a trading strategy can not survive minimum testing conditions, then surely, one should not consider putting such a trading strategy to work. It would not only be a waste of time, but also cause harm by losing one's capital to boot. Losing your time, and your capital, makes of this book a very expensive book.

I don't care what the author had in mind. I don't care if he displayed some carefully chosen examples that worked to make his point. Whatever. He should have done his homework, tested his program, and then, have never released it. Am I too critical in my appraisal? I don't think so. When you put something in public such as a trading program, you become indirectly responsible if other people lose money due to your program. It is not a case of the people misusing the program. It is that it is a so badly designed set of trading procedures that all it can do is make you lose money. Et pour être méchant, je dirais que l'auteur le savait.

I ran the program, as is, with no modification whatsoever, over the usual 10 stocks, over 20 years of price data. Here is what I got:

#1  Portfolio Report
NTD_Perf_Report

(click to enlarge)

It can be observed that not a single stock made money over the 20-year period. Not only that, but almost half the portfolio was lost (- 44%). On average, the strategy produced the equivalent of: A(t) = $1M*(1 – 0.0287)^20. It's not that big a loss, -2.87% CAGR, but still resulted in: - $440,996 down the drain. Maybe most importantly, 20 years lost with nothing to show for it.

None of the numbers are of real interest, except for the number of trades (3,410) which is sufficiently large to make the test significant. It is all I can say positive. And this also forces me to accept that the data I see in the above chart is representative and statistically significant.

Losing on average - $214 per trade can not be said to be a positive outcome. You play time and time again (3,410 trades), and still end up losing. Yet, on winning trades there was an average profit of $2,001 while on losing trades you lost, on average, - $1,068. A 2:1 reward to risk ratio and the program still ended up losing the game. Showing that a 28% win ratio was certainly insufficient to win the day.

Doing a simulation takes only a few minutes. Waiting, day by day, for 20 years takes a much longer time which can not be recuperated. It is gone, as well as whatever opportunity one thought one might have had.

Meanwhile, someone could have chosen to sit on their hands for the duration. Start with the same capital in the same stocks, and just wait for 5,238 trading days (some 7,333 days on the calendar). Use all the spared time to do whatever they liked. Here is the outcome of that scenario:

#2  Buy & Hold Report
Buy & Hold Perf. Report

(click to enlarge)

The output is not stellar, but it is positive with: A(t) = $1M*(1 + 0.1674)^20 = $63,987,869. Doing almost nothing... and you reaped the rewards, even beating the averages. A +16.74% CAGR, quite acceptable for a Buy & Hold proposition. Note that all 10 stocks ended with a positive CAGR.

I would venture that that was the opportunity cost of the book, and I see it as a minimum. One could have designed a better trading program, and produced a lot more that the Buy & Hold, making that book even more expensive. A book you could have bought for $20 bucks and where you could have blindly followed its advice ending up NOT making you over $60+M.

I'm including a chart generated by the program as well as a summary performance report for the first stock in the list. A way to show, as evidence, that the numbers shown in tables #1 and #2 are what the program generated.

#3  ABT Chart
ABT Chart

(click to enlarge)

#4  ABT Performance Report
ABT Performance Report

(click to enlarge)

In the end, it is your money, and you can do with it whatever you want. It really is not my problem, but could I give this little piece of advice: look at the long term before empowering a trading program. Your financial future depends on it. The future comes by only once. There are no reruns, there are no let's do it again.

I'll now try to see if I can salvage something from that program, if anything at all. However, I expect it will be a waste of time. I've used that program as if a black box, as if it was a program I purchased in the open market.

There are, already, some conclusions I am able to make without even seeing a single line of code. It won't matter what the coding style is. It won't matter if the code was efficient or not, executed fast or not, if it followed indentation rules or if it was spaghetti code. None of it will really matter. Only the output, and in that department, I have to classify this program as really bad, no matter how it is programmed. It is inherently flawed from the start, and was built that way.

What I'll get out of the exercise is a list of don't do this and don't do that. I estimate that those are very expensive trading procedures and should never find their way in any of my programs.

Now, the real question. Would you trust the described program, as is, and put it to work for you for the next 20 years?


Created... April 13th, 2016 © Guy R. Fleury. All rights reserved.

Alpha Project