July 8, 2012

After the conclusion of my previous note: Changing the Game II, it was time to put the finishing touches on the Excel file.

This file is a working model designed to showcase some basic trading principles and methodology. It is not an end-all, but it does show that accumulating shares and trading over this accumulative process can generate profits even if the entries and exits are taken at random.
May I offer the Excel file that generated all the charts in Changing the Game II. (This file is no longer available)
The file randomly generates stock price variations, to which is added a drift and price gaps (fat tails, outliers). The trading strategy uses random functions to generate unpredictable trades without knowledge of prices, past or present, during the whole trading interval. It is all explained in my previous notes: Changing the Game I & II.
 

You don't want to flip a coin every day! It is not the nature of the game. You need some ΔP to make a profit, and that takes some time or predictive skills.

One should consider that applying some of the same trading principles where prices can have some predictability, even at a low level, and where you can predetermine the kind of trading strategy that you would want to implement should easily produce better results. Many of my simulations show just that.

Using random-like trading might not be the most efficient method of trading, even if it does produce profits. However, I think it can provide some insight into improving one's own trading strategies.

The Excel file highlights the concept that accumulating shares over many stocks over a long-term investment period might be sufficient to generate some alpha. This accumulation process, over the trading interval, can be created using a simple trade imbalance. It's like following the trend: accumulate shares as prices go up, sell some of the shares, and go back to accumulate, on average, some more shares (see the Stock Holdings graph).

The trading game is more like an investment game than a gambling game. One needs a long-term vision: what will happen as time goes by? I expect that, given more time, the strategy provided would simply continue to trade over its accumulative process. Using a 1-year time interval only shows part of the long-term objectives designed in the trading procedures.

Notice the graph "Executed Trades" in my previous note, where some shares are sold at the bottom while others are bought at the top. But overall, still generated some profits due to the accumulating inventory.

Some Operational Notes: 

The spreadsheet is not restricted in any way. It is intended to serve as a basic working model, a framework to test your own ideas using your own trading methods. IMHO, it should raise a lot of questions about the trading methods we use. There is no fundamental data here, no technical analysis, no statistical analysis, and no astrology measure. Just plain random price data and plain random trading strategies.

Red cells and cells with red triangles in their upper right corners contain additional information pertaining to the selected cell or its surroundings. This Excel file is just the beginning, a crude example of what can be done. I think, that it should lead to considering other ways of designing trading strategies H that better suit one's own requirements.

Recommendations: start by making a copy of the file in order to keep all the default settings intact. This way, you will be able to explore, make changes, and keep the ability to return to a known state. As you advance, again, make copies of your improvements to later compare how your own methods evolved.

This is not a game with a single answer. But one thing I am sure is that as you modify this Excel file, you will be making it your own and, most importantly, understand what is going on behind all the equations to make it do what you want.

The spreadsheet has about 65 columns with some 340 rows. May I also suggest some exploration and a lot of pressing F9 to get familiar with all that is happening in the file. There are side effects to the equations used that need to be understood before making modifications to the formulas.

Start by making changes to the yellow cells which control the trading environment. For example, increasing the initial trade quantity will have an effect not only increasing the initial required capital but also enabling reaching auto-financing earlier, and from that point on, have the market pay for the accumulative process in the sense that the accumulating profits are paying for the new purchases. A simple Buy & Hold scenario only needs to set the trading basis and the sell enable to zero.

Continuously pressing F9 will generate test after test, and if located near a cell or a chart that displays the portfolio's generated profits, will show that a negative number does not happen often. And if you modify some of the formulas, your goal should be the same: no or a low number of negative results.

The Portfolio Generated Profits chart (on the far right) shows the net result obtained by trading strategy applied to the ΔP matrix. It is the total profit or loss left after liquidating all the stocks in the portfolio. Your objective is to keep it positive and exponential as much as possible. Underneath the Portfolio Generated Profits chart, you will find the Executed Trades. It shows, for stock 1, how trades were distributed as well as the inventory level as it changed over time.

The Trading Environment

In its default setting, the trading strategy H creates a trade imbalance: it buys 3 units while only selling 2 at a time. The independent Buy and Sell functions are randomly generated with a probability of about once a month. Therefore, over time, shares should be accumulating at a rate of about 1 unit per month.

Such a strategy resembles a kind of dollar cost averaging method where trades are not set on dates but at random times, and it is more like fixed quantity averaging. The residue of the trade imbalance, the accumulating inventory, serves the same purpose as averaging into a position.

This makes this particular strategy a long-term proposition. It is not a day trading method and is based on a long-term view of the market. Technically, pen, paper, and a quarter might be sufficient to implement such a trading method.

The price matrix is structured to have random price variations of varying amplitude, with unpredictable price jumps and long-term drift. All prices were normalized to the same starting point without loss of generality. This way, they could all be treated the same. And since prices are randomly generated, it is like picking 10 stocks at random from an infinite stock universe. Each time you press F9, a new independent future is generated.

The trading strategy has a long-term view of playing the game. It should sound reasonable to also select stocks with a long-term view of the market. Prices being quasi-random, they have been made to resemble a Paretian distribution with fat tails.  They can exhibit trends of various durations, cyclic moves, and patterns of all sorts. The long-term view in the price structure is expressed with the low drift value. The random price gaps (outliers), which have an average frequency of about 20 weeks and serve as rare events, are a warning sign to play it safe.

In real life, one would select a stock to be included in his/her long-term portfolio based on their long-term view of that particular stock. If you want to do a kind of constant volume averaging (a long-term strategy), you might as well select stocks that you think might go up long-term. And if, after some time, you find that your selection will not go where you thought it should, then liquidate the position, accept the loss, and move on. Make another long-term selection.

The 2008 Jensen Modified Sharpe paper provides the mathematical background for the trading strategy presented here. Especially pages 28 to 35 which deal with the equations pertaining to the initial trade and trade basis. It should be noted that in the 2008 paper, prices might have been randomly generated, but the set of trading rules and procedures were not.

Over the past 4 years, all these methods have evolved and improved. As I gained a better understanding of the forces at work and designed better mathematical structures, I always kept a long-term view of market prices. I still can not predict what the future will be, but I am ready to take the bet that it will lead to better things, not worse.

There are many ways to improve the trading strategy and performance levels in the Excel file. One could add matrices to help achieve better trading decisions, set other matrices to control trading behavior, set information matrices to analyze prices, or add indicator matrices of all sorts. One could also expand the matrices to, say, 100 stocks by 2,500 or 5,000 trading days. This last point would help better understand the long-term effects of the trading procedures used.

My highest priority is to find ways to reduce the doubling time, even if it takes me time to do so.

Hope you found it interesting.


Created... July 8, 2012,    © Guy R. Fleury. All rights reserved