qis.InitType¶
- class qis.InitType(*values)[source]¶
Bases:
Enumhow an EWM recursion is seeded when no explicit
init_valueis given.The seed is the state before a column’s first finite observation; that observation then updates it,
s_{t0} = λ seed + (1-λ) x_{t0}. The seed keeps weightλ^(t-t0+1)at rowt, below 5% after about1.5 Nrows for spanN, so a full-sample seed leaks later information into the early estimates.- Variables:
ZERO – seed zero. Point in time; the early estimates are shrunk towards zero by the factor
1 - λ^(t-t0+1)X0 – seed with the column’s first finite observation (its square, or cross product, in a second-moment recursion), so
s_{t0} = x_{t0}. Point in time and the qis default; it is pandasadjust=FalseMEAN – seed with the full-sample mean of the series the recursion runs on (for a variance, the mean of
x^2). Uses the whole sample: look-aheadVAR – seed a second-moment recursion with the full-sample variance of the observations (a covariance for a cross moment). Look-ahead. A mean recursion cannot take it:
compute_ewmandcompute_rolling_mean_adjraiseValueError, and where the sameinit_typealso seeds a mean adjustment that mean is seeded withMEAN
- __init__(*args, **kwds)¶
Attributes
- ZERO = 1¶
- X0 = 2¶
- MEAN = 3¶
- VAR = 4¶