Presentation is loading. Please wait.

Presentation is loading. Please wait.

Risk Analysis & Modelling Lecture 2: The Mean-Variance Model.

Similar presentations


Presentation on theme: "Risk Analysis & Modelling Lecture 2: The Mean-Variance Model."— Presentation transcript:

1 Risk Analysis & Modelling Lecture 2: The Mean-Variance Model

2 Course Website: ram.edu-sys.net Course Email: riskcoursehq@hotmail.com

3 The Mean-Variance Model In this lecture we will introduce one of the most widespread models used to measure and analyse the nature of Market Risk This model is the Nobel Prize winning Mean- Variance Model developed by Harry Markowitz in 1952 Although over 60 years old this model is still in widespread use and it is an ideal way to introduce the power of quantitative risk modelling It is the basis of the SCR calculation in Solvency II

4 Measuring Risk Last week we made the statement that risk involves uncertainty over some future outcome Even when we are not certain about the final outcome we often have an idea of the range of outcomes that might occur We can place reasonable limits on our uncertainty….

5 Limits on uncertainty Current Position Although we are unsure precisely which outcome will occur we can describe a range of outcomes over which our uncertainty arises We are uncertain about the precise outcome

6 Our thought experiment Imagine you have £10,000 invested in a portfolio of 2 stocks £6000 is invested in stock A and £4000 in stock B You are uncertain about how much your portfolio will be worth in one month, however, as an expert investor you feel you can estimate a range of outcomes that might occur You will do this by writing down a range of possible values for your portfolio and the probability or likelihood of these outcomes

7 Limits on Uncertainty £10,000 10%, £11,000 (+10%) 5%, £9,000 (-10%) 45%, £10,500 (+5%) 20%, £9,500 (-5%) 20%, £10,000 (0%) 1 Month Time Horizon Probability, Portfolio Value

8 Histogram of Outcomes

9 Your Friends Portfolio Your friend has a portfolio of £5000 After seeing your risk chart he decides to create one for his own portfolio Using his knowledge of the assets in his portfolio he produces a histogram showing the possible changes in portfolio value and their respective probabilities You note that because you are both using the proportional change in your portfolio values you can compare charts (even though your portfolios are of different sizes)

10 Friends “Riskier” Portfolio Greater spread of outcomes means greater risk

11 Which Portfolio Earns More? You want to know which portfolio earns more on average or has the greater Expected Return On average we expect our portfolio to earn 1.75% over the 1 month, while we expect our friends portfolio to earn 3%

12 Which Portfolio Is Riskier? While your friends portfolio has a greater expected return, we could argue that because the spread of outcomes on your friend’s portfolio is greater that the risk is greater Although this can be ascertained visually it is useful to have a way of measuring this spread numerically Statistics provides us with a simple means by which to do this: the Variance

13 Definition of Variance The expected return is defined as follows where E is the expectation operator (see appendix) and p r is the probability of that outcome The Variance is defined as the expected squared difference The Standard Deviation is simply the square root of the Variance

14 Calculating Variance The variance on our portfolio is: The Variance of the return on our portfolio is 0.002819 By similar calculation we can see that the Variance on our friends portfolio is 0.00735 The Variance of the return does not have any obvious intuitive meaning (unlike the expected return), but it can be used to compare risk of the portfolios (larger Variance means higher Risk)

15 Calculating the Mean and Variance From Historical Observations Normally we estimate the Mean and Variance from historical observations rather than hypothetical outcomes and their estimated probabilities To estimate the average from a set of historical observations of size N we use the following formula (which is calculated using the AVERAGE formula in Excel): To estimate the variance we can use the following formula** (which is calculated using the VARP formula in Excel):

16 Mean Variance Abstraction The key insight of the Mean-Variance Model is that an asset or portfolio can be described using two numbers: the Mean and Variance of Return Although this does not capture the entire behaviour of a portfolio these 2 simple statistics directly relate to and quantify important aspects of a portfolio’s behaviour They tell us how much profit we expect to make and how risky that profit is

17 Mean-Variance Abstraction Range or Distribution of Outcomes Abstraction Mean (Measure of Expected Profit) Variance (Measure of Risk)

18 Deriving the Portfolio’s Risk Returning to our investment portfolio, its Risk (or Variance) and Expected Return is derived from the risk of the two assets it contains It is often useful to express the Risk and Return of the portfolio in terms of the assets it contains It is easier to quantify the risks of individual assets rather than the risks of the portfolio We will now derive some very important results by expressing the statistical behaviour of the portfolio interms of the assets it contains

