May 30, 2020

In this third installment, I would like to concentrate on the second part of the equation presented in my previous post. It is also where you can find an explanation for a trading strategy's overall return.

But first, a point to be made again, if your stock trading strategy is not built to last, what is it good for? Why build something and see it blow up in your face after a number of years? Wasn't your goal to build your retirement fund or someone else's or build a legacy fund for some reason or other, and that it would, at the very least, have a positive ending value?

Your trading strategy has to be transformed to minimize inherent problems associated with the shortcomings of long-term trading strategies. If you do not compensate for the inherent structural deficiencies, then be assured, in all probability, that your strategy is practically doomed to underperform, if not fail. If you have a stock trading strategy that answers an equation, then your strategy is defined, and not following its equation could prove costly. An equal sign is an unambiguous assertion.

For example, one cannot have just an opinion on F = m ∙ a. If you disagree on that equal sign, then you need to prove your point with a not equal sign (F ≠ m ∙ a) with some evidence. As a side note, if you want to increase F, you have only three alternatives: increase m, a, or both. There are no other solutions. The same principle will apply to the payoff matrix as part of its equation $X = E[n] ∙ xavg. I do not know why I feel I needed to go so elementary.

Compensate For Long-Term Return Degradation

In a trading environment, it is not that hard to compensate for long-term return degradation (see, for instance, my free paper: Fixed-Fraction). But one thing is sure. If you do not compensate in some way or another in your automated trading script, it is not the program that one day will wake up and take care of it for you.

A trading program can only do what it is told to do. It does not acquire intelligence, nor does it create its own code. That is your job, and may I suggest that you do the best you can. First by knowing what you want your program to do in the face of all that randomness that will be thrown at it over the years and truly understand what it is you really want that program to do. That it be over the short, medium, and especially over the long term.

If your trading strategy is governed by an equation as presented in my last few posts (see related articles), then you need to understand the ramifications and their implications to then use that knowledge to your advantage. This is the same as saying: use that equation to build a better long-term portfolio that can exceed not only your own objectives but also outperform, as a bare minimum, long-term market averages.

Refer to the equation in my last article. From it, we were able to estimate the number of trades a trading strategy would execute over the number of years it would be active due to its periodic rebalancing. Knowing the number of trades did not give you how much profit or loss would be incurred over the investment period. We need the other part of the equation for this, namely: u(t) ∙ E[PT] = xavg, where xavg is the average net profit per trade.

The Payoff Matrix Equation

Whatever that trading strategy is, no matter how many trades are scheduled to happen over those years, it all makes sense when we combine the two parts of the payoff matrix equation: Σ (H ∙ ΔP) = $X = E[n] ∙ xavg.

Evidently, it is if, and only if, there is a positive average net profit over the period that you win xavg > 0. But the point is not just to win; it is to win more than if you had bought an index fund. If you cannot outperform SPY over the years, why do you trade in the first place when SPY was available all along to give you a higher return on your investment?

Common sense, just as logic, should prevail even if you decide to automate your trading. It should be, you know beforehand, that you can do better than buying SPY by automating your trading process. Then, why not take the extra steps needed to make sure you do?

You need to go back to a better understanding of the payoff matrix itself: Σ (H ∙ ΔPand what it says. First, the price matrix P is simply the list of all the stocks in your selected stock universe. It is your stock selection criteria that will reduce this list to whatever you want. For example, use the top 400 based on momentum out of the 8,300 stock universe or out of the 3,000 in Q3000US() as presented in earlier articles. What you will have in the price matrix is the end-of-day (EOD) close of the 400 selected stocks. Over a 20-year investment period, that will be 5,400 rows by 400 stocks. Each EOD stock price in the matrix is identified by its datestamp: pd,j.

Taking 400 stocks out of 3,000 on some criteria makes the choice more than just a sample of what is out there; it makes the choice almost representative of the whole. Of the gazillions and gazillions of possible combinations, one is picked. And from it, only one answer will come out. This notion of choice is at the center of your trading strategy, whatever it is.

The Price Matrix

The price matrix P is the same for everyone. That you take a subset of this matrix does not change the stock prices. All you do is select one group of stocks over another. The payoff matrix is interested in the price differences ΔP. This is really simple; it is the price change from day to day, Δpd,j = pd,j - pd-1,j. nothing mysterious there. But also, no hidden information.

Do the stocks not selected in your price matrix P have any impact on your portfolio's outcome? None, no impact at all. The point is that the stock selection itself might not be the real problem, even though you still should make the best selection you can on whatever criteria you consider important to achieve higher performance. Evidently, a stock that, on average, continuously goes up while you are long is better for your portfolio than a stock that is going down.

The Strategy Matrix

It is the strategy matrix H that really matters. It is the cornerstone of any trading strategy. The methods you will use to slice and dice those price series will make the difference. If hd,j = 0, meaning that the inventory on stock j at time d is zero, there definitely is no gain or loss there. It becomes your ability to select slices of positive momentum periods for your longs if you want to profit from them. I would add it does not matter so much what you selected as a momentum identifier as long as that, on average, your average trade shows a profit xavg > 0. And when you execute 100,000+ trades, you will see that xavg does matter: $X = 100000 ∙ xavg. Therefore, prepare to design for it.


Related Recent Articles:

The Inner Workings Of A Stock Trading Program – Part II

The Inner Workings Of A Stock Trading Program

Lessons From The Portfolio Rebalancing Gambit

May 30, 2020, © Guy R. Fleury. All rights reserved.