August 19, 2016

Can a selection process of tradable stocks work in the future as it did in the past? We are always able to rank stuff, past data, that is, since it is part of the information set available to us at the time. The objective is to find in the past dataset something to activate decision surrogates to generate marketable trades in the future.

For one, I am looking for tools to help me answer the following graph:

   CAGR Contribution to Portfolio

(click to enlarge)

It says that wherever we are in time, stock performance in terms of CAGR (compounded annual growth rate) will be fanned out as in the above log chart. Now, between the two extremes, put in 3,000 such straight lines to represent a selected tradable stock universe. The end distribution will be somewhat oddly bell-shaped, with its mean near or below the 10% CAGR line (the market's secular trend), but most assuredly positive due to the long duration under consideration.

Going forward, you have absolutely nothing that can tell you the end ranking of these lines, their identity, their magnitude, or even if they will be there at all. Meaning you still won't know the future. But, one thing you do know now is that this future will be shaped as in the above chart.

In stock trading, if a tradable strategy premise is valid, a backtest of a sufficiently long duration should reveal this. And, I think that is what Peter Falter's modifications show: leading to higher profits than averages (see part I of this article for further explanations). One can fiddle with the parameters controlling this strategy, but I would find it more appropriate at this time to tackle some of its deficiencies and undesirable traits.

For me, even as it is in its current form, that strategy has some merit.

Nonetheless, the strategy is partially shooting itself in the foot which tends to curtail its potential. Here are some other tests I've done.

Raising the profit target from 25% to 80% and then to 150%:

   #5  SMRS. 85% Leverage. 80% profit target (was 25%)

Chart #5

(click to enlarge)

and 

   #6  SMRS. 85% Leverage. 150% profit target (was 25%)

Chart #6

(click to enlarge)

The scenario didn't change much, but still, as the profit target increased, this trading strategy started to slow down, but just a smidge. This slowdown is distributed over the entire time series. However, it also shows that raising the profit target had little impact on the output of the applied strategy.

One easy conclusion would be that you can raise the profit target all you want and talk about any risk/reward ratio you want to set, but if no stock reaches those levels, there will be no such trade and, therefore, no change in the portfolio's value. And this is probably what is occurring here. Practically no stock has the opportunity to reach those profit targets, and therefore, there is little change in the portfolio's value over time.

On the other hand, increasing relative weights does have an impact: 

   #7  SMRS, 85% Leverage, 150% PT  increased relative weights

Chart #7

(click to enlarge)

For all these charts, you don't see a major increase in volatility or drawdown. Anyone could bear 2 to 3% additional points in drawdown for the added reward. Chart #7 says that you get $8.3M on a $100k stake over a 13.6-year period just by changing the parameters, not the code. The bottom line is that it represents the equivalent of a 38% CAGR over the period.

This is still Peter's trading logic at play. All I have changed are underlying assumptions and some of the numbers controlling the strategy. None of the code was changed. Not a single line was added. So, I'm not of the opinion this trading strategy is worthless. On the contrary. One just needs to look at it differently and really see what Peter's additions enable one to do.

The program does have weaknesses that should be addressed, true. It would make it a much better program. I'm not familiar enough with Q at this time to make those changes. But that will change.

One of the weaknesses of this program; it is hardly scalable in its present state. For instance, giving it $1M in capital resulted in:

   #8  SMRS. 85% Lev. 125% PT. $1,000,000 stake

Chart #8

(click to enlarge)

You still beat the index, mind you, but one could easily do better... Just doing ten #7 would already provide 4 times more performance than doing one #8, and this with the same initial capital. This represents little added effort since a computer program would do the work. Let's put this in numbers. Ten #7 at work is $83M, while one #8 is $1.7M over the same time period using the same initial capital. It's a no-contest scenario.

Of note, such a trading method, as designed in this program, can not know in advance what stocks will be traded, whether it be past or future. But it can always sort its past. It can do that on a daily basis if desired. It is not a projection of what is to come, it is simply accounting for what has passed, and is sorting it out.

A better mix. Here are the same variables, but pushing each in the right direction. 

   #9  SMRS. 85% Lev. 125% PT. Faster Response. $100,000

Chart #9

(click to enlarge)

Hope all this is helpful to someone.

Ah, just to push it a little bit more... 

   #10  SMRS. 85% Lev. 125% PT. $100,000 + residual

Chart #10

(click to enlarge)

I think that this trading strategy has value. It might be somewhat very like the original version, but the changes made to its parameters have made it a different product, now having a long-term perspective. Chart #10 translates to a 44.4% CAGR over the 13.6 years. Not that bad a number!

If I wanted: Σ(H(strat_A).*ΔP) > Σ(H(strat_B).*ΔP) > Σ(H(strat_S&P500).*ΔP). Then, strategy (stratA) did it.

What will be left of all this is simply some grounds for further testing. There are some behavioral issues in this trading strategy that are not to my liking, and in the weeks to come I will probably tackle the problem. But, for now, even in its current state, meaning being awfully wasteful of capital resources, it still did what is displayed in chart #10. And I think one can do even better.

These tests showed:

1. A stock selection process could be as simple as the price has risen over the past year.

2. Even if you navigate a sea of variance, you can catch part of the underlying drift.

3. If you can compound positively over the duration, it will increase total return.

4. After a stock has risen over a year, hoping that it rise another day can have merit.

With Peter's code as a template, I can design trading strategies that could use all available equity, if desired, which was one of the reasons for coming back to Quantopian in search of answers to the chart at the top of this article.

Now, I've got some work to do.


Created... August 19, 2016,    © Guy R. Fleury. All rights reserved