# Portfolio Optimization using Markowitz Model

## What is Markowitz Portfolio Theory?

Markowitz Portfolio Theory, also known as Modern Portfolio Theory (MPT), is a mathematical framework developed by Harry Markowitz that seeks to maximize portfolio returns for a given level of risk. The theory is based on the concept that investors can reduce their risk by diversifying their investments across a range of assets with different risk and return characteristics.

The key idea behind Markowitz's theory is that investors should not only focus on the expected return of an investment but also on its level of risk. The theory suggests that investors can construct an optimal portfolio by selecting assets that have low correlation with each other, which reduces the overall risk of the portfolio.

Markowitz's theory uses statistical methods to quantify the risk and return of each asset in a portfolio and calculates the efficient frontier, which is the set of portfolios that offer the highest expected return for a given level of risk. The efficient frontier helps investors identify the optimal portfolio that balances risk and return.

Markowitz Portfolio Theory has been widely used by investors, portfolio managers, and financial advisors to construct diversified portfolios that optimize risk and return. However, the theory has also been subject to criticism, as it assumes that asset returns follow a normal distribution, which may not always be the case in real-world markets.

## What is Markowitz Model Formula

The Markowitz Model Formula is used to determine the optimal portfolio allocation that maximizes expected return for a given level of risk. The formula can be expressed as follows:

R_p = w_1R_1 + w_2R_2 + ... + w_nR_n

Where:

R_p = the expected return of the portfolio

w_i = the weight or proportion of investment i in the portfolio (the sum of all weights should be equal to 1)

R_i = the expected return of investment i

The formula calculates the expected return of a portfolio as a weighted sum of the expected returns of the individual investments in the portfolio. In other words, it calculates the average return of the portfolio based on the expected returns of its constituent investments and their respective weights.

In addition to the expected return, the Markowitz Model also considers the risk of the portfolio. The goal is to construct a portfolio that maximizes expected return for a given level of risk. The risk is measured by the variance or standard deviation of the portfolio returns, and the optimal portfolio allocation is determined by analyzing the efficient frontier, which is the set of portfolios that offer the highest expected return for a given level of risk.

## Markowitz Model with an Example

Here is an example of how the Markowitz Model works:

Suppose an investor is considering investing in three assets: stocks A, B, and C. The expected returns and standard deviations of the three stocks are as follows:

Stock A: Expected Return = 10%, Standard Deviation = 20%

Stock B: Expected Return = 8%, Standard Deviation = 15%

Stock C: Expected Return = 12%, Standard Deviation = 25%

The investor has a risk tolerance of 18%. Using the Markowitz Model, the investor can construct an optimal portfolio that maximizes expected return for a given level of risk.

To do this, the investor needs to calculate the expected return and standard deviation of each possible portfolio combination of the three assets. For example, a portfolio with 50% invested in Stock A, 30% in Stock B, and 20% in Stock C would have an expected return of:

Expected Return = (0.5 x 10%) + (0.3 x 8%) + (0.2 x 12%) = 9.2%

The standard deviation of this portfolio can be calculated using the formula for portfolio variance:

Portfolio Variance = w_A^2 x Var(A) + w_B^2 x Var(B) + w_C^2 x Var(C) + 2w_Aw_B Cov(A,B) + 2w_Aw_C Cov(A,C) + 2w_Bw_C Cov(B,C)

where w_A, w_B, and w_C are the weights of the three stocks in the portfolio, and Cov(A,B), Cov(A,C), and Cov(B,C) are the covariances between the different pairs of stocks.

Assuming that the covariances between the stocks are known, the standard deviation of the above portfolio can be calculated to be approximately 16.25%.

By calculating the expected returns and standard deviations of all possible portfolio combinations of the three stocks and plotting them on a graph, the investor can identify the efficient frontier, which is the set of portfolios that offer the highest expected return for a given level of risk.

The investor can then select the optimal portfolio that lies on the efficient frontier and meets their risk tolerance. In this example, the optimal portfolio might be one that has a combination of Stock A and Stock B with a weight allocation that gives an expected return of 9% and a standard deviation of 17%, which is within the investor's risk tolerance of 18%.

## Advantages & Disadvantages of Markowitz Model

Advantages of the Markowitz Model:

Diversification: The Markowitz Model helps investors construct diversified portfolios by considering the correlations between different assets. Diversification reduces the risk of the portfolio by spreading the investment across different asset classes and sectors.

Quantitative: The Markowitz Model uses mathematical and statistical methods to quantify the risk and return of investments. This makes it easier for investors to make informed investment decisions based on data and analysis.

Efficient Frontier: The Markowitz Model uses the concept of the efficient frontier to identify the optimal portfolio that maximizes expected return for a given level of risk. This provides a clear framework for investors to make investment decisions.

Disadvantages of the Markowitz Model:

