**Portfolio optimization** is the process of selecting an optimal portfolio (asset distribution), out of a set of considered portfolios, according to some objective. The objective typically maximizes factors such as expected return, and minimizes costs like financial risk, resulting in a multi-objective optimization problem. Factors being considered may range from tangible (such as assets, liabilities, earnings or other fundamentals) to intangible (such as selective divestment).

## Modern portfolio theory

Modern portfolio theory was introduced in a 1952 doctoral thesis by Harry Markowitz, where the Markowitz model was first defined.^{[1]}^{[2]} The model assumes that an investor aims to maximize a portfolio's expected return contingent on a prescribed amount of risk. Portfolios that meet this criterion, i.e., maximize the expected return given a prescribed amount of risk, are known as efficient portfolios. By definition, any other portfolio yielding a higher amount of expected return must also have excessive risk. This results in a trade-off between the desired expected return and allowable risk. This risk-expected return relationship of efficient portfolios is graphically represented by a curve known as the efficient frontier. All efficient portfolios, each represented by a point on the efficient frontier, are well-diversified. While ignoring higher moments of the return can lead to significant over-investment in risky securities, especially when volatility is high,^{[3]} the optimization of portfolios when return distributions are non-Gaussian is mathematically challenging.^{[4]}

## Optimization methods

The portfolio optimization problem is specified as a constrained utility-maximization problem. Common formulations of portfolio utility functions define it as the expected portfolio return (net of transaction and financing costs) minus a cost of risk. The latter component, the cost of risk, is defined as the portfolio risk multiplied by a risk aversion parameter (or unit price of risk). For return distributions that are Gaussian, this is equivalent to maximizing a certain quantile of the return, where the corresponding probability is dictated by the risk aversion parameter. Practitioners often add additional constraints to improve diversification and further limit risk. Examples of such constraints are asset, sector, and region portfolio weight limits.

### Specific approaches

Portfolio optimization often takes place in two stages: optimizing weights of asset classes to hold, and optimizing weights of assets within the same asset class. An example of the former would be choosing the proportions placed in equities versus bonds, while an example of the latter would be choosing the proportions of the stock sub-portfolio placed in stocks X, Y, and Z. Equities and bonds have fundamentally different financial characteristics and have different systematic risk and hence can be viewed as separate asset classes; holding some of the portfolio in each class provides some diversification, and holding various specific assets within each class affords further diversification. By using such a two-step procedure one eliminates non-systematic risks both on the individual asset and the asset class level.
For the specific formulas for efficient portfolios,^{[5]} see Portfolio separation in mean-variance analysis.

One approach to portfolio optimization is to specify a von Neumann–Morgenstern utility function defined over final portfolio wealth; the expected value of utility is to be maximized. To reflect a preference for higher rather than lower returns, this objective function is increasing in wealth, and to reflect risk aversion it is concave. For realistic utility functions in the presence of many assets that can be held, this approach, while theoretically the most defensible, can be computationally intensive.

Harry Markowitz^{[6]} developed the "critical line method", a general procedure for quadratic programming that can handle additional linear constraints and upper and lower bounds on holdings. Moreover, in this context, the approach provides a method for determining the entire set of efficient portfolios. Its application here was later explicated by William Sharpe.^{[7]}

### Mathematical tools

The complexity and scale of optimizing portfolios over many assets means that the work is generally done by computer. Central to this optimization is the construction of the covariance matrix for the rates of return on the assets in the portfolio.

Techniques include:

- Linear programming
^{[8]}^{[9]} - Quadratic programming
- Nonlinear programming
- Mixed integer programming
- Meta-heuristic methods
^{[10]} - Stochastic programming for multistage portfolio optimization
^{[11]} - Copula based methods
^{[12]} - Principal component-based methods
- Deterministic global optimization
- Genetic algorithm
^{[13]}

## Optimization constraints

Portfolio optimization is usually done subject to constraints, such as regulatory constraints, or illiquidity. These constraints can lead to portfolio weights that focus on a small sub-sample of assets within the portfolio. When the portfolio optimization process is subject to other constraints such as taxes, transaction costs, and management fees, the optimization process may result in an under-diversified portfolio.^{[14]}

