January 10th, 2018

The Payoff Matrix Challenge

Portfolio management theory has had a lot of books written about it. However, few show how easy it can be to express the outcome of a large portfolio's total trading activity using a single mathematical equation.

I use a payoff matrix for simplicity and convenience. The outcome of a payoff matrix gives the total profit or loss of a stock trading strategy: Σ(H∙ΔP). It is a simple expression and it carries a big punch.

In Python, the code could be: (H_strat ∙ Delta_P).cumsum()

We can not say it is complicated. In Excel, it would be a summed two-column multiplication.

A portfolio "Y" will have for matrix equation:

Portfolio_Y = Init_cap_y + (H_strat_Y ∙ Delta_P).cumsum() - (Exp_Y).cumsum()

A one-liner doing all the accounting, and containing the complete historical record of all executed trades. It reads as follows: the total value of portfolio "Y" is composed of its initial capital to which is added the cumulative outcome of all trades, and where all trading expenses have been subtracted.

The payoff matrix could have thousands and thousands of trades, if not millions, and still, a single line of code would take care of it all. Expressed as a vector, it would be: Σ(q∙Δp), where the result of the sequence of trades is added up. Both formulations give the same answer, only the packaging is different: going from vector to matrix.

The same equation will apply if you add dimensions to the matrices. The purpose is to consider more than just one portfolio or strategy. The general form would be:

Portfolio = Init_cap + (H_strat ∙ Delta_P).cumsum() - (Exp).cumsum()

A 3-dimensional array would tally the results of a multi-strategy portfolio. While a 4-dimensional array could keep track of all portfolios of multi-strategies for a fund.

A fund of funds of portfolios of multiple trading strategies could be expressed as a 5-dimensional array. Adding one more dimension would give the ability to monitor all funds of funds of portfolios of multiple trading strategies by country. Resulting in one really huge payoff matrix representing up to all portfolios in the world.

All of which, in a single line of code.

That your portfolio be small or the biggest there is out there, it is still the same equation. It is only the packaging of the recorded trading activity that is different.

But, this is trivial. It dates way back. Meaning it is not new stuff.

However, a payoff matrix can provide some needed perspective. And that is more important. It forces us to consider a portfolio, whatever its size, in its entirety, as a big block, from start to finish. With the finish, the most critical part since it will give a portfolio's end value which is what the equation provides.

We could view these matrices row by row and try to predict what the next one will be as a period to period efficient frontier portfolio optimization process, or we could plan for the final outcome of the trading strategy since what will matter in the end will be the result of the above equation.

This end result comes after years and years of having your machine execute whatever trading program you can imagine. Note that even with a periodic rebalancing optimizer, the same equation will prevail. What you want, however, or should want, is the highest payoff matrix you, or your program, can generate.

You want your solution to have less volatility, then plan for it. Just as if you prefer low beta or low drawdown scenarios. There, you can plan, not just for the next period, and then the next as they come along, but for the entirety of a portfolio's lifespan which should be measured in decades, and not just for a few months going forward.

For example, a daily forecast for a portfolio of 200 stocks over a 20-year period would require rebalancing 5,200 times. On a minute to minute scenario that would be over 2 million rebalancing periods leading to a potential 400+ million transactions or trading decisions to be made over that 20-year time span. So, there is a need to plan what you will be doing and why.

It is a CAGR game, and there are few components: Init_cap, H_strat, and time. Evidently, you also need a price matrix P, but, that is supplied, and you can not change it. It is not under your control, while Init_cap, H_strat, and time are.

We need to design trading strategies that can last and not just strategies that tend to fizzle out right off the gate. The only way to do that is to plan what your trading strategy is going to do over the long term.

And when you look at your trading strategy it should be viewed in the context that it could merit to belong to a larger portfolio of strategies. But there, it will have to answer a simple question: is this new strategy bringing something to the existing mix, or will it be a burden? Will it carry its weight?

Will it improve the overall portfolio of strategies in some way? That becomes the question.

A portfolio of strategies can only gain if the added strategy brings in some value. Using the same initial capital, since the new strategy will need to be financed using existing available funds, we have:

Portfolio = Init_cap + (H_strat ∙ Delta_P).cumsum() - (Exp).cumsum()
+ (H_strat_Y ∙ Delta_P).cumsum() - (Exp_Y).cumsum()
> Init_cap + (H_strat ∙ Delta_P).cumsum() - (Exp).cumsum()

This can only happen if:

(H_strat_Y ∙ Delta_P).cumsum() > (H_strat_Z ∙ Delta_P).cumsum()

where strategy Z (H_strat_Z) is already the best in the portfolio. All other scenarios will reduce the total outcome, will reduce the overall generated profits.

In a way saying that for a new trading strategy to have some value, it needs to outperform not only the best one you have (making it your best) but also, the best "they" may have. That is the challenge.


Created... January 10th,  2018   © Guy R. Fleury. All rights reserved  

Alpha Project