qis.MeanAdjType

class qis.MeanAdjType(*values)[source]

Bases: Enum

which mean is subtracted before an EWM second moment is computed.

The choice sets whether the estimate is a variance or a second moment about zero, and whether it uses information the estimation date did not have. INSAMPLE subtracts the full-sample mean and is therefore forward-looking: correct for a descriptive exhibit, wrong inside a backtest.

Variables:
  • NONE – subtract nothing. The second moment about zero, which is the convention for return volatility where the mean is small relative to the standard deviation

  • INSAMPLE – subtract the full-sample mean. Uses the whole sample at every date, so it is forward-looking and belongs only in descriptive output

  • EXPANDING – subtract the expanding mean up to each date. Point-in-time

  • EWMA – subtract the EWM mean at the same span. Point-in-time, and tracks a drifting mean

__init__(*args, **kwds)

Attributes

NONE = 1
INSAMPLE = 2
EXPANDING = 3
EWMA = 4