### Regulation and taxes

Investors may be forbidden by law to hold some assets. In some cases, unconstrained portfolio optimization would lead to short-selling of some assets. However short-selling can be forbidden. Sometimes it is impractical to hold an asset because the associated tax cost is too high. In such cases appropriate constraints must be imposed on the optimization process.

### Transaction costs

Transaction costs are the costs of trading to change the portfolio weights. Since the optimal portfolio changes with time, there is an incentive to re-optimize frequently. However, too frequent trading would incur too-frequent transactions costs; so the optimal strategy is to find the frequency of re-optimization and trading that appropriately trades off the avoidance of transaction costs with the avoidance of sticking with an out-of-date set of portfolio proportions. This is related to the topic of tracking error, by which stock proportions deviate over time from some benchmark in the absence of re-balancing.

### Concentration risk

Concentration risk refers to the risk caused by holding an exposure to a single position or sector that is large enough to cause material losses to the overall portfolio when adverse events occur. If the portfolio is optimized without any constraints with regards to concentration risk, the optimal portfolio can be any risky-asset portfolio, and therefore there is nothing to prevent it from being a portfolio that invests solely in a single asset. Managing concentration risk should be part of a comprehensive risk management framework^{[15]} and to achieve a reduction in such a risk it is possible to add constraints that force upper bound limits to the weight that can be attributed to any single component of the optimal portfolio.

## Improving portfolio optimization

### Correlations and risk evaluation

Different approaches to portfolio optimization measure risk differently. In addition to the traditional measure, standard deviation, or its square (variance), which are not robust risk measures, other measures include the Sortino ratio, CVaR (Conditional Value at Risk), and statistical dispersion.

Investment is a forward-looking activity, and thus the covariances of returns must be forecast rather than observed.

Portfolio optimization assumes the investor may have some risk aversion and the stock prices may exhibit significant differences between their historical or forecast values and what is experienced.
In particular, financial crises are characterized by a significant increase in correlation of stock price movements which may seriously degrade the benefits of diversification.^{[16]}

In a mean-variance optimization framework, accurate estimation of the variance-covariance matrix is paramount.
Quantitative techniques that use Monte-Carlo simulation with the Gaussian copula and well-specified marginal distributions are effective.^{[17]}
Allowing the modeling process to allow for empirical characteristics in stock returns such as autoregression, asymmetric volatility, skewness, and kurtosis is important.
Not accounting for these attributes can lead to severe estimation error in the correlations, variances and covariances that have negative biases (as much as 70% of the true values).^{[18]}

Other optimization strategies that focus on minimizing tail-risk (e.g., value at risk, conditional value at risk) in investment portfolios are popular among risk averse investors.
To minimize exposure to tail risk, forecasts of asset returns using Monte-Carlo simulation with vine copulas to allow for lower (left) tail dependence (e.g., Clayton, Rotated Gumbel) across large portfolios of assets are most suitable.^{[19]}
(Tail) risk parity focuses on allocation of risk, rather than allocation of capital.

More recently, hedge fund managers have been applying "full-scale optimization" whereby any investor utility function can be used to optimize a portfolio.^{[20]}
It is purported that such a methodology is more practical and suitable for modern investors whose risk preferences involve reducing tail risk, minimizing negative skewness and fat tails in the returns distribution of the investment portfolio.^{[21]}
Where such methodologies involve the use of higher-moment utility functions, it is necessary to use a methodology that allows for forecasting of a joint distribution that accounts for asymmetric dependence.
A suitable methodology that allows for the joint distribution to incorporate asymmetric dependence is the Clayton Canonical Vine Copula. See Copula (probability theory) § Quantitative finance.

### Cooperation in portfolio optimization

A group of investors, instead of investing individually, may choose to invest their total capital into the joint portfolio, and then divide the (uncertain) investment profit in a way which suits best their utility/risk preferences. It turns out that, at least in the expected utility model,^{[22]} and mean-deviation model,^{[23]} each investor can usually get a share which he/she values strictly more than his/her optimal portfolio from the individual investment.

## See also

