September 28, 2011

Trading over Accumulation Procedures

#### First, a Side Note:

*All my writing is to show that by slightly changing one’s point of view, one can design automated trading systems that not only outperform the Buy & Hold but will leave it far behind performance wise. The first point being made is probably that the Buy & Hold and short to mid-term trading are not mutually exclusive; combined they can do wonders.*

*Probably the second most important point would be a critic of the Buy & Hold trading philosophy where the hold is interpreted as doing nothing, just waiting it out long term. **This turns out to be a waste of resources.*

*The equity buildup is left unused and at a 10% historical market appreciation rate, over a 20 year period, would represent 6.72 times the original investment sitting idle, doing nothing, being wasted. It is the same as having a lot of equity bearing no interests.*

*And third, based on the equations presented in my papers, whatever the trading methodology used, one has to concentrate on the following:*

*1. To make more trading profits you need to extend as much as possible the average spread between your buy and sell price.**2. Look for well-defined trading opportunities that can be repeated a great number of times.**3. Concentrate on as many stocks as your resources can afford. It is all resumed in the following equation:*

* ∑ ^{T}* [ (

*∑*)

^{n}QB^{j}_{n}- ∑^{n}QS^{j}_{n}*. * ∆P*]

^{j}_{n}*Whatever the trading edge, what should stand out most in the above equation is n, the number of trades and second the price differentials. I think that one has to find the right mix between the number of trades and the number of trading edge opportunities offered by each stock in the portfolio; all within one’s own constraints and trading philosophy.*

*One should realize that I will not give away any of the code that produced the results in the simulations; some of which have extraordinary numbers. I particularly like those related to the Livermore script. The original script (that you can find on the old Wealth-Lab 4 site) had zero value in the sense that it produced absolutely nothing. It had a complicate trend definition which in the end performed as if by chance alone. However, after converting its trading philosophy to be more in line with the Alpha Power methodology, performance metrics greatly improved. The other scripts used in the simulations, after their conversion, also show impressive results, some much better than the Livermore scripts (see the MoTrader script).*

*So here is the big dilemma. From all the academic papers I have read over the years (over 450), none go further that show mathematically that the most expected long-term portfolio returns will tend to the market averages. And therefore, the profits generated playing the market would tend to ∑ *(**H*** .* ∆***S**)*. But you have these 5.8 years simulations which one after the other produced far more than expected performances using a mix of trading procedures (***H**^{+}).

*If the market should be considered as having random-like price movements, then there is no profit that could have been extracted whatever the enhanced (***H**^{+}*) procedures used. And yet, trading profits, often over a hundred times the Buy & Hold were achieved. There can be only one explanation: and that is that the enhanced trading strategies ***H**^{+}*proposed in my papers go beyond the mathematical models in academic papers. It is that all these simulations using various scripts (trading techniques) are confirming the mathematical models presented in my papers. And it does validate the notion of an exponential Sharpe ratio over a major part of the portfolio’s life as presented in my first paper: *Alpha Power: Adding More Alpha to Portfolio Return in 2007.

*All the simulations were performed using old Wealth-Lab scripts as a backdrop to which were incorporated Alpha Power trading procedures, and all produced outstanding performance results. All these scripts were extensively modified but they had in common a vague trend definition which at times was hard to acknowledge as such. But the trading methods applied did not require an exact or precise trend definition, all that was needed was a definition saying up or down that it be right or wrong.*

*This would imply some form of random decision making leading to trade execution. In fact, more than a few of the trading procedures did incorporate random entries; some with up to 3 out of 4 trades generated being the result of the application of a random function.*

*Also, in order to show that it was possible to generate alpha points as described in my papers, it was required, at some point, to show the trading methods in action. And having the simulations performing even better than the theoretical settings should demonstrate that the mathematical foundation on which they are based have more than some merit. All my research and tests have been chronicled since 2008 on the Wealth-Lab site under the thread: Alpha Power. Note: the Wealth-Lab 4 website has been shut down.*

*The Alpha Power trading procedures enable to view performance as a double exponential function. And I will restate here and now that the efficient frontier is just that, a frontier, and that it is relatively easy to jump over it and achieve performances way beyond the Buy & Hold.*

*The Alpha Power trading methodology is a different way of looking at the multi-period portfolio management problem. It says that short to mid-term trading over a share accumulation program can easily outperform the Buy & Hold on which is based the entire Alpha Power methodology.*

Trading over Accumulation Procedures

The **Alpha Power** trading methodology is intended to do more than just accumulate shares over time. One of the components is to trade over the accumulation process (as exemplified in the Berkshire Hathaway example). The accumulation process is view as a way to increase portfolio equity while the trading process is there to pump more cash into the system in order to increase the position size as the portfolio grows.

