okama.AssetList.recovery_periods
- property AssetList.recovery_periods
Calculate the longest recovery periods for the assets.
The recovery period (drawdown duration) is the number of months to reach the value of the last maximum.
- Returns:
- Series
Max recovery period for each asset (in months).
See also
drawdowns
Calculate drawdowns time series.
Notes
If the last asset maximum value is not recovered NaN is returned. The largest recovery period does not necessary correspond to the max drawdown.
Examples
>>> x = ok.AssetList(['SPY.US', 'AGG.US']) >>> x.recovery_periods SPY.US 52 AGG.US 15 dtype: int32