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



Wednesday, December 14, 2011

Risk Alchemy with Precious Metals

By Fred Novomestky, Ph.D

Alchemy is one of those magical words that bring to mind the workings of a medieval magician or sorcerer. They would transform base metal to gold. Another interpretation of the word is “the process or power of transforming something common into something special.” In the blog Managing Downside Loss with Gold, we used the Upside Reward Downside Loss Frontier chart to both highlight the potential value of gold to both enhance reward but minimize downside loss. We also explored allocations to individual asset classes and portfolios that resulted in minimum downside loss. Let’s see how well we can transform into something special the downside loss and upside reward of portfolios of financial assets by including precious metals or gold by itself.

We maintain the same empirical framework that has been used in the past several blogs. We observe the performance results of four distinct portfolios: all stocks, all bonds, 40% stocks 60% bonds and 60% stocks and 40% bonds. These portfolios are analyzed over four non-overlapping time periods: 1991 to 1995, 1996 to 2000, 2001 to 2005 and 2006 to 2010. The basic portfolios are assumed to be passively rebalanced to the corresponding asset mixes at the beginning of each month. Tables 1 through 4 summarize the return statistics for each of the portfolios and precious metals and for each time period. The reader should refer to the blog Portfolio Strategy and Gold [include a link for this blog] to see the corresponding statistics for gold futures. The investor should be concerned about the observation that the downside loss for precious metals has been greater than most portfolios across most of the time periods.

The blog Blending Financial Assets and Precious Metals has shown that the weak or negative correlation of financial assets with precious metals can be the magic ingredient for transforming downside loss. When you look at the correlation coefficients in Table 5 that compare and contrast the correlation of the portfolio returns with both gold alone and precious metals, you get a sense of how dynamic these relationships are. Furthermore, with gold and silver equally weighted as we recommended in All That Glitters Is Not Gold, the resultant mix appears to be more correlated with the asset portfolios than gold alone.

Figures 1 through 4 present the upside reward to downside loss efficient frontiers for the four portfolios. The minimum downside loss portfolio changes over time with corresponding exposure to gold and precious metal summarized in Tables 6 and 7, respectively. The first piece of alchemy is the reduction of downside loss when asset portfolios are combined with gold and precious metals. Tables 8 and 9 summarize the effect. For example, the downside loss in Table 8 for All Stock without gold is the measure for the portfolio with 0% exposure to gold. The downside loss for All Stock with gold is the measure for the minimum downside loss portfolio. In all cases downside loss for a portfolio with gold or precious metal is less than or no worse than the downside loss for the portfolio with financial assets alone. Yet, it is hard to see the difference between gold alone and precious metals.

Let’s take a look at the effect of gold and precious metals on getting the best upside reward. Tables 10 and 11 show the allocations to gold and precious metals, respectively, that are associated with the maximum upside reward. It is disappointing to see that you either have no exposure to these commodities or convert the entire portfolio to a commodities portfolio. The problem is the static nature of the asset allocation process with the passive rebalancing to fixed exposures to financial assets and the commodities. Commodity trading advisors (CTA’s) are adept at dynamically adjusting the exposure to commodities to get the greatest value to investors. Tables 12 and 13 show the effect of our passive strategy with upside reward improving with or without the use of commodities in a rather naïve and unrealistic manner.

We’ve seen how gold and futures can transform conventional downside risk in financial asset portfolios into something special. To get the best improvement in upside reward requires a more dynamic investment strategy.


Click to Enlarge










Sponsored by: EMA Softech