Portfolio Design

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

Adaptive Ranking Systems Part 2 - Testing SiRatio

In Part 1 of this series, a single factor ranking system and simulation were set up for testing purposes. The factor used in the ranking system was Short Interest Ratio (SiRatio), with the lower the ratio the better. The simulation produced good results, but the 68% drawdown is a serious detraction.

In Part 2, I will explore the drawdown characteristics in greater detail, which if all goes well, will lead to a better ranking system factor.

Stock market analysis tools provided by Portfolio123.

First, lets review what was done in Part 1.  A single factor ranking system called Adaptive SiRatio was set up as shown below. The name of the ranking system anticipates the future use of SiRatio in an adaptive manner. At present, the ranking system consists of SiRatio as a static factor.

Single factor ranking system used in Part 1.

A ten stock simulation was then created using:

  • the Adaptive SiRatio ranking system
  • the S&P 500 stock universe
  • no Buy rules
  • one Sell rule (TRUE)
  • The commission was set to $0 and slippage set to Fixed 0.0.
  • Weekly rebalance
  • Stocks allowed to be rebought at current rebalance

The simulation backtest results are shown below.

Note: there was no attempt to create a practical trading system. The profit per trade is extremely low and commission/slippage would wipe out any profits. In order to make this a practical trading system, Buy and Sell rules would need to be added, but doing so would contaminate this exercise, as the focus is on the ranking system factor, not Buy/Sell rules.

Simulation backtest results from Part 1

As can be seen from the above results, SiRatio is a powerful ranking system factor, especially considering it was tested against S&P 500 stocks. The maximum drawdown is very extreme at -68%. It would be very useful to be able to reduce the drawdown for this single factor test.

Now for today's activities. I will start by adding a Buy rule to the simulation: 


This Buy rule does nothing by itself.  It is essentially a place-holder that will be used by the simulation Optimizer. If you are following along, then add the Buy rule. Then re-run the simulation as shown below.

Buy rule added to the simulation

The next step is to copy the simulation to the Optimizer as shown below.

Simulation is copied to the Optimizer

A dialog box will pop up. Save the optimization study as shown below.

The Optimization study is saved

The Optimization study is saved

Now comes the fun part, adding  optimization permutations for the the simulation. Click as shown below to add permutations.

The process of adding optimization permutations is initiated

Now, by clicking on [copy], and modifying the number after "<=", generate as many permutations as your membership level will permit. I have a manager-level subscription so I can generate 50 permutations in total.  If you have an advanced membership you should be able to generate 20 permutations.  If that is the case then you may have to split this exercise into three or more runs.

Permutations for the Buy rule are added

For my optimization, I added permutations from Eval(FRank("SiRatio",#All,#ASC)<=99,TRUE,FALSE) all the way down to Eval(FRank("SiRatio",#All,#ASC)<=51,TRUE,FALSE).

When the optimizer runs each permutation, the Buy rule corresponding to the permutation will cause the stocks above the rank threshold to be tossed out. In other words more and more top stocks will be rejected for each simulation run.

Click on UPDATE when finished adding the permutations.

The permutations are generated as shown below.

Permutations are generated using the pull-down menu

Now run the optimizer. Charts take up a lot of screen space and don't add value for this exercise so I recommend that you toggle Charts so they are not displayed.

The simulation optimizer is run using the pull-down menu

The results from the optimizer should look something like the figure below.

Optimizer results

For further processing and analysis, the results can be downloaded to EXCEL

Results are downloaded to EXCEL using the pull-down menu

After capturing the results in EXCEL, I plotted the rank threshold versus drawdown. For each decrease of one in rank threshold, approximately five of the ten stocks in the portfolio's weekly holdings are replaced. The raw results are not very smooth. By applying a moving average of 5 runs at a time with decreasing rank i.e. Average(96:100), Average(95:99), Average(94:98), ... Average(51:55), one can see that there is a definite reduction in maximum drawdown as the ranking threshold is reduced down to Average(70:74), where it is a minimum.  Below that, the maximum drawdown gets larger and erratic. See below.

Analysis of results in EXCEL show that maximum drawdown is reduced by rejecting top-ranked stocks

This experiment demonstrates that maximum drawdown can be reduced by throwing out the top-ranked stocks. The maximum drawdown, in all likelihood, occurs with factor inversion during times of financial stress. When financial stress occurs, large players such as hedge funds de-leverage, driving the price of stocks with a low SiRatio down more so than heavily shorted stocks.

Of course, rejecting the top-ranked stocks will also reduce overall profits when there is no financial stress in the marketplace. The question is  Can we have our cake and eat it too? Perhaps the answer will be found in Part 3.