May 21, 2012

Growth Optimal Portfolio IX

Designing Trading Rules

If you want to implement an “enhanced” trading strategy H+ based on buying and selling functions and/or procedures, your primary objective as before is for your portfolio to exceed the Buy & Hold, performance wise.

 Σ( H+ .* ΔP?)  = Σ(( HH + B? - S?) .* ΔP?>    Σ(HH .* ΔP?

It should be evident that B? > S? is a requirement, or more explicitly that Σ(B?S?) > 0. It would seem as if what ever trading strategy you might wish to devise, one of its basic tenets should be:  Σ(BS) > 0 ; meaning that the net overall trading be positive as a result of more buying than selling. And if you buy more shares than you sell, the inventory will increase.

The last statement implies that one should look at accumulative functions as a solution to the trading problem. This way,  Σ(BS) > 0 would grow with time. The inventory level of each stock would increase over the 5,000 trading days of portfolio life. And letting the inventory grow over time can be about the same as adopting a Buffett like profit reinvestment policy.

It all seems so simple really.

In a random-like environment where all trades are closed, all trading would tend to generate zero accumulated inventory as in: Σ(BS) → 0. This would be like saying any enhanced trading strategy would tend to generate zero alpha.

 Σ( H+ .* ΔPSPY)   →   Σ(HH .* ΔPSPY) →   α → 0

And as a result, just buying and selling might not be sufficient as a trading strategy to improve performance. Should: Σ(BS) → 0; once again one would get:

 Σ(( HH + B - S).* ΔPSPY)   →   Σ(HH .* ΔPSPY)  

If you are not accumulating any additional inventory, then profits generated by the trading process might simply accumulate as cash reserves in the account. The trading process: Σ((B - S).* ΔP) can still generate profits even though all trades have been closed. The profits generated by the closed trades could be fed back into the system if desired to progressively increase bet size as profits accumulate, undertake an accumulation program or simply left accumulating in the account.

Then, the trading strategy generating the payoff: Σ((B? - S?).* ΔP?) takes a life of its own. In the Buffett scenario, all you had to do was generate a trade imbalance Σ(B? - S?) > 0 to achieve alpha. By adding a selling matrix to the mix, it opens the door to any kind of trading strategy one would want to implement. Sure, if  Σ(BS) > 0, it will leave a bigger inventory on hand and thereby generate some alpha. But the trading process itself with its closed trades can also generate profits: Σ((B? - S?).* ΔP?) > 0.

Then, one should look at the whole process as having two objectives: one would be to accumulate shares over the portfolio's life, and the other to trade over this accumulative process. Like trying to gain on both fronts. The payoff matrix in its simplicity hides what is going on under the hood, it does not make reference to time when just expressing ΔP implies time.

Any price series could be expressed as:

 Pi ( t) = Pi o + Σt ΔPi

where the price series is simply the initial price to which is added the cumulative sum of all price variations. Therefore, what is looked for is: Σt ΔPi  > 0 for long positions and Σt ΔPi  < 0 for short positions. To obtain a: Σt ΔPi  > 0 for long positions requires time of unknown duration. Then profit seeking becomes a search for these Σt ΔPi > 0; a search for tradable opportunities.

You have this payoff matrix: Σt (( HH + B? - S?).* ΔP?), a 100 stocks by 5,000 trading days matrix and you want to find how many Σt ΔPi > 0 there are? ΔPi  can be positive over a time duration of one day up to 5,000 trading days and all numbers in between. Total, there will be some 500,000 price variations in the ΔP matrix just for the daily operations. But one should also count all other durations: from 2, 3, …, up to n = 5,000 as other possible time intervals.

Trading Decision Matrix

There is a need for a decision process, a decision surrogate that will provide the reason to undertake a trade (entry and possible exit).

 Σt (( HH + B?DB? - S?DS?).* ΔP?)

where  DB?  and  DS?  are the decision surrogates matrices governing the buying and selling operations respectively. With the introduction of decision surrogates comes the notion that market information, skills or knowledge may help in the decision process.

So here we are with an unknown price variation matrix ΔP?  (100 by 5,000) with unknown buying B? and selling S? procedures and functions controlled by unknown decisions surrogates DB? and DS?. What should be the best course of action amongst the googols and googols of possibilities?

There is a need to break down the trading process further by examining the possibilities. What is looked for are how are things to interact to provide positive performances and from there find ways to structure the decision surrogates to do the job.

A trading system can be composed of initial shares bought to hold long term, the positions still opened and the set of closed positions:

  Σt (( HH + B? - S?).* ΔP?) = Qt=0Pt=0 + Σtn(Qk=h, k≠ 0)Pt +  [ Σtn(Qk=s)Pt  -  Σtn(Qk=s Pt) ]

For each stock i in the portfolio, all the trading operations can be summarized with the above value expression:

 Qt=0Pt=0               : value of initial purchases at time t = 0
 Σtn(Qk=h, k≠ 0)Pt   : value of still opened positions, excluding initial positions
 Σtn(Qk=s, k=t)Pt     : the proceeds from all sold positions
 Σtn(Qk=s, k=tPt)     : the cost of all closed positions

There is a need for a process of creating trade imbalances that can generate enhanced holding matrices by designing inventory accumulation functions. You let the inventory levels fluctuate over the stock accumulation procedures; and let Σ(B? - S?) increase in time.

Trade Imbalances

If you B(uy) more than you S(ell), for what ever reason, then Σ(BS)  is greater than 0 and is just a consequence of your trading methods and procedures. If  Σ(BS) > 0, then you have achieved:

 H+ = HH + B - S  an enhanced holding matrix. 

It would be like saying, you buy 500 shares of P?, wait for a ΔP? > 0 or ΔP? > T (some profit threshold), and sell only part of your purchase leaving say 100 shares in your growing inventory. You can use the proceed from the sale to buy more stocks and repeat the process as long as the price fluctuates enough to generate some profits. This trade imbalance will accumulate with time as your inventory will grow. And at the same time you will be pumping cash back to the system to give it the ability to purchase more shares in the future.

The next step seems to devise ways to implement those trade imbalances over the long term which would result in improving performance above the Buy & Hold: H+ > HH, which was the primary objective in the first place.

As a simple example: let  Σ(BS)   →  Σ HH, which would translate into: over the 5,000 trading days you trade and accumulate as many shares as the initial quantity purchased on day 0, and this will tend toward doubling the accumulated profits:

 Σ(H+ .* ΔPSPY)   →   Σ( 2 HH .* ΔPSPY)  

Therefore, adding buying and selling matrices will improve performance as long as there is more buying than selling, as long as a trade imbalance is generated in favor of the buying matrix: B > S. And when considered at the portfolio level for say ΔP?, the above would be expressed as:

 Σ(H+ .* ΔP?)   →   Σ( 2 HH .* ΔP?

and would imply that the difference between the buy (B) and sell (S) matrices would have over the course of the portfolio's life accumulated the equivalent of their respective initial purchases due to their trading operations. A portfolio ΔP? was set as 100 stocks from the S&P500 times 5,000 trading days. The B and S matrices will be of the sparse variety of the same size as ΔP? and mostly filled with zeroes, but will contain all the quantities traded in each stock based on their respective decision surrogates.

Any factor, linear or exponential, that would enhance the trading procedures to increase this positive imbalance could have for result an increase in overall generated profits simply due to this increasing inventory. And it would appear an assumption that could be made, might be to have a long term positive price differential, as in PSPY(t) - PSPY(t=0) > 0 over the long haul. And even this long term assumption, PSPY(t) - PSPY(t=0) > 0 might not be necessary. Even on a flat SPY the trading procedures would still generate inventory accumulation, and as a consequence, higher generated profits than the Buy & Hold. All that would be required would be to have prices fluctuate.

Something as general as the S&P500 is expected to be higher than today some 20 years from now might seem sufficient, but it is not even a requirement. The long term average market trend for any 20 years rolling window for the past 2 centuries has seen a lot more ups than downs, by at least a factor of 9:1. But this is not an operational condition, the trading procedures would still do their jobs. However, I can easily see much higher performance levels with an higher S&P500 20 years from now; and even much higher levels due to increasing volatility measures.

When I look at ΔP?, I see price variations of a probable portfolio composed of some 100 stocks spanning some 5,000 trading days of which I know almost nothing about. What I see is 500,000 decision points all at once needing an answer: buy, hold, sell and hold zero which is also a trading decision. So my mission is to find ways to express those 500,000 decisions by designing an H? to be applied over ΔP? and produce an H+.

It is the design of these trading functions and procedures that are my main point of interest. How to control these imbalances in the face of uncertainty? How can one maximize generated profits without knowing where short term prices might be going or how they will evolve in time?


Published ... May 21, 2012 © Guy R. Fleury. All rights reserved.

Alpha Project