This is a complex process where everything needs to be balanced in order to minimize portfolio risk, maximize growth under portfolio constraints and maintain the primary objective which is to improve overall performance.

With random noise representing the major part of price data series, one wonders what could be used to effectively design and implement a short-term trading procedure that would not rely on luck. If the signal is totally drowned in the noise then what is the basis to execute a trade since buying implies that someone is looking for more than just a gamble, he/she is expecting a profit from the trading operation.

The Berkshire Hathaway accumulation example is, in a way, giving a hint of what might be considered a general framework. The accumulation program was based on a mathematical position sizing function financed by the excess equity buildup. It had some limitations like not having a safety net, being a long-only scenario, and as the portfolio grew so did the size of managing the excess equity buildup. All limitations can be curtailed to minimize risk by using additional procedures to control and guide the accumulative function in following more secure and productive functions.

Then, in an almost random environment, how is one to trade? What are the important factors to consider? How should the market data be analyzed? What useful information could be extracted that could give an edge? What about other players in the game; be it short, mid or long-term players? Questions, questions and more questions!

Maybe going back to the basics, looking at what a trading system entails could provide some answers. Which functions are at play and how the whole process can be viewed mathematically?

It was said that from the Schachermayer Pay-Off matrix any trading strategy could be described with the single holding function **H**. The Buy & Hold strategy was given as:

∑ (h_{o} . * **P**_{o} ) + ∑ (h_{o}**I** . * **∆a**x) with an error term: ∑ε → 0

where the available capital was used to purchase a quantity of shares h_{o} in each stock at their respective initial prices. The second part of the payoff matrix represents all the accumulated profits generated by the trading strategy h_{o}**I** where **I** is a matrix composed entirely of ones. Therefore, the holding matrix **H** has for every element the value h_{o}: the initial stock quantities purchased; thus making it the Buy & Hold equation.

The beauty and simplicity of the Schachermayer Payoff matrix is that it has only three variables, namely: price, quantity and time which is implied through ∆ax. There is no reasoning behind it, no emotions, no fundamental data or technical indicators, and no astrology. Nonetheless, whatever the trading method H used, it can be expressed using this payoff matrix.

## A Decision Surrogate

To exceed the Buy & Hold strategy, performance-wise, can only be done by making a better stock selection and/or changing the inventory levels over the investment period. The stock selection process was made the same for all methods treated in this article, therefore only the inventory levels, the holding function **H** is left as a means to improve performance.

The above pay-off matrix needs a decision surrogate to represent the decision-making process of buying and selling shares as the portfolio evolves over time:

∑ (h_{o} . * **P**_{o} ) + ∑ (h_{o}**ID** . * ∆**ax**) with **∑ε → 0**

where **D** is composed of (1, 0, -1) which stand for (hold long, no position, hold short) respectively. The first row of the **D** matrix is composed of ones to show its initial holding status in each stock. And transitions from row to row represents position decision changes if any.

Once the initial position set (first row = h_{o} = i* _{q}*), you need to determine a trade basis

**T**

_{j}(

*t*): the number of shares to be traded at a time (

**a**

*). Having a trade basis, a decision surrogate, there is a need for a regulator*

_{q}**R**

_{j}(

*t*): which will have the function to override, if necessary, the decision surrogate or other controlling functions.

The problem gets more complex. At times I would like to have a trade amplifier to increase the trading basis of a specific position. This trade amplifier **A**_{j}(*t*) could scale the trade volume up or down. And then, I need an enhancer **E**_{j}(*t*) to take advantage of where the price might be in its cycle or increase the position size as the portfolio grows. This would result in the following payoff matrix:

∑ (h_{o} . * **P**_{o} ) + ∑ (h_{o}**ITRADE** . * ∆**ax**) and ∑**ε** → 0

All the generated profit would depend on the evolution of the holding matrix which would control the inventory levels in each stock over the trading interval to produce the enhanced holding matrix **H**^{+}.

**H** → **H**^{+} = h_{o}**ITRADE**

The above equation just came out like that and, I think, it is quite appropriate. What I read is that for the holding function **H** to be improved, enhanced to **H**^{+} requires that** ITRADE** the price differentials ∆**P** starting from my initial position h_{o} in the market. It is in how I manage the portfolio that will make a difference. It is in the skills applied at managing the inventory that I will gain alpha points.

The holding matrix should have been written more like the one below to show that it remains a term-wise multiplication, but for simplicity and looks, I prefer the above equation.

**H** → **H**^{+} = h_{jo}**I** . * **T**_{j} . * **R**_{j} . * **A**_{j} . * **D**_{j} . * **E**_{j}