- Outline of finance § Portfolio theory for related articles
- Asset allocation
- Chance-constrained portfolio selection
- Intertemporal portfolio choice
- Financial risk management § Investment management
- List of genetic algorithm applications § Finance and Economics
- Machine learning § Applications
- Marginal conditional stochastic dominance, a way of showing that a portfolio is not efficient
- Merton's portfolio problem
- Mutual fund separation theorem, giving a property of mean-variance efficient portfolios
- Portfolio theory, for the formulas
- Risk parity / Tail risk parity
- Stochastic portfolio theory
- Universal portfolio algorithm, giving the first online portfolio selection algorithm

## References

**^**Markowitz, H.M. (March 1952). "Portfolio Selection".*The Journal of Finance*.**7**(1): 77–91. doi:10.2307/2975974. JSTOR 2975974.**^**Markowitz, H.M. (1959).*Portfolio Selection: Efficient Diversification of Investments*. New York: John Wiley & Sons. (reprinted by Yale University Press, 1970, ISBN 978-0-300-01372-6; 2nd ed. Basil Blackwell, 1991, ISBN 978-1-55786-108-5)**^**Cvitanić, Jakša; Polimenis, Vassilis; Zapatero, Fernando (1 January 2008). "Optimal portfolio allocation with higher moments".*Annals of Finance*.**4**(1): 1–28. doi:10.1007/s10436-007-0071-5. ISSN 1614-2446. S2CID 16514619.**^**Kim, Young Shin; Giacometti, Rosella; Rachev, Svetlozar; Fabozzi, Frank J.; Mignacca, Domenico (21 November 2012). "Measuring financial risk and portfolio optimization with a non-Gaussian multivariate model".*Annals of Operations Research*.**201**(1): 325–343. doi:10.1007/s10479-012-1229-8. S2CID 45585936.**^**Merton, Robert. September 1972. "An analytic derivation of the efficient portfolio frontier,"*Journal of Financial and Quantitative Analysis*7, 1851–1872.**^**Markowitz, Harry (1956). "The optimization of a quadratic function subject to linear constraints".*Naval Research Logistics Quarterly*.**3**(1–2): 111–133. doi:10.1002/nav.3800030110.**^**The Critical Line Method in William Sharpe,*Macro-Investment Analysis*(online text)**^**Rockafellar, R. Tyrrell; Uryasev, Stanislav (2000). "Optimization of conditional value-at-risk" (PDF).*Journal of Risk*.**2**(3): 21–42. doi:10.21314/JOR.2000.038. S2CID 854622.**^**Kapsos, Michalis; Zymler, Steve; Christofides, Nicos; Rustem, Berç (Summer 2014). "Optimizing the Omega Ratio using Linear Programming" (PDF).*Journal of Computational Finance*.**17**(4): 49–57. doi:10.21314/JCF.2014.283.**^**Talebi, Arash; Molaei, Sheikh (17 September 2010). "Performance investigation and comparison of two evolutionary algorithms in portfolio optimization: Genetic and particle swarm optimization".*2010 2nd IEEE International Conference on Information and Financial Engineering*. pp. 430–437. doi:10.1109/icife.2010.5609394. ISBN 978-1-4244-6927-7. S2CID 17386345.**^**Shapiro, Alexander; Dentcheva, Darinka; Ruszczyński, Andrzej (2009).*Lectures on stochastic programming: Modeling and theory*(PDF). MPS/SIAM Series on Optimization. Vol. 9. Philadelphia, PA: Society for Industrial and Applied Mathematics (SIAM). pp. xvi+436. ISBN 978-0-89871-687-0. MR 2562798.`{{cite book}}`

: Unknown parameter`|agency=`