19 Relationship between the Assets and the Portfolio A B P The behaviour of the portfolio is derived from the behaviour of the assets it contains – a portfolio containing high return/risk assets will also have a high return/risk Is it possible to derive the Mean and Variance of the Returns on the Portfolio (P) in terms of the Mean and Variance of the Returns on the Assets it contains (A and B)?

20 Mapping Assets to Portfolio The known market value today of a portfolio (p) of 2 assets (a and b) is equal to the sum of their values: The unknown or random market value of the portfolio at some future time is equal to: The ~ above the variables simply denotes that they are random or uncertain variables which can take on a range of values

21 The relationship between the assets value today and the future date can be expressed as: Where and denotes the random returns on asset A and asset B respectively If we want to express the portfolio’s return in terms of the return on assets we have:

22 We can rewrite this as: Where w a and w b are the proportion of the portfolios total value invested in asset A and asset B respectively These proportions are also called the investment weights The usual restrictions on these investment weights is that they sum to 100% and cannot be negative For example, a £100 portfolio with £30 invested in A and £70 invested in B has w A is equal to 30% and w b is 70%

23 Example Calculation The meaning of this mapping equation is fairly simple. It simply states the obvious fact that the random behaviour of the return on the portfolio is directly related to the random behaviour of the assets in the portfolio For example, if a portfolio contains 40% in stock A with a return of 5% and 60% in stock B with a return of 10% then the portfolio’s random return will be 8%:

24 Review Question A portfolio contains two assets A and B 30% of the portfolio is held in asset A and 70% in asset B The return on Asset A is 10% and the return on Asset B is 20% What is the return on the portfolio?

25 Implying the Portfolio’s Statistical Properties We will now show it is possible to imply the mean and variance of return for the portfolio from the statistical properties of the assets contained in the portfolio This will turn out to be extremely useful since it allows us to use simple mathematics to model and explore the nature of Risk in a Portfolio

26 Portfolio Expected Return The expected return on the portfolio is equal to: So the expected return on the portfolio is equal to a weighted average of the returns on the assets

27 Review Question A portfolio contains two assets A and B 50% of the portfolio is held in asset A and 50% in asset B Over the next year the Expected (Average) Return on Asset A is 20% and the average return on Asset B is expected to be 30% What is the average or expected return on the portfolio over the next year?

28 Review Question Answer The formula we just derived states: Applying the formula: So on average this portfolio will earn 25% over the next year

29 Portfolio Variance The portfolios variance can be defined as: Where cov is the covariance The intuition is that the Variance of the Portfolio depends not just on how the assets it contains move in isolation (Variance) but also on how they move together or co-vary (measured by Covariance). We note the relationship is quadratic with respect to the investment weights!

30 Covariance Covariance measures the co-movement of 2 random variables and is defined as: A large positive covariance suggest that the random variables have a tendency to move together A large negative covariance suggests that the random variables have a tendency to move in the opposite direction to each other A covariance close to zero suggests that the random variables are independent in their movement about the mean

31 Covariance Diagram Cov(X,Y) Covariance measures the simultaneous behaviour of two random variables about their centre. Do they have a tendency to move together, against each other or independently? E(X) E(Y) X Y

32 Correlation Correlation is a normalized measure of Covariance Correlation must be between –1 and +1 due to the Cauchy-Schwarz inequality (see appendix) A strong positive correlation suggests that the two random variables move about their mean value in unison A strong negative correlation suggests that the two random variable move in opposite directions about their mean value Correlation is defined as:

33 Calculating Covariance from Historical Observations To estimate the covariance from a set of historical observations for two random variables X and Y of size N we use the following formula**: In Excel this can be calculated using the COVAR formula The related correlation statistic can be calculated in Excel using the CORREL formula

34 Quadratic Relationship Let us look at the relationship between the risk on a portfolio of 2 uncorrelated assets (zero covariance) both with a variance of 0.1 the risk of a portfolio containing those 2 assets Our equation tells us that the variance of the return on the portfolio is: If we graph this relationship out for different combinations of asset A and asset B we see something interesting…

35 Risk for Various Portfolios Minimum Risk Containing 50% of A and 50% of B 100% in A and 0% in B0% in A and 100% in B

36 Interpreting the Curve What this curve is telling us is that the risk (measured in terms of variance) of a combination of asset A and asset B is lower than the individual risks of the two assets In this case it is possible for a portfolio of 50% of A and 50% of B to have half the risk of the individual assets This result is not entirely intuitive, and at first sight might seem nonsensical However this is an extremely important result The interpretation of this curvature in the risk of the portfolio is that it represents diversification

