Signal Noise Ratio
Posted: Mon Jun 01, 2015 9:40 pm
I'm attempting to code up a Signal Noise Ratio as seen in Trend Following with Managed Futures by Greyserman and Kaminski
The formula is essentially:
Abs((Price(t) - Price(n)) / Sum of Abs(Price(t-k) - Price (t-k-1)
An example if N = 100 I'm looking at the $ price change from today vs 100 days ago divided by the sum of all the absolute price changes for the same period.
I made an indicator with a parameter of lookbackdays for N then have two indicators
AbsPriceChange:
AbsoluteValue(instrument.close-instrument.close[1])
SNR
AbsoluteValue(instrument.close-instrument.close[lookbackdays])/sum(AbsPriceChanges,lookbackdays)
However, if I added to graph and ran a system with it in there I get the following error:
While evaluating the calculated indicator SNRindicator, there was a problem: element count for array is greater than the starting offset.
I'm not really sure what that means. Any thoughts/help? Thanks.
The formula is essentially:
Abs((Price(t) - Price(n)) / Sum of Abs(Price(t-k) - Price (t-k-1)
An example if N = 100 I'm looking at the $ price change from today vs 100 days ago divided by the sum of all the absolute price changes for the same period.
I made an indicator with a parameter of lookbackdays for N then have two indicators
AbsPriceChange:
AbsoluteValue(instrument.close-instrument.close[1])
SNR
AbsoluteValue(instrument.close-instrument.close[lookbackdays])/sum(AbsPriceChanges,lookbackdays)
However, if I added to graph and ran a system with it in there I get the following error:
While evaluating the calculated indicator SNRindicator, there was a problem: element count for array is greater than the starting offset.
I'm not really sure what that means. Any thoughts/help? Thanks.