Assumptions: The Markowitz Model assumes that asset returns follow a normal distribution, which may not always be the case in real-world markets. The model may not accurately predict extreme events, such as market crashes or sudden changes in the economy.

Estimation Error: The Markowitz Model relies on estimates of expected returns and variances, which can be subject to estimation error. Small changes in these estimates can have a significant impact on the portfolio allocation and performance.

Complexity: The Markowitz Model can be complex and time-consuming to implement, particularly for investors with limited financial knowledge or access to sophisticated investment tools. The model requires a significant amount of data and analysis to construct an optimal portfolio, which may not be feasible for all investors.

## Markowitz Model Assumptions

The Markowitz Model makes several key assumptions in order to determine an optimal portfolio allocation. These assumptions include:

Normal Distribution: The model assumes that asset returns follow a normal distribution. This means that the probability distribution of returns is symmetrical and bell-shaped. While this assumption may hold true for some assets, it may not accurately reflect the returns of all assets in real-world markets.

Risk and Return: The model assumes that investors are rational and risk-averse, meaning they prefer portfolios that offer higher returns for a given level of risk. The model seeks to find the portfolio that offers the highest expected return for a given level of risk.

Independent Assets: The model assumes that the assets in the portfolio are independent, meaning that the returns of one asset are not influenced by the returns of another asset. In reality, assets may be correlated, meaning that the returns of one asset may be influenced by the returns of another asset.

Fixed Investment Horizon: The model assumes that the investment horizon is fixed and known in advance. This means that the investor has a predetermined time frame for their investment and does not need to make adjustments during the investment period.

No Transaction Costs: The model assumes that there are no transaction costs associated with buying or selling assets. In reality, there may be costs such as brokerage fees, taxes, and bid-ask spreads that can impact the return on the investment.

Accurate Estimates: The model assumes that the estimates of expected returns, variances, and covariances are accurate and reliable. In reality, these estimates may be subject to error and may change over time.

It is important to note that while these assumptions may not hold true in all cases, the Markowitz Model provides a useful framework for investors to construct diversified portfolios that balance risk and return.

## Limitations of Markowitz Model

The Markowitz Model has several limitations, including:

Estimation Error: The model relies on estimates of expected returns, variances, and covariances, which can be subject to estimation error. Small changes in these estimates can have a significant impact on the portfolio allocation and performance.

Asset Correlations: The model assumes that the assets in the portfolio are independent, but in reality, assets may be correlated, meaning that the returns of one asset may be influenced by the returns of another asset. This can result in an inefficient portfolio allocation that does not fully capture the benefits of diversification.

Short Investment Horizons: The model assumes that the investment horizon is fixed and known in advance. This means that the investor has a predetermined time frame for their investment and does not need to make adjustments during the investment period. However, in reality, investors may have changing investment horizons, which can impact the optimal portfolio allocation.

Transaction Costs: The model assumes that there are no transaction costs associated with buying or selling assets. In reality, there may be costs such as brokerage fees, taxes, and bid-ask spreads that can impact the return on the investment.

Black Swan Events: The model assumes that asset returns follow a normal distribution, which may not accurately predict extreme events, such as market crashes or sudden changes in the economy. These events can have a significant impact on the performance of the portfolio.

Limited Portfolio Size: The model can become less effective as the number of assets in the portfolio increases. This is because the number of calculations required to determine the optimal portfolio allocation increases exponentially with the number of assets.

It is important to note that while the Markowitz Model has its limitations, it remains a useful tool for investors to construct diversified portfolios that balance risk and return.

## Markowitz vs Single Index Model

The Markowitz Model and __Single Index Model__ are two different approaches to portfolio optimization.

The Markowitz Model is a mean-variance optimization model that seeks to construct a portfolio with the highest expected return for a given level of risk. The model considers the expected returns, variances, and correlations of the assets in the portfolio to determine the optimal portfolio allocation. The model uses the concept of the efficient frontier to identify the portfolio that provides the best risk-return tradeoff.

On the other hand, the Single Index Model is a linear regression-based approach that uses a market index, such as the S&P 500, as a proxy for the overall market. The model assumes that the returns of individual stocks are linearly related to the returns of the market index.

The model estimates the beta of each stock, which measures the sensitivity of the stock's returns to the returns of the market index. The stocks with high beta are expected to have higher returns in bull markets and lower returns in bear markets, while the stocks with low beta are expected to have lower returns in bull markets and higher returns in bear markets.

Compared to the Markowitz Model, the Single Index Model is simpler and requires less data and analysis to implement. The model only requires the historical returns of the stocks and the market index, as well as the current market index level. However, the Single Index Model has several limitations, including the assumption of a linear relationship between stock returns and market returns, the inability to capture diversification benefits, and the limitation to a single market index.

Overall, the Markowitz Model and Single Index Model are two different approaches to portfolio optimization, and each has its advantages and disadvantages. The choice between the two models depends on the investor's preferences and the specific investment goals and constraints.