Features (fynance.features)¶
Financial features: metrics, indicators, scaling, moving averages, moving standard deviations and rolling functions.
Kalman filter with RTS smoother and maximum-likelihood parameter estimation.
Bollinger Band, CCI, Hull Moving Average, MACD, RSI.
Annualized return and volatility, Calmar ratio, Sharpe ratio, maximum drawdown, Z-score and more.
Simple, exponential and weighted moving averages and standard deviations.
Rolling minimum and rolling maximum.
Standardization, normalization and their rolling versions.
Notation¶
Common parameters across modules:
X— time-series of returns, prices or indexed values. One- or two-dimensional. For 2D arrays,axis=0(default) means each row is an observation at timetand each column is a different time-series.w— size of the lagged window, e.g. a simple moving average ofXis noted \(sma^w_t(X) = \frac{1}{w} \sum^{w-i}_{i=0} X_{t-i}\).kind— method for moving average and/or standard deviation: simple ('s'), weighted ('w') or exponential ('e').slow_w,fast_w— size of the lagged windows for long and short moving averages/standard deviations.period— number of periods per year (e.g.252for daily trading days,365for daily calendar).axis— axis along which the computation is performed (relevant only for 2D arrays).dtype— output data type. Only numerical types are allowed (float,double,int,np.float16, etc.). Default isNone(inferred fromX).