37 What if we have perfect correlation? We can show that the quadratic relation reduces to a linear relationship when the correlation between assets become perfect (ie no diversification effect) From the definition of correlation we see:

38 Using our equation for 2 assets: We can see in the absence of diversification (perfect correlation between assets) the relation between the risk of the portfolio and the investment weights becomes linear This result explains the effect we saw when we artificially set the correlation between assets to 1 - making them perfectly correlated

39 Diversification Diversification is extremely important to financial institutions The insurance industry is based on the concept of diversification or pooling of risk Risk is diversified between insurance policies – the risk of a portfolio of policies is less than the sum of the risks on the individual policies One of the powerful abilities of the Mean-Variance Framework is that it allows us to measure and analyse diversification in a simple quantitative framework Diversification arises when the assets (or liabilities) making up the portfolio move independently By moving independently their movements can offset each other

40 Diversification and Solvency II The regulatory authorities place Solvency Capital requirements on Insurance Companies to protect policyholders from the risk of Insolvency The level of capital that an insurance company has to hold depends on the potential losses that might occur on its underwriting and investment portfolios One of the weaknesses of the traditional Actuarial Methods used in the Insurance Industry is they measure Risks in isolation rather than across the business as a whole (Enterprise Risk) Using the what is essentially the Mean-Variance Model Solvency II allows insurance companies to model the effect of diversification across different lines of business and across different asset classes using large Matrices…

41 Larger Portfolios The equations we developed can be used to derive the statistical properties of a portfolio of just 2 assets For a modest portfolio of 30 assets the equation describing the relationship the portfolio variance and the assets contained would contain 465 variance and covariance terms! Financial institutions hold portfolios containing thousands of assets In order to perform these calculations on portfolios of this scale we need to use matrices

42 Matrix Multiplication Review Question Multiply these 2 matrices together: 96 (1,2) (2,2) * = What is the size/dimension of the resulting matrix? What are its element(s) 21 12

43 Matrix Multiplication Review Question Multiply these 3 matrices together: 96 (1,2) 21 12 (2,2) * = What is the size/dimension of the resulting matrix? What are its element(s) 9 6 * (2,1)

44 Hint! 96 (1,2) 21 12 (2,2) * = 2421 (1,2) 96 21 12 (2,2) * = 9 6 * (2,1) 2421 9 6 * (1,2) (2,2)

45 Expected Return Vector The relationship between the expected return on a portfolio and the statistical properties of the assets it contains can be expressed as follows: E(r A ) E(r B ) E(r P ) = W T.E Where W is the weight vector (matrix with one column) and E is the expected return vector wAwA wBwB W = E =

46 We can see that this is equivalent to the earlier equation by multiplying out the matrices E(r A ) E(r B ) wAwA wBwB * = w A* E(r A ) + w B * E(r B )

47 Covariance Matrix The relationship between the variance of a portfolio and the statistical properties of the assets it contains can be expressed as Var(r P ) = W T.C.W Where W is the weight vector and C is the covariance matrix wAwA wBwB W = C = Var(r A )Cov(r A,r B ) Var(r B )

48 Again, we can see that this is equivalent to the earlier equation by multiplying out the matrices Var(r A )Cov(r A,r B ) Var(r B ) wAwA wBwB * wAwA wBwB * w A *Var(r A ) + w B *Cov(r A, r B )w A *Cov(r A, r B )+ w B *Var(r B ) = wAwA wBwB * = w A *w A *Var(r A ) + w B *w A *Cov(r A, r B ) + w A *w B *Cov(r A, r B ) + w B *w B *Var(r B )

49 The Covariance Matrix We will be using the Covariance Matrix extensively – it is the main tool we will use to describe the nature of uncertainty or Risk You can think of it as a specially ordered table containing the covariances and variances of random variables It contains information not only on how individual assets behave but also how they behave together (via their covariance) It is a semi-positive definite matrix (ie W T. C.W >=0 for every non-zero column vector W - no negative variances! This is equivalent to saying the Eigen Values of the covariance matrix should be greater than or equal to zero)

50 Var(R A )Cov(R A,R B ) Cov(R B,R A )Var(R B ) Var(R A )Cov(R A,R B )Cov(R A,R C ) Cov(R B,R A )Var(R B )Cov(R B,R C ) Cov(R C,R A )Cov(R C,R B )Var(R C ) Covariance Matrix for 2 Assets Covariance Matrix for 3 Assets Identical Terms A A B B A A B B C C Covariance of a random variable with itself is its variance

