Portfolio Design

Advanced concepts in stock investment portfolio design.  Fundamentals, technical analysis and many other related topics are discussed.

Market Timer: Adding an Indicator

In the previous post (Build A Market Timer Using High/Low Beta) I described a Portfolio123 ranking system that provides a foundation for multiple indicators and a voting system that maps the scoring result to one of two Exchange Traded Funds (ETFs). This post expands on this concept by adding a second indicator into the ranking system.


Some time ago, I wrote an article called Timing The Market With Perceived Credit Risk. The idea behind the perceived credit risk indicator is that a rising value of the TED Spread signifies bank loan credit risk.  I then demonstrated that comparing a 50 day Exponential Moving Average (EMA) against a 200 day EMA (i.e. EMA(50) > EMA(200), provides a modest RiskOn-RiskOff indicator. 

This post demonstrates how the TED Spread indicator can be added to the Market Timer ranking system. It is actually quite simple to do. Start by adding a new ETF Formula node under Indicator_Definitions.  In the formula box enter the following:

EMA(50,0,##TEDSPREAD) / EMA(200,0,##TEDSPREAD) < 1

Note that the normal condition of the indicator (RiskOn) is when the TED Spread is falling. Thus, "< 1" is used as the True/False test.

Add a label to this node and make sure that the 0/1 Boolean values radio button is set.  Then click on UPDATE followed by Save.

Screen shot of TED Spread node being added to Indicator_Definition

Screen shot of TED Spread node being added to Indicator_Definition

Now click on Indicator_Definition then WEIGHTS. Set the weights for the two nodes to 50 and 50. Click on UPDATE then Save.

Screen shot showing the equal weightings for the two nodes defined under Indicator_Definition

Screen shot showing the equal weightings for the two nodes defined under Indicator_Definition



No changes need be made to the simulation. Simply re-run it.  Below is a comparison of the old backtest results versus the new results.  They are almost the same.

Screen shot of backtest results for the previous Market Timer

Screen shot of backtest results for the previous Market Timer

Screen shot of backtest results for the new Market Timer

Screen shot of backtest results for the new Market Timer


A comparison of trade statistics has resulted in an average profit per trade going from 3% up to 6.5%.

Screen shot of backtest trade statistics for the previous Market Timer

Screen shot of backtest trade statistics for the previous Market Timer

Screen shot of backtest trade statistics for the latest Market Timer

Screen shot of backtest trade statistics for the latest Market Timer


Adding the credit risk indicator to this ranking system did not increase the overall performance but did more than double the average profit per trade.  The next step will be to find additional indicators that are more or less different from those already in use. The more independent indicators that are used, the higher the likelihood of future profitability.