The regulating matrix **R**_{j}(*t*) is composed of other matrices based on an information arsenal comprising fundamental and technical market data combined with a human override **O**_{j}(*t*) which can liquidate from a single stock position to the entire portfolio.

The human override **O**_{j}(*t*) has for mission to protect the accumulated equity and operates like a trailing stop which has for origin human intervention not based on calculated fundamental or technical data but on experience and sentiment. For example, the first sell rating published by analysts in the Enron debacle in late 2001 was at $0.69 and I do think that an earlier override was indeed required no matter what was the consensus or the available market data at the time.

This is like designing a trading system from the outside in. You set what is required and then find ways to implement trading procedures that will respect the objectives and live within all the risk constraints applied at the portfolio level. Each matrix in the h_{o}**ITRADE** combo has for purpose to enhance, amplify, or reduce the trading basis within the parameters that are set to control objective settings and risk limits. The trading system, through its regulator, can even be overridden by human intervention; synonymous to pulling the plug when things go wrong.

## Designing a Strategy

The objective is to design a trading strategy that will outperform the Buy & Hold. For this purpose, the enhanced holding function **H**^{+} = h_{o}**ITRADE** was set as the inventory controlling function. It is how these matrices behave in time that will generate alpha points (see the example of the sparse matrix in Part II).

But a very basic question has not even been asked: what are the trading opportunities available, how can they be detected and how many are there? In light of the market exposure analysis done in Part II, such a question appear more than legitimate.

The Schachermayer equation in its simplicity lacks the explicit notion of how many trades are performed in a trading system. For the Buy & Hold strategy, the holding function **H** was simple: a matrix composed entirely of ones. But in a trading system, the inventory on hand would change and at times considerably. So I will recompose an equation used in the Jensen Modified Sharpe Ratio paper.

Over a portfolio’s lifetime, all stock purchases could be expressed as:

* QB^{j}_{n}* . *

**P**^{j}

*ordered sequentially with*

_{n}*t*ϵ [

*0, T*]; 1 ≤

*j*≤

*d*;

*n*= 0, …,

*n*

where *QB*^{j}_{n} is the number of shares bought at time *t* in some stock *j* at the then current price *P*^{j}_{n}. Summing over *n* and *j* will result in the total cost of all shares ever acquired over the trading interval.

∑ ^{j} ∑ ^{n} ( **QB**^{j}* _{n}* . *

*P*^{j}

*) = Total Cost*

_{n}*t*ϵ [

*0, T*]; 1 ≤

*j*≤

*d*;

*n*= 0, …,

*n*

For the special case where *n* = 0, it is understood that it is the initial position taken in each stock and is equivalent to ∑ (h_{jo} . * **P**_{jo} ).

We could add commissions paid to the total cost but in the end, they will be shown to be trivial in magnitude so I will not be concerned with them at this point. We can always put them back in at the end if needed.

The current value of the all-stock holdings at time t can be represented as:

∑ ^{j} ( **H**^{j}_{t} . * **P**^{j}* _{t}* ) = Current Value

which in turn is the net sum of all acquired shares valued at the current prevailing price.

∑ * ^{j}* (∑

^{n}**QB**^{j}

_{n})

**P**

*= Current Value*

^{j}_{t}Over the lifetime of a portfolio, some shares will be sold and the holding matrix which is the inventory of shares on hand **H** can be expressed as:

**H** = **H**_{j}**t** = ∑ ^{n} **QB**^{j}_{n} - ∑ ^{n} **QS**^{j}_{n}

and therefore, the Schachermayer payoff matrix equation could be re-expressed as:

∑ * ^{T}* [ ( ∑

^{n}

**QB**

^{j}

*- ∑*

_{n}^{n}

**QS**

^{j}

*) . * ∆*

_{n}

**P**^{j}

_{n}]

which simply restates that the profits accumulate based on the price differentials of the evolving inventory levels

The value of all closed positions could be expressed as:

∑ ^{T}**QS**^{j}_{n=c}**PS**_{jn=c} - ∑ ^{T} **QB**^{j}_{n=c}**PB**_{jn=c} value of closed positions

where *n=c* represents the trade number of a closed position. The above equation states that the total profit generated from closed positions is simply the proceeds from all the stock sales minus the total cost of their respective purchases. This could be the total profits generated if all acquired shares were sold. However, there is a need to account for the still opened positions:

[ ∑ ^{n} **QB**^{j}_{n} - ∑ ^{n} **QS**^{j}_{n=c}] **P**^{j}_{t} value of still opened positions

which leaves all shares bought, valued at the current price, from which all closed positions, up to time *t*, have been removed.

### The Making of a Profit