51 Correlation Matrix A matrix closely related to the Covariance Matrix is the Correlation Matrix As you can probably deduce from the name it contains correlations rather than covariances! Correlations are normalised covariances whose value ranges between -1 and 1 The definition of correlation is: Where p x,y is the correlation between x and y and  x and  y are the standard deviations of x and y.

52 1p A,B p B,A 1 1p A,B p A,C p B,A 1p B,C p C,A p C,B 1 Correlation Matrix for 2 Assets Correlation Matrix for 3 Assets A A B B A A B B C C Identical Terms Correlation of a random variable with itself is 1

53 Real World Data We will now look at how we might use the Mean Variance Framework to model the risks on a portfolio of 2 stocks: BSkyB and Boots The statistics for the covariance matrix and expected return vector will be derived directly from a historical dataset – rather than guessed subjectively! In order to calculate the average, variance, covariance and correlation of return on the stocks we will have to use four Excel functions AVERAGE, VARP, COVAR and CORREL respectively.

54 What We Discover We notice that the relationship between return and the investment in BSkyB is linear We notice that the relationship between risk or standard deviation is non linear The minimum risk portfolio contains a mixture of both BSkyB and Boots even though Boots is a riskier stock This is due to diversification The diversification effect would disappear when we have perfect correlation between the 2 assets

55 Diversification Graphic BSkyB Boots + = Because BSkyB and Boots are independent and do not have perfect correlation their movements can offset each other and reduce the portfolio variance Portfolio

56 Implications of Diversification The effect of diversification is captured in the quadratic curvature we observe when we graphed the expected return of our portfolio against its variance or risk Portfolios with the same Risk but different Expected Returns

57 The implication for investment decisions is that some portfolios are “inefficient” in the mean variance sense Looking at the previous graph we see there are two portfolios which have the same risk, but one has a greater return All points below the minimum risk portfolio are said to be inefficient All points above the minimum risk portfolio are said to be efficient and make up the efficient frontier. The calculation of the efficient frontier is artificially simple when we only have 2 assets in the portfolio For the case of 3 or more assets we need to use a constrained optimisation tool like Solver

58 What is Solver Solver is a mathematical programming tool built into Excel which can be used to solve constrained optimisation problems There are a large set of problems which involve inequality constraints such as: 0 < X < 1 Optimisation problems involving such constraints cannot be solved using the traditional methods of differential calculus Internally Solver uses an algorithm based on Linear Programming called the Feasible Direction Search – but we do not need to know about that to use it!

59 Where do I Find Solver It is found under Tools->Solver If it is not available then you might need to tell Excel to load it by going to Tools- >Addins and making sure the “Solver Add- in” is checked Solver is programmed in VBA!

60 Using Solver Target Cell Specifies The output we wish to minimize/maximize By changing cells specifies the inputs solver will alter to find the minimum or maximum Constraints specify the conditions that must Be met in a feasible solution Press to Solve! Do we wish to Min or Max?

61 What we will ask solver We will ask solver to find the lowest risk portfolio for our target level of return given the mean variance model This portfolio will by subject to the constraints that the sum of the weights or investment percentages will equal 1 and that all the investment weights will be positive (greater than or equal to zero) Solver will travel through the set of all possible portfolios that give a return equal to our target level using the feasible direction search to find the portfolio with the lowest risk It will travel towards the lowest risk portfolio by changing the investment weights and examining the effect they have on risk

62 The Solver Model W T.V A.W W T.E[R A ] Variance Matrix: VReturn Vector: R Fixed Inputs Weight Vector: W Variable Inputs Portfolio Variance Var[R P ] Portfolio Exp Return E[R P ] Outputs Model Solver Algorithm Alter the weights given the constraints Check to see if risk can be reduced further

63 Calculating the Efficient Frontier using Solver When calculating the efficient frontier using Excel’s Solver we must first calculate the range of expected returns over which it spans The lowest point on the efficient frontier is the expected return related to the minimum standard deviation portfolio The highest point on the efficient frontier is the expected return related to the maximum return portfolio The efficient frontier lies between these 2 values All these are, of course, restricted by any constraints we impose on the frontier

64 Bounding the Efficient Frontier Expected Return Risk (Standard Deviation) Return on minimum risk portfolio Maximum Return Efficient Frontier

65 Solver Step 1: Calculate Minimum Variance Portfolio Target Cell is portfolio varianceWe want to minimize the Target Cell We tell Solver it can change the portfolio weights This is subject to the constraints that each of the weights must be greater than or equal to 0 ($B$12:$B$13 >= 0) and the sum of the weights must equal 1 ($B$15 = 1)

