okama.EfficientFrontier.get_most_diversified_portfolio

EfficientFrontier.get_most_diversified_portfolio(target_return=None, monthly_return=False)

Calculate assets weights, risk, return and Diversification ratio for the most diversified portfolio given the target return within given bounds.

The most diversified portfolio has the largest Diversification Ratio.

The Diversification Ratio is the ratio of the weighted average of assets risks divided by the portfolio risk. In this case risk is the annuilized standatd deviation for the rate of return .

Parameters:
target_returnfloat, optional

Rate of return value. The optimization process looks for a portfolio with the target_return and largest Diversification ratio. If not sepcifed global most diversified portfolio is obtained. Target return value can be in monthly or annual values depending on ‘monthly_return’ option.

monthly_returnbool, default False

Defines whether to use rate of return monthly (True) or annual (False) values.

Returns:
dict

Weights of assets, risk and return of the most diversified portfolio.

Examples

>>> ls4 = ['SPY.US', 'AGG.US', 'VNQ.US', 'GLD.US']
>>> x = ok.EfficientFrontier(assets=ls4, ccy='USD', last_date='2021-12')
>>> x.get_most_diversified_portfolio()  # get a global most diversified portfolio
{'SPY.US': 0.19612726258395477,
'AGG.US': 0.649730553241489,
'VNQ.US': 0.020096313783052246,
'GLD.US': 0.13404587039150392,
'Mean return': 0.0637820844415733,
'CAGR': 0.062355715886719176,
'Risk': 0.05510135025563423,
'Diversification ratio': 1.5665720501693001}

It is possible to get the most diversified portfolio for a given target rate of return. Set monthly_return=False to use annual values for the rate of return.

>>> x.get_most_diversified_portfolio(target_return=0.10, monthly_return=False)
{'SPY.US': 0.3389762570274293,
'AGG.US': 0.12915657041748244,
'VNQ.US': 0.15083042115027034,
'GLD.US': 0.3810367514048179,
'Mean return': 0.10000000151051025,
'CAGR': 0.09370688842211439,
'Risk': 0.11725067815643951,
'Diversification ratio': 1.4419864802150442}