Portfolio Optimization by Risk Diversification

Portfolio Optimization by Risk Diversification

Minimum Variance Two Asset Portfolio

Portfolio optimization by risk diversification was originally described by Markowitz in 1952. He received in 1989 the John von Neumann Theory Prize and in 1990 the Nobel Memorial Prize in Economic Sciences. The list of the laureats can be found here.

We assume a portfolio P of two assets A and B with proportions 

xA=x and xB=(1x).

We compile the proportions into a row vector x'

x=[xAxB]=[x(1x)]=x[11]+[01]=xeAB+eB,

where

eAB=[11] and eB=[01].

The expected return rates

μA=E(RA) and μB=E(RB)

are collected in a column vector μ

μ=[μAμB]

The expected return of the portfolio is the scalar μp

xμ=[xeAB+eB][μAμB]=xeAB[μAμB]+eB[μAμB]=x[11][μAμB]+[01][μAμB]=μP.

or explicitly

μp=xμAxμB+μB=μB+x(μAμB).

Let ρAB the correlation and Σ be the (2x2) variance-covariance matrix of the random returns of the two assets A and B

Σ=[σ2AσABσBAσ2B]=[σ2AσAσBρABσBσAρBAσ2B],

then the variance or risk of portfolio P is the quadratic form

xΣx=[xeAB+eB]Σ[xeAB+eB]=x2eABΣeAB+2xeABΣeB+eBΣeB=σ2P0

where

xeABΣ[xeAB+eB]=xeABΣxeAB+xeABΣeB,

eBΣ[xeAB+eB]=eBΣxeAB+eBΣeB,

eABΣeAB=[σ2A2σAσBρAB+σ2B],

eABΣeB=[σAσBρABσ2B],

eBΣeB=[σ2B],

and explicitly

σ2P=x2[σ2A2σAσBρAB+σ2B]+2x[σAσBρABσ2B]+σ2B0.

To obtain the minimal risk we compute the derivative of the variance to the scalar x, set the derivative to zero and solve for xMVP that is the proportion for asset A in the minimum variance portfolio.

σ2px=2xeABΣeAB+2eABΣeB=0

xeABΣeAB=eABΣeB

xMVP=eABΣeBeABΣeAB=(σ2BσAσBρAB)(σ2A2σAσBρAB+σ2B).

(1 - xMVP) is the proportion for asset B in the minimum variance portfolio

(1xMVP)=eABΣeABeABΣeAB+eABΣeBeABΣeAB=eABΣ(eAB+eB)eABΣeAB=(σ2AσAσBρAB)(σ2A2σAσBρAB+σ2B).

xMVP designates a minimum, if the second order derivative is not negative:

2σ2px2=eABΣeAB=(σ2A2σAσBρAB+σ2B)0.

So we check whether

σ2A+σ2B2σAσBρAB.

Inspired by proof#4 of the Pythagorean theorem we can write

σ2A+σ2B=4σAσB2+(σBσA)2=2σAσB+(σBσA)2.

The Pythagorean theorem says

a2+b2=c2=4ab2+(ba)2=2ab+(ba)2,

where

ab2= area of the triangle with smaller side lengths a and b

and

(ba)2= area of the "inner" square left over, when placing the 4 triangles abc within square c^2

So we check, whether the following inequality holds for all ρAB:

σ2A+σ2B=2σAσB+(σBσA)22σAσBρAB.

