Tuesday, December 20, 2011

Algorithmic Trading of Precious Metals

By Fred Novomestky, Ph.D

Algorithmic trading has become both a significant new trend in financial markets and for many seasoned professionals, a pariah. A closely related concept is high frequency trading. A brief check of Wikipedia gives you a concise description. There are two important characteristics of algorithmic trading which is also known as Algo, Black-Box, or Robo trading. The first is the use of electronic platforms for entering trading orders. The second is the use of algorithms or quantitative oriented decision making tools that determine the timing, pricing, or quantity of the order. Often the orders are initiated without human intervention.

Algorithmic trading has been in use for decades even before the advent of electronic financial markets. Buy side institutional investors with in house index funds have performed periodic re-balancing of their portfolios using block trading. In principle, algorithmic trading can be used for all asset classes and any investment strategy. In 2006, more than one third of all European Union and United States stock trades were driven by automatic programs. This trend is expected to continue to grow. In the words of Thomas Friedman (author of The World Is Flat) , “Access to electronic markets has contributed to leveling the playing field among institutional and individual traders.”

There is of course a dark side to automatic systems. First of all is their black box nature. Traders tend to have an intuitive view of how the world works. When pitted against numbers spewing from a mathematical model, sometimes the intuition is lost. The Flash Crash of May 6, 2010 was impacted by both algorithmic and high frequency trading.

This blog looks to evaluate the value of daily re-balancing of a portfolio that combines fully margined gold and silver futures contracts. All the previous blogs on precious metals have assumed that all portfolios are rebalanced at the end of each month. We will illustrate a very simple, transparent, and intuitive algorithm for re-balancing these two commodities. There are two underlying features of the model. The features mimic the behavior of options traders. The first is to let the profits run. As one commodity tends to do better than the other, move more capital towards that commodity. The second is to cut the losses short. When the total portfolio is losing value, lock in the profits and reduce exposures. The relative valuation is through the changes in allocation between the two commodities.

Tables 1 and 2 illustrate the strategy for the time period December 31, 1990 to January 31, 1991. On market close of December 31, 1990 the allocation to gold and future is set to equal weight just as our favorite precious metal portfolio in previous blogs. These are highlighted in the pair of columns with the label Begin Weight. These percents are applied to the portfolio value which is initially $1,000,000. The next two columns show the beginning market values of the positions. The daily returns of the gold and silver futures contract appear in the pair of columns called Total Return. These returns are applied to each of the beginning values to obtain the Gains and Losses.

Continuing with Table 2, the gains and losses are applied to the beginning values to obtain the End Values for each position and the total portfolio. A note is made if the end value of the portfolio has increased since the previous day (+1) or decreased (-1) in the Increase column. Using the end values, the End Weights as a percent of total portfolio value are computed. The next two columns show the change in the weights of the gold and futures from the begin weights to the end weights. This tells us information about the relative performance of the two commodities. For January 2, 1991 there is no change in weight due to zero returns. For January 3, 1991, the change in gold was -0.73% while the change in silver was +0.73%. This indicates that relatively speaking, silver outperformed gold. Also, with a +1 in the Increase column, the value of the portfolio increased. The Target Weights are computed using a simple formula which is [End Weight] + [Increase] * [Multiplier] * [Change in Weight]. The Multiplier amplifies the effect of the small change in exposure and the value used is 10. The New Weights are the Target Weights with a trading filter which is common in algorithmic trading. No position is allowed to go below 5% or above 95%.

We now look at two algorithmic traders. Mr. Rip Van Winkle has a program in which the equal weights are reset and the end of each year and we refer to his strategy as the Annual Re-balance. The second trader is Mr. Luna Plena and he resets the equal weights at the end of each month. We refer to his strategy as the Monthly Re-balance. Tables 3 through 6 show our standard summary statistics for the two strategies compared to our passive end of month re-balancing and the two underlying commodities. There is evidence to suggest that more frequent trading seems to add value over a simple month end re-balance.

Figures 1 through 4 are the acid test by looking a cumulative wealth starting at $100 and going through the end of each five year time period. Looks like dynamic trading works except in Figure 4. The extreme drop began in 2007 as the full effect of market turbulence took hold.

With care in the design and implementation, algorithmic trading can provide superior performance results. A caveat is that we did not include trading costs, which if not carefully managed, can take away from the benefits of algorithmic trading.


Click to Enlarge








Sponsored by: EMA Softech



2 comments:

  1. Algorithmic and high frequency trading both are same..But the difference is that algorithmic trading is used to implement large scale, economic views on asset prices, whereas HFT systems place automated, small scale structural inefficiencies.

    ReplyDelete
  2. I'm always afraid to jump into algorithmic trading - have you found it to be one of the most effective strategies for wealth?

    ReplyDelete