The WinWayCharts EDScode based on Markos Katsanos’ article in this issue, “A Technical Method For Rating Stocks,” is shown below.
Synopsis from Stocks & Commodities June 2018
I’s it possible to create a stock rating system using multiple indicators or other technical criteria? If so, how does it compare with analyst ratings? Investors around the world move billions of dollars every day on advice from Wall Street research analysts. Most retail investors do not have the time or can’t be bothered to read the full stock report and rely solely on the bottom line: the stock rating. They believe these ratings are reliable and base their investment decisions at least partly on the analyst buy/sell rating. But how reliable are those buy/sell ratings? In this article I will present a technical stock rating system based on five technical criteria and indicators, backtest it, and compare its performance to analyst ratings.
!A TECHNICAL METHOD FOR RATING STOCKS
!Author: Markos Katsanos, TASC June 2018
!Coded by: Richard Denning, 4/18/18
MAP is 63.
STIFFMAX is 7.
VFIPeriod is 130.
MASPY is 100.
MADL is 100.
SCORECRIT is 5.
W1 is 1.
W2 is 1.
W3 is 1.
W4 is 1.
W5 is 2.
COEF is 0.2.
VCOEF is 2.5.
Avg is ([high]+[low]+[close])/3.
inter is ln( Avg ) - ln( Valresult( Avg, 1 ) ).
vinter is sqrt(variance(inter, 30 )).
cutoff is Coef * Vinter * [Close].
vave is Valresult(simpleavg([volume], VFIPeriod ), 1 ).
vmax is Vave * Vcoef.
vc is Min( [volume], VMax ).
mf is Avg - Valresult( Avg, 1 ).
vcp is iff(MF > Cutoff,VC,iff(MF < -Cutoff,-VC,0)).
vfitemp is Sum(VCP , VFIPeriod ) / Vave.
vfi is expavg(VFItemp, 3 ).
ma100 is Avg.
CLMA if [close] < MA100.
STIFFNESS is countof(CLMA,MAP).
! MONEY FLOW:
COND1 is iff(VFI>0,1,0).
SMA is simpleavg([close],MADL).
COND2 is iff([close]>SMA,1,0).
COND3 is iff(SMA>valresult(SMA,4),1,0).
COND4 is iff(STIFFNESS<= STIFFMAX,1,0).
SPY is TickerUDF("SPY",[close]).
COND5 is iff(EXPAVG(SPY,MASPY)>=
SCORE is W1*COND1+W2*COND2+W3*COND3+
buy if Score>=SCORECRIT and hasdatafor(300)>=268.
Figure 11 shows the summary results of a backtest using NASDAQ 100 stocks during a generally bullish period from April 2009 to April 2018. Figure 12 shows the backtest using the same list of NASDAQ 100 stocks during a period that had two bear markets (April 1999 to April 2009). The average results are similar except that there are fewer trades during the period that contained the two bear markets. Both backtests use a fixed 21-bar exit.
FIGURE 11: AIQ, BULL MARKET. Here are the summary results of a backtest using NASDAQ 100 stocks during a generally bullish period from April 2009 to April 2018.
FIGURE 12: AIQ, BEAR MARKET. Here are the summary results of a backtest using NASDAQ 100 stocks during a period from April 1999 to April 2009 that contained two bear markets.