TechnicalStockRatingStrat

Description

The Technical Stock Rating strategy is based on a stock rating system developed by Markos Katsanos. The strategy uses rating scores provided by the eponymous study to add simulated buy orders. The score is calculated based on stock performance in terms of meeting five technical analysis criteria.

The following criteria are taken into account when assigning a rating to a stock symbol:

  • Money flow: This criterion is met if the symbol's current Volume Flow Indicator value is positive.
  • Trading above average: This criterion is met if the close price is greater than its simple moving average (SMA).
  • In uptrend: This criterion is met if the SMA value has increased over the last four bars.
  • Trend quality: This criterion is met if the total number of crossovers between the price and its moving average during the lookup period does not exceed a certain value.
  • Overall market direction: This criterion is met if the exponential moving average of the appropriate market index has increased over the last two bars.

The stock symbol receives one point for meeting each of the above criteria if all the weights are set to 1.0. By default, only the "overall market direction" weight is equal to 2.0; however, you are free to assign the weights according to your preferences.

By default, the strategy adds a simulated buy to open order if the currently selected stock receives a rating score of 5.0 or higher. A simulated sell to close order is added when a specified number of bars elapses since the entry, which is by default set to 63.   

Input Parameters

Parameter

Description

vfi length

Defines the period for which the Volume Flow Index is calculated. Used when checking for the "money flow" criterion.

average length

Defines the period for which the simple moving average is calculated. Used when checking for the "trading above average" and "in uptrend" criteria.

trend quality length

Defines the lookup period for checking for the "trend quality" criterion.

exit length

Defines how many bars are to elapse since the simulated entry for the simulated sell to close order to be added.

max stiffness

Defines the maximum number of times the price is allowed to break through the SMA during the "trend quality" lookup period.

market index

Defines the market index to check for the "overall market direction" criterion.

score crit

Defines the minimum stock rating score for the simulated buy to open order to be added.

weight for money flow

Defines the weight for points scored for meeting the "money flow" criterion.

weight for trading above average

Defines the weight for points scored for meeting the "trading above average" criterion.

weight for uptrend

Defines the weight for points scored for meeting the "in uptrend" criterion.

weight for trend quality

Defines the weight for points scored for meeting the "trend quality" criterion.

weight for market direction

Defines the weight for points scored for meeting the "overall market direction" criterion.

Further Reading

1. "A Technical Method For Rating Stocks" by Markos Katsanos. Technical Analysis of Stocks & Commodities, June 2018.

Backtesting is the evaluation of a particular trading strategy using historical data. Results presented are hypothetical, and there is no guarantee that the same strategy implemented today would produce similar results.

Technical analysis is not recommended as a sole means of investment research.

For educational purposes only. Not a recommendation of a specific security or investment strategy.