2σAσBρAB={2σAσB,ρAB=12σAσBρAB<2σAσB,0<ρAB<10,ρAB=02σAσBρAB>2σAσB,1<ρAB<02σAσB,ρAB=1

 This is true forall ρAB, so xMVP guarantees minimal risk for a two-asset portfolio P.

 

References

  • Cottin, Claudia & Döhler, Sebastian, Risikoanalyse: Modellierung, Beurteilung und Management von Risiken mit Praxisbeispielen, Wiesbaden: Vieweg + Teubner, 2009, ISBN 978-3-8348-0594-2
  • Green, Paul E. & Carroll, J. Douglas, Mathematical Tools for Applied Multivariate Analysis, New York-San Francisco-London: Academic Press, 1976, ISBN 0-12-297550-2
  • Harry Markowitz, The Journal of Finance, Vol. 7, No. 1 (Mar., 1952), pp. 77-91
  • Proof#4, Pythagorean Theorem, www.cut-the-knot.org/pythagoras/index.shtml#4 (visited 2018/04/23)

 

Code of WebPPL program: Minimum Variance Two Asset Portfolio

console.log("==============================================================================")
console.log("file: PCM20180415_MinimumVarianceTwoAssetPortfolio  *** PCM *** 2018/04/24 ** ")
console.log("      the numerical example was taken from:                                   ")
console.log("          Cottin, Claudia & Döhler, Sebastian, Risikoanalyse: Modellierung,   ")
console.log("                  Beurteilung und Management von Risiken mit Praxisbeispielen,")
console.log("                  Kap.4.2.2.3, S.181f., Wiesbaden: Vieweg + Teubner, 2009,    ")
console.log("                  ISBN 978-3-8348-0594-2                                      ")
console.log("==============================================================================")
var startTime = Date.now()
var sigmaA = 0.2
console.log("sigmaA = ", sigmaA)
var sigmaB = 0.4
console.log("sigmaB = ", sigmaB)
var muA = 0.1
console.log("muA = ", muA)
var muB = 0.2
console.log("muB = ", muB)
var rhoAB =[1.0, 0.5, 0.0,-0.5,-1.0]
console.log("vector of hypothetical asset correlations"); print(rhoAB)
console.log("==============================================================================")
//-------------------------------------------------------------------------------------------
var runTime = function(startTime) {
  var stopTime = Date.now()
  var runTimeInMsec = (stopTime - startTime)
  var runTimeInSec = runTimeInMsec/1000.
  var runTimeInMin = runTimeInSec/60.
  console.log("runTimeInMsec ---> ", runTimeInMsec)
  console.log("runTimeInSec  ---> ", runTimeInSec)
  console.log("runTimeInMin  ---> ", runTimeInMin)
}
//-------------------------------------------------------------------------------------------
var xMVP_funct = function(rAB) {
  (Math.pow(sigmaB,2)
   - sigmaA*sigmaB*rAB)/(Math.pow(sigmaA,2) - 2*sigmaA*sigmaB*rAB + Math.pow(sigmaB,2))
}
var OneMinus_xMVP_funct = function(rAB) {
  (Math.pow(sigmaA,2)
   - sigmaA*sigmaB*rAB)/(Math.pow(sigmaA,2) - 2*sigmaA*sigmaB*rAB + Math.pow(sigmaB,2))
}
//-------------------------------------------------------------------------------------------
var muMVP = function(xMVP) {
  return (muB - (muB - muA) * xMVP)
}
//-------------------------------------------------------------------------------------------
var varSigmaPSQ = function(x, rho){
  var sigmaASQ = Math.pow(sigmaA, 2)
  var sigmaBSQ = Math.pow(sigmaB, 2)
  var sigmaA_sigmaB_rhoAB = sigmaA*sigmaB*rho
  var sigmaPSQ = Math.pow(x,2)*(sigmaASQ - 2*sigmaA_sigmaB_rhoAB + sigmaBSQ) +
      2*x*(sigmaA_sigmaB_rhoAB - sigmaBSQ) + sigmaBSQ
  return sigmaPSQ
}
//-------------------------------------------------------------------------------------------
var muP = function(x) {
  var mu = x*muA + (1 - x) * muB
  return mu
}
//-------------------------------------------------------------------------------------------
console.log("==============================================================================")
var xs = mapN(function(n){n/100.0 - 1.0}, 301)
var muPs = map(muP, xs)
viz.line(xs, muPs, {xLabel:"Proportion x(A) of asset A", yLabel:"expected return mu(A)"})
console.log("==============================================================================")
map(function(rho){
  console.log("============================================================================")
  console.log("rho_AB = ", rho)
  console.log("==============")
  var xMVP = xMVP_funct(rho)
  console.log("xMVP = ", xMVP)
  var OneMinus_xMVP = OneMinus_xMVP_funct(rho)
  console.log("1-xMVP = ", OneMinus_xMVP)
  var xMVP_check = xMVP + OneMinus_xMVP
  console.log("check: |xMVP+(1-xMVP) - 1| < 10E6 = ", Math.abs(xMVP_check - 1) < 10E6)
  console.log("muMVP = ", muMVP(xMVP))
  var sigmaPSQ_MVP = varSigmaPSQ(xMVP, rho)
  console.log("minimum variance sigma^2_P_MVP = ", sigmaPSQ_MVP)
  console.log("minimum variance sigma_P_MVP = ", Math.sqrt(sigmaPSQ_MVP))
  var sigmaPSQs = map(function(x){varSigmaPSQ(x,rho)}, xs)
  viz.line(xs, sigmaPSQs, {xLabel:"Proportion x(A) of asset A", yLabel:"Risk(P) = sigmaP^2"})
  var sigmaPs = map(function(sigmaPSQ){Math.sqrt(sigmaPSQ)}, sigmaPSQs)
  viz.line(xs,sigmaPs,{xLabel:"Proportion x(A) of asset A", yLabel:"sqrt(Risk(P)) = sigmaP"})
  viz.line(muPs, sigmaPs, {xLabel:"muP", yLabel:"sigmaP"})
  viz.line(sigmaPs, muPs, {xLabel:"sigmaP", yLabel:"muP"})
}, rhoAB)
  console.log("============================================================================")
console.log("runTime = "); display(runTime(startTime))
console.log("==============================================================================")

Remarks related to the following computer output

The problem is described e.g. in Cottin, 2009, ch.4.2.2. From ch. 4.2.2.3 we used their numerical example with two assets with μ(A) = 0.1, μ(B) = 0.2, σ(A) = 0.2, and σ(B) = 0.4. Thus asset B has both a higher return and risk.


For the correlation ρ(A,B) Cottin & Döhler assumed values +1.0, 0.0,-1.0. To that set we added two correlations +0.5 and -0.5.


Output of our WebPPL program is xMVP (= proportion of asset A in the minimum variance portfolio (MVP)), 1 - xMVP (= proportion of asset B in the minimum variance portfolio), variance and standard deviation of the MVP, and the expected return μMVP of the MVP.


Furthermore, we display the σ-μ and μ-σ diagrams. These diagrams demonstrate the efficient border of portfolio; that is what kind of portfolios can be generated by mixing A and B.


In contrast to Cottin & Döhler and others we use only one constraint. Weights have to sum to one. They need be constrained like 0 <= xMVP, (1-xMVP) <= 1.0. In the case of negative weights we have a short position.


This is quite natural when we already possess a portfolio and we only want to readjust weights. Then a negative weight means "sell" and and a weight greater than 1.0 means "buy more".


This special case occured in our analysis when rho(A,B) = +1.0. Cottin & Döhler do not explicitly offer weights. They only write that the minimum variance portfolio should contain only asset A with 100%. Our WebPPL program computes weights xMVP(A) = xMVP = 2.0 and xMVP(B) = (1-xMVP) = -1.0. That is a recommendation for a portfolio owner to sell asset B and reinvest this budget into asset A.

Output of WebPPL Program: Minimum Variance Two Asset Portfolio


==============================================================================

file: PCM20180415_MinimumVarianceTwoAssetPortfolio  *** PCM *** 2018/04/24 ** 

      the numerical example was taken from:                                   

          Cottin, Claudia & Döhler, Sebastian, Risikoanalyse: Modellierung,   

                  Beurteilung und Management von Risiken mit Praxisbeispielen,

                  Kap.4.2.2.3, S.181f., Wiesbaden: Vieweg + Teubner, 2009,    

                  ISBN 978-3-8348-0594-2                                      

==============================================================================

sigmaA =  0.2

sigmaB =  0.4

muA =  0.1

muB =  0.2

vector of hypothetical asset correlations

[1,0.5,0,-0.5,-1]

(3)

==============================================================================

===========

see Fig01 below

===========

============================================================================

rho_AB =  1

==============

xMVP =  2

1-xMVP =  -1

check: |xMVP+(1-xMVP) - 1| < 10E6 =  true

muMVP =  0

minimum variance sigma^2_P_MVP =  0

minimum variance sigma_P_MVP =  0

===========

see Fig02 below

===========

===========

see Fig03 below

===========

===========

see Fig04 below

===========

===========

see Fig05 below

===========

============================================================================

rho_AB =  0.5

==============

xMVP =  1

1-xMVP =  0

check: |xMVP+(1-xMVP) - 1| < 10E6 =  true

muMVP =  0.1

minimum variance sigma^2_P_MVP =  0.04000000000000001

minimum variance sigma_P_MVP =  0.2

===========

see Fig06 below

===========

===========

see Fig07 below

===========

===========

see Fig08 below

===========

===========

see Fig09 below

===========

============================================================================

rho_AB =  0

==============

xMVP =  0.8

1-xMVP =  0.2

check: |xMVP+(1-xMVP) - 1| < 10E6 =  true

muMVP =  0.12

minimum variance sigma^2_P_MVP =  0.03200000000000003

minimum variance sigma_P_MVP =  0.17888543819998326

===========

see Fig10 below

===========

===========

see Fig11 below

===========

===========

see Fig12 below

===========

===========

see Fig13 below

===========

============================================================================

rho_AB =  -0.5

==============

xMVP =  0.7142857142857143

1-xMVP =  0.28571428571428575

check: |xMVP+(1-xMVP) - 1| < 10E6 =  true

muMVP =  0.12857142857142856

minimum variance sigma^2_P_MVP =  0.017142857142857154

minimum variance sigma_P_MVP =  0.13093073414159548

===========

see Fig14 below

===========

===========

see Fig15 below

===========

===========

see Fig16 below

===========

===========

see Fig17 below

===========

============================================================================

rho_AB =  -1

==============

xMVP =  0.6666666666666666

1-xMVP =  0.3333333333333333

check: |xMVP+(1-xMVP) - 1| < 10E6 =  true

muMVP =  0.13333333333333336

minimum variance sigma^2_P_MVP =  0

minimum variance sigma_P_MVP =  0

===========

see Fig18 below

===========

===========

see Fig19 below

===========

===========

see Fig20 below

===========

===========

see Fig21 below

===========

============================================================================

runTime = 

runTimeInMsec --->  2992

runTimeInSec  --->  2.992

runTimeInMin  --->  0.04986666666666666

==============================================================================
Webmaster (Changed: 20 Jun 2024)  Kurz-URL:Shortlink: https://uol.de/p55793en | # |
Zum Seitananfang scrollen Scroll to the top of the page