risk_monthly
- property AssetList.risk_monthly
Calculate monthly risk expanding time series for each asset.
Monthly risk of the asset is a standard deviation of the rate of return time series. Standard deviation (sigma σ) is normalized by N-1.
Monthly risk is calculated for the rate of retirun time series for the sample from ‘first_date’ to ‘last_date’.
- Returns:
- DataFrame
Monthly risk (standard deviation) expanding time series for each asset in form of Series.
See also
risk_annualCalculate annualized risks expanding time series.
semideviation_monthlyCalculate semideviation monthly values.
semideviation_annualCalculate semideviation annualized values.
get_var_historicCalculate historic Value at Risk (VaR).
get_cvar_historicCalculate historic Conditional Value at Risk (CVaR).
drawdownsCalculate drawdowns.
Examples
>>> al = ok.AssetList(["GC.COMM", "SHV.US"], ccy="USD", last_date="2021-01") >>> al.risk_monthly Symbols GC.COMM SHV.US date 2007-03 0.025668 0.000141 2007-04 0.020872 0.000153 2007-05 0.027513 0.000451 2007-06 0.025988 0.000406 ... ... 2020-09 0.051006 0.001380 2020-10 0.050861 0.001377