Portfolio Design

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

Adaptive Ranking Systems Part 1

In this multi-part series, I am going to demonstrate how to incorporate market timing into ranking system factors, making the factors essentially adaptive based on market conditions. The first factor I will start with is SiRatio, one of my all-time favorites.

Quant analysis tools provided by Portfolio123.


One of my favorite company factors is the Short Interest Ratio (SiRatio), one of the best performing factors I have ever seen, particularly for Large Cap portfolios.  Portfolio123 defines this factor as "the number of days it would take to cover the Short Interest if trading continued at the average daily volume for the month. It is calculated as the Short Interest divided by the Average Daily Volume."

But there is one drawback:  SiRatio suffers from a phenomenon called "factor reversal" at certain times, in particular in times of high volatility.  For this reason, it is advantageous to either switch the factor off, or at least tone it down during these adverse periods of time. This tutorial is about that... how to create a SiRatio ranking system that adjusts to market conditions. Part 1 will provide the basics of creating a baseline ranking system and simulation.  In future posts, it will be shown how market timing can be built into the ranking system factor in order to improve the factor's characteristics.

First, lets create a one factor ranking system called "Adaptive SiRatio", and add one factor: SiRatio.  This ranking system with one factor will be used as a baseline for comparison purposes.  Later on the ranking system will be modified so that the factor will be adaptive.

Screenshot of a one factor ranking system consisting of the Short Interest Ratio

Now create a simulation to be used as a benchmark using this ranking system.  The general setup is below. Be sure to set commission to $0, along with fixed slippage to $0.  The simulation will not result in a practical, tradeable system with high profit per trade. The focus will strictly be on demonstrating how an adaptive ranking system may improve the characteristics of a simulation.

Be sure to set the rebalance frequency to Weekly, and set "Allow sold holdings to be re-bought at current rebalance" to Yes.

Simulation general setup

Set the "% of Portfolio Value" to 10.0. The approximate number of positions held at any given time will be ten.

Simulation position sizing - 10 stocks

Select the "S&P Index" as the stock universe and "Adaptive SiRatio" as the ranking system,

Simulation stock universe and ranking system selection

Do not enter any Buy rules.

Simulation Buy rules

Set the single Sell rule to TRUE.

Simulation Sell rules

Set the time period to the maximum allowed for your membership level.  If you have an advanced membership then skip past 1999 to 2000 as the start date. Click on RUN SIMULATION to generate the simulation.

Simulation period and restrictions

The backtest results are pretty darned good for a S&P 500 portfolio.  Keep in mind that this model is not practical, as the profit per trade is very low. One would have to add buy and sell rule in order to get the turnover down and profit per trade up.  This backtest will be used as the baseline.  What is of interest is the Maximum Drawdown of -68.9%.

Simulation backtest results

What is of interest is the Maximum Drawdown of -68.9%. In the next part to this series, I will explore ways of how the ranking factor could be modified in order to reduce drawdown.