PctDev and Benchmark

Is it possible to calculate the PctDev of the benchmark in buy/sell rules in a simulation or portfolio? If so, what is the formula? If not, are there any alternatives?

We need to add the ‘series’ parameter to the PctDev function, and a few others

I am curious as to whether this update was incorporated? I am trying to establish a buy rule that that would only buy when the annualized volatility of the Russell 2000 over the past 20 days is less than 30%. This is how I have established a corresponding indicator in EasyLanguage for reference:

Value1 = (Close-Close[1])/Close[1];
Value2 = StandardDev(Value1, 20, 2);
Value3 = Value2 * SquareRoot(252) * 100;
Plot1( Value3, “Plot1” ) ;

Try this formula: [font=courier new]LoopStdDev(“Close(CTR, #Bench) / Close(CTR + 1, #Bench)”, 20) * (252 ^ 0.5) < 0.3[/font]
If Russell 2000 is not your benchmark, replace [font=courier new]#Bench[/font] with [font=courier new]$RUT[/font] to indicate it directly.

Instead of 23492, wouldn’t $RUT also work?

Walter

Yes, thanks. I changed it in the original post.