MaxDiversificationPortfolio
- class qf_lib.portfolio_construction.portfolio_models.max_diversification_portfolio.MaxDiversificationPortfolio(cov_matrix: QFDataFrame, std_of_assets: QFSeries, upper_constraint: Optional[Union[float, Sequence[float]]] = None)[source]
Bases:
Portfolio
Class used for constructing a Max Diversification portfolio. See: http://allaboutalpha.com/blog/2011/03/27/the-most-diversified-portfolio/
Methods:
calculate_diversification_ratio
(weights)Calculates a Diversification Ratio for the portfolio taking the returns of assets (set for the portfolio) and the weights provided in the parameter.
- rtype:
a series indexed with names of assets containing weights (one for each asset).
- calculate_diversification_ratio(weights: QFSeries) float [source]
Calculates a Diversification Ratio for the portfolio taking the returns of assets (set for the portfolio) and the weights provided in the parameter. For two or more assets diversification ratio will be greater or equal to one. The higher it is, the better.
- Parameters:
weights (pandas.Series) – series of weights indexed with names of assets
- Returns:
Diversification Ratio
- Return type:
float