okama.AssetList.get_sharpe_ratio
- AssetList.get_sharpe_ratio(rf_return=0)
Calculate Sharpe ratio for the assets.
The Sharpe ratio is the average annual return in excess of the risk-free rate per unit of risk (annualized standard deviation).
Risk-free rate should be taken according to the AssetList base currency.
- Parameters:
- rf_returnfloat, default 0
Risk-free rate of return.
- Returns:
- pd.Series
Examples
>>> al = ok.AssetList(['VOO.US', 'BND.US']) >>> al.get_sharpe_ratio(rf_return=0.02) VOO.US 0.962619 BND.US 0.390814 dtype: float64