portfolio_entropy#
- pymc_marketing.mmm.utility.portfolio_entropy(samples, budgets)[source]#
Calculate the entropy of a portfolio’s asset weights to assess diversification.
Portfolio entropy, derived from Shannon entropy in information theory, quantifies the dispersion of asset weights within a portfolio. A higher entropy value indicates a more diversified portfolio, as investments are more evenly distributed across assets. Conversely, a lower entropy suggests concentration in fewer assets, implying higher risk.
The entropy is calculated using the formula:
\[E = -\sum_{i=1}^{n} w_i \cdot \log(w_i)\]where \(w_i\) represents the weight of asset ( i ) in the portfolio.
- Parameters:
- samples
pt.TensorVariable
1D PyTensor tensor variable containing samples.
- budgets
pt.TensorVariable
1D PyTensor tensor variable representing the investment amounts in each asset.
- samples
- Returns:
pt.TensorVariable
Portfolio entropy value.
References
[1]Bera, A. K., & Park, S. Y. (2008). Optimal Portfolio Diversification using the Maximum Entropy Principle.
[2]Pola, G. (2013). On entropy and portfolio diversification. Journal of Asset Management, 14(4), 228-238.