ignored (help)**^**Zhu, Zhe; Welsch, Roy E. (2018). "Robust dependence modeling for high-dimensional covariance matrices with financial applications".*Ann. Appl. Stat*.**12**(2): 1228–1249. doi:10.1214/17-AOAS1087. S2CID 23490041.**^**Sefiane, Slimane and Benbouziane, Mohamed (2012).*Portfolio Selection Using Genetic Algorithm*Archived 29 April 2016 at the Wayback Machine, Journal of Applied Finance & Banking, Vol. 2, No. 4 (2012): pp. 143–154.**^**Humphrey, J.; Benson, K.; Low, R.K.Y.; Lee, W.L. (2015). "Is diversification always optimal?" (PDF).*Pacific Basin Finance Journal*.**35**(B): B. doi:10.1016/j.pacfin.2015.09.003.**^**"Concentrate on Concentration Risk | FINRA.org".*www.finra.org*. 15 June 2022. Retrieved 16 March 2024.**^**Chua, D.; Krizman, M.; Page, S. (2009). "The Myth of Diversification".*Journal of Portfolio Management*.**36**(1): 26–35. doi:10.3905/JPM.2009.36.1.026. S2CID 154921810.**^**Low, R.K.Y.; Faff, R.; Aas, K. (2016). "Enhancing mean–variance portfolio selection by modeling distributional asymmetries" (PDF).*Journal of Economics and Business*.**85**: 49–72. doi:10.1016/j.jeconbus.2016.01.003.**^**Fantazzinni, D. (2009). "The effects of misspecified marginals and copulas on computing the value at risk: A Monte Carlo study".*Computational Statistics & Data Analysis*.**53**(6): 2168–2188. doi:10.1016/j.csda.2008.02.002.**^**Low, R.K.Y.; Alcock, J.; Faff, R.; Brailsford, T. (2013). "Canonical vine copulas in the context of modern portfolio management: Are they worth it?" (PDF).*Journal of Banking & Finance*.**37**(8): 3085. doi:10.1016/j.jbankfin.2013.02.036. S2CID 154138333.**^**Chua, David; Kritzman, Mark; Page, Sebastien (2009). "The Myth of Diversification".*Journal of Portfolio Management*.**36**(1): 26–35. doi:10.3905/JPM.2009.36.1.026. S2CID 154921810.**^**Adler, Tim; Kritzman, Mark (2007). "Mean-Variance versus Full-Scale Optimization: In and Out of Sample".*Journal of Asset Management*.**7**(5): 71–73. doi:10.2469/dig.v37.n3.4799.**^**Xia, Jianming (2004). "Multi-agent investment in incomplete markets".*Finance and Stochastics*.**8**(2): 241–259. doi:10.1007/s00780-003-0115-2. S2CID 7162635.**^**Grechuk, B., Molyboha, A., Zabarankin, M. (2013). "Cooperative games with general deviation measures", Mathematical Finance, 23(2), 339–365.

## Bibliography

- Baker, H. Kent; Filbeck, Greg (2015).
*Investment Risk Management*. Oxford Academic. ISBN 978-0199331963. - Grinold, Richard; Kahn, Ronald (1999).
*Active Portfolio Management: A Quantitative Approach for Producing Superior Returns and Controlling Risk*(2nd ed.). McGraw Hill. ISBN 978-0070248823. - Harvey, Campbell; Rattray, Sandy; Van Hemert,Otto (2021).
*Strategic Risk Management: Designing Portfolios and Managing Risk*. Wiley Finance. ISBN 978-1119773917. - Maginn, John L.; Tuttle, Donald L.; Pinto, Jerald E.; McLeavey,Dennis W. (2007).
*Managing Investment Portfolios: A Dynamic Process*(3rd ed.). Springer. ISBN 978-0470080146. - Paleologo, Giuseppe A. (2021).
*Advanced Portfolio Management: A Quant's Guide for Fundamental Investors*(1st ed.). Wiley. ISBN 978-1119789796. - Rasmussen, M. (2003).
*Quantitative Portfolio Optimisation, Asset Allocation and Risk Management*. Palgrave Macmillan. ISBN 978-1403904584. - Schulmerich, Marcus; Leporcher, Yves-Michel; Eu, Ching-Hwa (2015).
*Applied Asset and Risk Management*. Springer. ISBN 978-3642554438.

**Practical C++20 Financial Programming: Problem Solving for Quantitative Finance, Financial Engineering, Business, and Economics**

*Carlos Oliveira -*

Updated for C++20, this book covers those aspects of the language that are more frequently used in writing financial software.

**Quantitative finance with R and cryptocurrencies: ***Dean Fantazzini - *

The aim of this book is to provide the necessary background to analyse cryptocurrencies markets and prices using quantitative techniques.