66 Step 2: Calculate Maximum Return Portfolio Target Cell is Portfolio Return We want to maximize the Target Cell We tell Solver it Can change Portfolio weights This is subject to the constraints that each of the weights must be greater than or equal to 0 ($B$14:$B$15 >= 0) and the sum of the weights must equal 1 ($B$17 = 1)

67 Calculating Points on the Frontier To graph out the efficient frontier we need to calculate point between these minimum and maximum returns In general, it is best to take evenly spaced returns between these two extremities and calculate the minimum risk portfolio that achieves the target return on the frontier: Min Var[R P ] subject to E[R P ] = X where X is our return for which we wish to generate the corresponding efficient frontier point.

68 Diagram of Calculation Method Expected Return Risk (Standard Deviation) Evenly spaced returns used to calculate the points on the frontier Points on the Frontier Calculated Minimum Variances

69 Step 3: Calculate Points on the frontier for a set level of return We want to minimize the Target Cell Target Cell is Portfolio variance We tell Solver it can change Portfolio weights This is subject to the constraints that each of the weights must be greater than or equal to 0 ($B$14:$B$15 >= 0) and the sum of the weights must equal 1 ($B$17 = 1) and that the return must be equal to some level ($F$14 = $G$42)

70

71 Appendix 1: Transformation Between Correlation and Covariance Matrix The covariance matrix and correlation matrix are obviously linked – they both measure how things move together Let D be a square matrix with the standard deviations along the diagonal and zeros everywhere else (a diagonal matrix), let P be the correlation matrix and C be the respective covariance matrix. Then the following relationship is true: D.P.D = C

72 2 by 2 Correlation to Covariance Matrix Example 1p A,B 1 AA 0 0 BB AA 0 0 BB ** =  A *  A p A,B *  A *  B p A,B *  B *  A  B *  B Var(A)Cov(A,B) Var(B) = A2A2  A,B B2B2 =

73 Transformation between Covariance and Correlation Matrix From our initial relationship we can state: P= D -1.C.D -1 Where D -1 is the inverse of the standard deviation matrix D is a matrix with the standard deviations along the diagonal and zeros everywhere else (diagonal matrix) Because D is a diagonal matrix its inverse is simply the reciprocal of the elements along the diagonal.

74 2 by 2 Covariance to Correlation Matrix Example 1/  A 0 0 1/  B 1/  A 0 0 1/  B ** =  A 2 /(  A *  A )  A,B /(  A *  B )  B 2 /(  B *  B ) = A2A2   B2B2 1p A,B 1

75 Appendix 2: Expectation Operators The expectation operator measures the average value of some function of a random variable We will prove the 2 properties of the expectation operator: Firstly we note: Where X is the set of all possible values of x i and p x is the probability of a specific outcome

76 Since a is a constant For the second proof Where p x n y measures the probability of observing x i and y i together Since the probabilities are disjoint or mutually exclusive

77 This expectation can be re-expressed as Which is equivalent to This proof is for discrete random variables, we could produce a similar proof for continuous random variables using integration rather than summation

78 Appendix 3: Portfolio Variance The portfolios variance can be defined as:

79 Where cov is the covariance The intuition is that the variance of the portfolio depends not just on how the assets it contains move together but also on how they move together or co-vary (measured by covariance). We note the relationship is quadratic

80 Appendix 4: Correlation & the Cauchy-Schwarz Inequality Cauchy-Schwarz inequality is an important result from linear algebra which states:

81 We can write the correlation coefficient as From Cauchy-Schwarz we can see Implying that We can also prove that in the case where p is -1 or 1 (perfect correlation) the random variables x and y are linearly dependent

82 Appendix 5: Eigen Values of Semi- Positive Definite Matrices For a semi positive definite matrix C (N by N): If C is semi positive definite it is possible to decompose it into Where V is a vector whose columns are the Eigen Vectors of C and D is a diagonal matrix of its Eigen Values

83 Making this substitution we see: X is an arbitrary matrix resulting from this calculation: We can say: Since D is a diagonal matrix of Eigen Values (D ii is the i th Eigen Value and X i is the i th element of the vector X): Since X i 2 must be greater than or equal to zero for real values of X then we can see that this sum cannot be negative if the Eigen Values (D ii ) are also greater than or equal to zero. This formula can also be used as an extremely efficient way of calculating a Quadratic Form


Download ppt "Risk Analysis & Modelling Lecture 2: The Mean-Variance Model."

Similar presentations


Ads by Google