Look-ahead bias with EMA(21, 0 ,#Vol)

Problem found. The SMA, EMA, etc, are adjusting for Point In Time (PIT) the volume series as if it was a price series. This means it was:

  1. Multiplying instead of dividing future splits
  2. Adjusting for future dividends
  3. Doing FX

Guess nobody used #Vol in moving average functions? Key lesson is important: if it seems too good to be true it's probably not right. Thanks @Victor1991

Should have a fix later today. Very sorry about this.

PS. this is not a new problem, has always been like this since we added series to MA's. Guess we never fully tested the volume option :frowning:

3 Likes