Skip to content
All library documents

Calculating Portfolio Risk from Asset Volatility and Dependence

Article Quant Q&A · Author: M Bilal

Summary

The document frames security selection as a trade-off between expected return and risk, with the investor’s risk tolerance affecting the choice. For two assets with discrete possible returns and probabilities, it outlines calculating each expected return as a probability-weighted average. Individual risk is measured by the standard deviation of outcomes, and the coefficient of variation expresses that dispersion relative to expected return.

For a portfolio, the answer gives the two-asset variance formula using asset variances, weights, and the correlation between returns. It also states the relation between covariance and correlation, which matters because the question supplies a negative value as covariance while the formula labels its input as correlation. A separate answer describes a broader workflow: estimate weights on training data, compare candidate portfolios by return and standard deviation, then assess selected weights on test data. Negative dependence can reduce portfolio risk, but the result depends on estimated relationships and should be checked out of sample.

Key ideas

  • Expected return for discrete outcomes is calculated by weighting each outcome by its probability.
  • The coefficient of variation compares an asset’s standard deviation with its expected return.
  • Two-asset portfolio variance depends on weights, individual variances, and correlation between returns.
  • Covariance and correlation are related but distinct quantities, so the input must match the formula.
  • Portfolio weights selected on training data should be evaluated on separate test data.

Tags

Full text
# How to calculate risk of portfolio in last part


# How to calculate risk of portfolio in last part












Investment decisions are not taken in insolation; investors have to consider market dynamics and firm level factors to choose among various available securities. Among different factors affecting the investment decisions; risk and return are the significant one. Considering only one of these two factors will not lead to a rational decision; investors have to consider both for an optimal portfolio. Along with these factors; risk appetite of an investor cannot be separated from investment decision. The decision of risk taker investor is definitely different from a risk-averse investor.

Suppose you are a new investor in the market and you have two options for investing your money. On the basis of risk return analysis and your risk appetite you are required to select the one that suits you the most. Following information is available for the two stocks:

```
Stock A              Stock B
Returns  Probability Returns Probability
29%      25%         30%      35%
28%      25%         29%      45%
30%      50%         28%      20% respectively
```

You are required to calculate:

Return

- Expected return on stock A

- Expected return on stock B

Risk

- Coefficient of variation for Stock A

- Coefficient of variation for Stock B

On the basis of calculation of return and risk of both stocks; select the one according to your risk appetite (Note: First declare yourself either as risk-averse investor or risk taker investor). Now construct a portfolio of these two securities with proportion of 40% of your total investment in Stock A and 60% in Stock B; keeping all other information same (about risk and return) calculate risk of portfolio if covariance between two stock is -0.45. Compare the risk of your selected stock and the portfolio; do you think portfolio have diversified the risk?

## Answer by AlRacoon (score 1)

https://quant.stackexchange.com/a/43664

Risk of the individual assets as defined in your question by CV (std. dev./mean) can be determined by calculating the squared difference of each of the returns from the weighted average mean return for each asset (Expected return). Multiply each of these squared differences by the corresponding probabilities. Take the square root of this total sum of probability weighted squared differences--this will get you the std. dev. of each asset. Now divide the std. dev. by the expected return to arrive at the CV.

Take the std. deviations calculated above and calculate the portfolio risk below.

Portfolio Risk of your 2 asset portfolio can be determined by applying the formula below:

$$\sigma^2_p=\sigma^2_aW^2_a+\sigma^2_bW^2_b+2W_aW_b\sigma_a\sigma_b(cor_{xy})$$

where W are the weights, sigma is the standard deviation, and cor is the correlation between the asset returns.

Note: $$cov_{ab}=\sigma_a\sigma_b(cor_{xy})$$; Also risk is often expressed as the standard deviation or $$\sigma_p$$

## Answer by Varun Divakar (score 0)

https://quant.stackexchange.com/a/43678

Say our portfolio consists of four securities representing different sectors of the economy.

We have used the data of Boeing, Bank of America, Amazon, and Microsoft. To build the portfolios, we first gather the daily performance data of all four securities.

Next, we split this data into train and test data. We use the train data to create the portfolios and arrive at the best possible weights for the four securities. Using these weights, we test the performance of the best portfolio on the test data.

In the next step, we compute the annualized returns of each security by using the latest and oldest close prices of stocks. We will use the annualized returns to compute the expected return of a portfolio.

Next, we create two data frames, representing the train and test data that will contain the daily percentage change of each stock. We will use these return values of the train data to calculate the covariance matrix for the four stocks.

Covariance is a measure of the joint variability of two random variables. If the greater values of one variable correspond with the greater values of the other variable, and the same holds for the lesser values, then the covariance is positive. In the opposite case, when the greater values of one variable to the lesser values of the other, (i.e., the variables tend to show opposite behavior), the covariance is negative. The sign of the covariance, therefore, shows the tendency in the linear relationship between the variables. We will learn how to compute the covariance matrix in the next unit.

After this, we create a function to estimate the annualized portfolio’s returns and standard deviation using a random set of weights for the four securities. We will use this function to create random portfolios and estimate their performance.

To create random portfolios, we will simulate random weights for the four securities. Here we need to make sure that the sum of weights is always equal to 1, so as to reflect the percentage allocations accurately.

After this, we calculate the expected portfolio returns and the expected standard deviation of a portfolio using the annualized portfolio performance function.

Lastly, by assuming a risk-free rate of 3% for the US treasuries and using the portfolio standard deviation calculated earlier, we compute the Sharpe ratio of a portfolio.

We save these three parameters along with the corresponding weights of the securities in a data frame. We repeat the above process multiple times with different set of random weights to generate different portfolios.

We can plot all these portfolio results on the efficient frontier graph to visualize our results. In the end, we identify two portfolios: one that gives us the maximum Sharpe ratio and the other that has the minimum risk and verify their performance on the test data.

To sum up, the benefits of MPT are best observed, when one creates a portfolio with assets that are negatively correlated, this increases the diversification and reduces the risk. In the next unit, we will learn how to calculate the variance-covariance matrix in detail.

You can get the expected risk of the portoflio you choose by using the selected weights as per you criterion and then checking its standard deviation on the test or validation data.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.