What's new

# VaR using Monte Carlo Simulation (Geometric Brownian Motion)

#### Ashok_Kothavle

##### Member
Hello Mr David,

I do understand the Historical Simulation as well as Var covar method, Especially in VaR Covar mapping of multiple positions into standardized risk factors as well as application of EWMA etc also I am aware. But when it comes to Monte Carlo, I am always confused.

(1) I remember reading in one of Carol Alexander's books on Market Risk (I think mostly Volume no 4 or may be in her discussion forum), she has mentioned that if we assume all the risk factors follow Multivariate Normal Distribution, it doesn't make sense in using Monte Carlo if we are using the Varcovar. The difference in VaR values can be attributed to sampling error.

(2) However, still if I need to use Monte carlo with the underlying assumption that risk factors follow Multivariate Normal Distribution, what Statistical tests I need to check this Multivariate Normal Distribution. Had it been uni-variate, I would have used Kolmogorv Smirnov or Anderson Darling test to check this assumption, but in case of Multivariate distribution, what are the tests?

(3) If at all I need to continue with Monte Carlo with the underlying assumption of Multivariate Normal distribution, how do I use Geometric Brownian Motion (GBM) to compute VaR at say 99%? Do you have some readily available spreadsheet for Monte carlo using GBM?

Regards
Ashok

#### berrymucho

##### Member
Not exactly sure of what you're asking under (3). Let me take a stab at it...

(1) Agree.

(2) Check for instance Mardia's test (and also package MVN if you're a user of the statistical computing tool R)...

(3) Let's take N instruments whose dynamics is captured by 2 risk factors only (that'll refer to, with some flexibility, as "assets" here). One very handy property of the normal distribution is that it is stable, meaning that a linear combination of multiple normally distributed quantities is going to be normally distributed as well. In the end we're interested in the VaR of a portfolio made up of these instruments. A portfolio is nothing else but a weighted sum (=linear combination) of the underlying instruments. So if the risk factors are normally distributed, so will be the returns of your portfolio. You can determine your VaR "by hand" if you know the correlation rho between assets A and B:

r_P = w r_A + (1-w) r_B
(σ_P)^2 = w^2 (σ_A)^2 + (1-w)^2 (σ_B)^2 + 2 w(1-w) rho σ_A σ_B
VaR_P = - r_P + z σ_P

If you want to use a MC, you'd have to simulate the multivariate risk factors driving your assets, reprice your portfolio of assets at each iteration, build your distribution of r_P and finally measure the VaR percentile (of the distribution of r_Ps) based on your total number of iterations. Even though one might be looking at a large number of assets that follow a particular multivariate distribution, VaR remains a scalar quantity as it relates to the same portfolio of aggregated (=linear combination) assets. Basically in the above, your multivariate MC is going to give you a pair of properly correlated r_A and r_B for each iteration (via the risk factors), which results in one new r_P value that you'll add to your distribution. If your risk factors follow a GBM, there are ways to generate correlated GBMs, but the determination of the portfolio VaR remains the same. Hope this helps.

#### Ashok_Kothavle

##### Member
Not exactly sure of what you're asking under (3). Let me take a stab at it...

(1) Agree.

(2) Check for instance Mardia's test (and also package MVN if you're a user of the statistical computing tool R)...

(3) Let's take N instruments whose dynamics is captured by 2 risk factors only (that'll refer to, with some flexibility, as "assets" here). One very handy property of the normal distribution is that it is stable, meaning that a linear combination of multiple normally distributed quantities is going to be normally distributed as well. In the end we're interested in the VaR of a portfolio made up of these instruments. A portfolio is nothing else but a weighted sum (=linear combination) of the underlying instruments. So if the risk factors are normally distributed, so will be the returns of your portfolio. You can determine your VaR "by hand" if you know the correlation rho between assets A and B:

r_P = w r_A + (1-w) r_B
(σ_P)^2 = w^2 (σ_A)^2 + (1-w)^2 (σ_B)^2 + 2 w(1-w) rho σ_A σ_B
VaR_P = - r_P + z σ_P

If you want to use a MC, you'd have to simulate the multivariate risk factors driving your assets, reprice your portfolio of assets at each iteration, build your distribution of r_P and finally measure the VaR percentile (of the distribution of r_Ps) based on your total number of iterations. Even though one might be looking at a large number of assets that follow a particular multivariate distribution, VaR remains a scalar quantity as it relates to the same portfolio of aggregated (=linear combination) assets. Basically in the above, your multivariate MC is going to give you a pair of properly correlated r_A and r_B for each iteration (via the risk factors), which results in one new r_P value that you'll add to your distribution. If your risk factors follow a GBM, there are ways to generate correlated GBMs, but the determination of the portfolio VaR remains the same. Hope this helps.
Dear berrymucho,

Thanks a lot for this valuable input. Now I have some clarity about the whole stuff. As regards point no (2), yes I use CRAN R extensively and will definitely go through the package MVN. Heartfelt thanks again.

Regards

Ashok

#### berrymucho

##### Member
Ashok,

You're very welcome. My explanation above takes a number of shortcuts, if you want more detail in regard to point (3), you may want to check out the original technical documentation for RiskMetrics when it was first released back in 1994:

https://www.msci.com/documents/10199/5915b101-4206-4ba0-aee2-3449d5c7e95a

Chapter 7 in that doc in particular will give you plenty of detail in regard to how the MC simulation is carried out and the portfolio VaR evaluated. It is surprisingly well written for a technical manual, it reads like a textbook.

#### Ashok_Kothavle

##### Member
Dear Berrumucho,

Thanks a lot for the link. Technical document is really a worth reading at least a couple of times. It was very useful.

Thanks again

Regards

Ashok

#### Ashok_Kothavle

##### Member
Mr David

I have tried to create an excel to compute VaR using Monte Carlo Simulation (Geometric Brownian Motion). I have defined return as DRIFT + correlated ZValue * Stdev. The Zvalue is arrived at by multiplying NORMSINV(Rand()) values by the Cholesky decomposition matrix.

If I use the holding period = 10, I understand the return will be = DRIFT * 10 + correlated ZValue * Stdev * Sqrt(10).

Simulated Price = Current Price * Exp(DRIFT + correlated ZValue * Stdev * Sqrt(Holding period)).

Mr David, will appreciate if you can kindly go through the excel as and when you get time.

Regards

Ashok

#### Attachments

• 44.4 KB Views: 18

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
Hi @Ashok_Kothavle Because the 2-asset case is easy, i fixed the Cholesky Decomposition in your first tab (notice i have "manual checks" at col X & Y b/c i have long ago memorized the 2-asset correlated formula; and it does match the matrix math.) I didn't worry about anything else (simulated prices and returns), which should be easier, i just worried about the calculation of correlated Z values (columns V & W). I also added my 3 and 5-assets Cholesky XLS, in case you want to see them. I hope that's helpful, thanks!

#### Attachments

• 371.9 KB Views: 38

#### Ashok_Kothavle

##### Member
Mr David,

That was very very kind of you to update my spreadsheet. This spreadsheet will be an asset for not only me but whoever wants to study Monte Carlo. Its giving me message that some links are not getting updated. I will check it tomorrow as it is almost 2am in my country and seriously need to hit the bed right away.

Thanks and thanks again. I feel very honored to be associated with BT. Everyday, I access BT site at least 20+ times now.

Regards

Ashok

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
@Ashok_Kothavle sure thing, happy to help! I'm really glad BT is helpful for you. Re: links: I just don't see those, but I did move my MCS sheets over from other workbooks ... please let me know when you take a look, and i will try to fix links. Thanks!