Mean reversion strategy that dynamically adjusts for changing volatility

Now, let's apply the previously introduced concepts of using a volatility measure to adjust the number of days used in Fast and Slow EMA and using a volatility-adjusted APO entry signal. We will use the standard deviation (STDEV) indicator we explored in Chapter 2, Deciphering the Markets with Technical Analysis, as a measure of volatility. Let's observe the output of that indicator quickly to recap the Google dataset:

From the output, it seems like volatility measure ranges from somewhere between $8 over 20 days to $40 over 20 days, with $15 over 20 days being the average. ...

Get Learn Algorithmic Trading now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.