Vidya - different behavior depending on the price level
Author: Carova
Creation Date: 3/31/2019 12:11 AM
profile picture

Carova

#1
Hi Eugene!

I think that there is an issue with the implementation of VIDYA. It appears to have significantly different behavior depending on the price level.

CODE:
Please log in to see this code.


The "volatility factor" should be a constant regardless of price level.

Vince
profile picture

superticker

#2
QUOTE:
The "volatility factor" should be a constant regardless of price level.
That's true if the computed standard deviation scales with the price input. Does it? I haven't read the article, so I can't say.

What I can say is the alpha (3rd parameter) scales with the price. So if you increase the a price by ten times, then you have to divide alpha by ten such that the x1 and x2 vectors below are now the same DataSeries.
CODE:
Please log in to see this code.

If you want to make Vidya operate independent of the price range (which I think is the goal), then just normalize the price with the z-score of the price rather than using the raw price data. Now you have price (and standard deviation) independence. Yes, the z-score will also normalize the standard deviation to 1.0 (as well as the mean price to 0.0), so it might be doing "too much" here. Bad example?
CODE:
Please log in to see this code.

You could just skip using the Vidya altogether and trade against the z-score directly. I think that's why the z-score is included as a WL indicator in the first place. It normalizes the variations (price range and volatility) from one stock verses another simplifying one's strategy code. The problem with the z-score is that it's based on the standard deviation, which is an unreliable measure of volatility for stocks. But you could re-write the z-score definition so its volatility is based on one of the established robust measures of volatility instead. Such a study would make a great publication! I would certainly be interested in reading it.

Someone may have already designed a robust z-score. Go to the university library and try a literature search on "robust" and "zscore" and see if you get any hits. If so, please post them. If you discover a paper I like, I may be willing to write a WL indicator for it.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).