To resume, the trading strategy, to be implemented would require two elements:

First, we need a profit from the trading operations on closed positions:

∑ ^{T} **QS**^{j}_{n=c}**PS**^{j}_{n=c} - ∑ ^{T} **QB**^{j}_{n=c}**PB**^{j}_{n=c} > 0

Not all trades will be profitable, but at the portfolio level, the objective remains to make a profit. And therefore, one should look at this equation with an, on average, the sum of all closed positions generate a profit. Naturally, one is looking for the biggest spreads achievable between sell and buy prices on all closed positions. It seems implicit that one should seek methods to extend the holding period where feasible instead of hardwiring an exit.

Second, the still opened positions need also to be valued higher than their total cost:

[ ∑ ^{n} **QB**^{j}_{n} - ∑ ^{n} **QS**^{j}_{n=c}] **P**^{j}*t* > ∑ ^{T}**QB**^{j}_{n=o}**P**^{j}_{n}

This too is viewed at the portfolio level. You can still have open positions that are in the red but for the total, the objective remains, long-term, to have the value of the current holdings higher than the average of their total cost to show an overall profit.

What can we learn from these two equations? From the first, the really obvious, you need a trading edge. Going long or short, you need on average the value of what you sold is higher than the price you paid. What is not so obvious is that even though all the trades occur over time, time itself is not part of the equation; just volume and price are. There is no reason given for the closed positions nor is any logic associated with the trade. All that is given is that to make a profit from a trading operation you need on average to sell at a higher price than your cost. The method to achieve this, for the moment, is irrelevant; but it does raise the subject of portfolio level restrictions.

The first restriction encountered is the portfolio’s available capital. At all times, it is required not to lose it, otherwise, game over. So this will limit the number of stocks over which to trade and the number of simultaneous trades over said stocks over any given period. A compromise will need to be reached in order to balance the number of trades to be taken over the number of stocks available within the tradable opportunities offered. At all times, the portfolio needs to be self-financed in the sense that the sum of all trading operations does not result in the loss of the entire capital.

∑ * ^{T}* [ ( ∑

^{n}

**QB**^{j}

_{n}- ∑

^{n}

**QS**

^{j}

_{n}) . * ∆

**P**

^{j}

_{n}] > - Capital

The restriction is not trivial as it will limit, especially in the beginning, what can be done over the life of the portfolio. And as the portfolio grows with its over-diversification approach the notion of self-financing will change.

What I think was not shown explicitly in the Schachermayer pay-off matrix is *n*, the number of trades. It might not look like much, but it can have a significant impact on the portfolio. You find an edge and then repeat it as often as you can. Or find a trading opportunity that can be repeated a great number of times and execute all you can within your available resources.

This seems to supersede other considerations you may have concerning your trading strategy. On one hand, you have the Buy & Hold strategy where *n* = 1; and on the other you may have *n* > 10,000 trades a day trading on a relatively small edge.

So it is not enough to find an edge; it is preferable to find one that also has a high frequency of occurrence. Even there, compromises will have to be made as n increases. At some point, it will become more pressing to automate the trading procedures. What you could do easily on a small n now becomes almost impossible to do by hand as *n* (the number of trades) increases.

### A Game Changer

You started out trying to find a trading edge and end up with trying to find repeatable tradable opportunities. You thought that all the energy should be spent looking for an expected profit while all the time the number of trades (*n*) was a more pressing matter. It is a slight change in perspective, on how you view the game and on how you intend to profit from it.

All this writing helped me better understand my simulation results as it served as a reasonable explanation to what I could plainly see. In all cases, when I was increasing *n*, performance would increase accordingly. Since there were no attempts at predicting anything, and in some cases, entries were triggered to a large extent by a random function, it had to be in the mix of trading procedures that one could find an explanation. The fact that I was using the excess equity buildup to trade over the accumulative process was generating a feedback loop reinforcing desirable portfolio behavior.

You put mathematical functions that span the whole trading interval not as technical indicators but as guidelines as to what to do in the event of… You set for objective to do as many trades as possible within the constraints of available capital while at the same time accumulate shares for the long term using the excess equity buildup. It becomes as if at every price cycle of significance you are pumping more cash in the account which can then be used to acquire more long-term shares while also increasing the short term trading volume.

The principles are simple. I would say: buy and keep on buying using the accumulating profits. When you have a nice short-term profit, take it and continue buying the stocks that are going up. I think that Will Rogers might have said it best, but I would change one word of his saying: “Don’t gamble; buy some good stock and hold it till it goes up, then sell it. If it don’t go up, don’t buy" more.

**Created on ... September 28, 2011, © Guy R. Fleury. All rights reserved.**