Levy Relative Strength (upgrade vs castout)

Dear fellow oar pullers,

Robert Levy in his pioneering 1968 book, "The Relative Strength Concept of Common Stock Forecasting", suggested two approaches to running an rs portfolio, upgrade and cast out. As I understand it, SetBacktestMode(backtestRotational); implements the upgrade approach in which the best n stocks are always held as determined by something like this:

MaxPositions = 10;
SetOption("MaxOpenPositions", MaxPositions );
SetOption("WorstRankHeld", MaxPositions);

If the relevant watchlist held 100 symbols then the following would create and run a fully invested portfolio consisting of ten roughly equal positions in the ten highest ranked stocks as determined by the PositionScore variable.

SetPositionSize( 100 / MaxPositions, spsPercentOfEquity);

Whenever a stock fell below a rank of ten it would be sold and replaced by a stock ranked >= 10 that is not already held. And this would allow trimming to maintain roughly equal position sizes.

SetOption("AllowPositionShrinking", True); 

Is that all correct? If so, I will post my actual question in my next message.

As always a big thank you to all!

 John
1 Like

Ranks work the other way, with Rank 1 being better than Rank 2. So replaced by a stock ranked <=10.
And worst rank held does not have to equal the Max Positions, so to reduce turnover you may want to hold a previously ranked (top 10 in your example) stock until it drops to a lower rank. For example 12th, 15th, 20th etc.

SetOption("WorstRankHeld", 15);
1 Like

Ah, so in my example with a watchlist of 100 and a portfolio of ten positions upgrade would be:

SetOption("WorstRankHeld", 10);

and castout at the 50th percentile would be

SetOption("WorstRankHeld", 50);

Correct?

 John

Yes, at least that is my understanding. And to quote the user guide
" Once position is entered in remains in place until security's rank drops below WorstRankHeld (settable via SetOption("WorstRankHeld", 5 ) )"

1 Like

I read that guide a number of times without seeing that. Better take the blinders off.

Thanks,

  John

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.