Vous êtes sur la page 1sur 5

Calculation for Portfolio VaR including Option.

Problem:
A portfolio consists of following assets:

1. Sell 1,750,000 CAD/SEK at a rate of 6.7720


2. Sell 3,250,000 CHF/SEK at a rate of 5.9462
3. Sell 2,000,000 EUR/CAD at a rate of 1.4033
4. Sell 1,700,000 EUR/RON at a rate of 3.4790
5. Sell 20,000,000 NOK/SEK at a rate of 1.1771
6. Buy 6,000,000 USD/JPY at a rate of 116.96
7. Sell 4,000,000 USD/MXN at a rate of 10.5723
8. Buy 4,000,000 USD/ZAR at a rate of 6.1285
9. Buy 10,000,000 [USD put / KRW call] with a of 923, expiring March 17, 2007,100000 USD

We to calculate the 95% Portfolio VaR

Steps for calculation of the Portfolio VaR:

1. Step-1

Get the exchange rates for all currencies. Here exchange rates from April-04, 2005 to March-31, 2006, for all
currencies are taken. And we want to calculate the portfolio VaR for April-01, 2006 . Suppose,

Ei ,cad / sek = Exchange rate for cad/sek for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
Ei ,chf / sek = Exchange rate for chf/sek for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
Ei ,eur / cad = Exchange rate for eur/cad for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
Ei ,eur / ron = Exchange rate for eur/ron for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
Ei ,nok / sek = Exchange rate for nok/sek for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
Ei ,usd / jpy = Exchange rate for usd/jpy for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
Ei ,usd / mxn = Exchange rate for usd/mxn for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
Ei ,usd / zar = Exchange rate for usd/zar for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
Ei ,usd / krw = Exchange rate for usd/krw for date i, i = 4 / 4 / 2005,.................,31/ 3 / 2006
2. Step-2

We calculate the return for each exchange rate. Using the following formula:
E
Ri ,cad / sek = ln i -1,cad / sek , i, i = 5 / 4 / 2005,.................,31/ 3 / 2006

E
i ,cad / sek
Similarly other returns for other currency exchange, up to USD/ZAR have been calculated.

3. Step-3: Calculation of Returns for Option.

Here we 1st calculated the option prices for each date, using the following formula:
- rf t
p = -s e (- d1 ) + x e - rd t (- d 2 )
d 2 = d1 - s t
s s2
ln + rd - rf + t

x 2
d1 =
s t
Where,
S = USD/KRW spot exchange rate. On 4/4/2005, it is 1013.20
K = Strike exchange rate, 923
351
t = Time to maturity in YEAR, = 1.404 Year
250
r f = Riskless rate of a interest for US [NOT in percentage] on 4/4/2005, 0.0278
r d = Riskless rate of a interest for KR [NOT in percentage] on 4/4/2005, 0.0371
s = Annualized volatility measured from GARCH(1,1)
This is the Put option price in KRW. So we have to convert it in USD. To do so we divide the Put option
price, which is in KRW by 985.513, USD/KRW exchange rate on March-31,2006. So for each date we get
the Put-option price in USD. Suppose we denote this as : Pi , i = 4 / 4 / 2005,.................,31/ 3 / 2006

Then, we calculate the return by Ri ,Option , i = 5 / 4 / 2005,.................,31/ 3 / 2006 .


Thus we get a Return matrix R 2499

4. Step-4

Now we calculate the Correlation Matrix. Let it is C 99


5. Step-5

Decompose C 99 according to CLOSKEY DECOMPOSITION, such that C = AA


, where A is lower
triangular matrix.

6. Step-6

Draw a random sample of size 1000 from N (0,1) , and repeat this 9 times. So we get a random matrix
Rand 10009

7. Step-7

Calculate ( z%
1
1000
1
, z210001 ,.....z910001 ) = Z 10009 = ( A99 Rand 91000 )
% %
. This gives a random matrix

whose columns are correlated according to C . Each column of Z multiplied with s i , i = 1,...,9 , SD of
Return for ith asset, gives the simulated return for each asset in our portfolio for next day. For example
s 1 z110001 gives the simulated return price for CAD/SEK exchange for April-1, 2006.
%

8. Step-8

Now we calculate the value of exposure for each asset in USD on March-31, 2006. This is given by the
vector:
P0 = ( P0 j ) = ( -224453.25,-416841.75,-1714310,-585004,-2565180,6000000,-4000000,4000000,100000 )
%
Step-9
Now we construct the simulated asset P/L matrix p110009 = (( p ))
1i , j for date April-1, 2006. Where

p1i , j denotes the i th


scenario for jth asset on April-01, 2006. (for one day time period) Where,

p1i , j = p0j e ( s j Zi , j
)
- 1 , j = 1, 2,...,9 i = 1, 2,....,1000

Step-10
10009
We calculate the 1000 scenarios of Portfolio P/L by adding the elements of each row of p1 . Let it is
9
G 1000
1
where i element of G
th 1000
1
is gi = p1i , j , i = 1,....,1000 .
% % j =1

Step-11

We calculate the 5th percentile for gi ' s . This gives the portfolio VaR in USD. For our calculation it is
126992.09 USD. Suppose it corresponds to kth element of G . And the component VaR for ith asset in our
%
portfolio is given by 1 USD. p i ,k

All calculation here was performed in R, here the R code is:


all.return = read.csv("e:/arun/Currency_option/all_return.csv")
# this gives the file path------------------------------------------
n = length(all.return)
corr = cor(all.return)
#------------------------------------------------------------------------
# A = closkey decomposition
#------------------------------------------------------------------------
A = t(chol(corr))
#------------------------------------------------------------------------
# Y is to get RANDOM NUMBERS following N(0,1)
#------------------------------------------------------------------------
Y = matrix(ncol=n,nrow=1000)
for (i in 1:n)
{
Y[,i] = rnorm(1000)
}
Z = A%*%(t(Y))
Z = t(Z)
#-------------------------------------------------------------------------
#Calculation for and P/L scenario in USD for EACH ASSET on April-01,2006
#-------------------------------------------------------------------------
p0 = c(-224453.25,-416841.75,-1714310,-585004,-2565180,6000000,-4000000,4000000,100000)
sd = c(0.0110600,0.0105340,0.0044164,0.0060923,0.0106839,0.0042901,0.0032239,0.0078137,0.3323140)
value = matrix(nrow=1000,ncol=n+1)
for (j in 1:n)
{
for (i in 1:1000)
{
value[i,j] = p0[j]*exp(sd[j]*z[i,j]) - p0[j]
}
}
#-------------------------------------------------------------------------
#PORTFOLIO VALUE in USD on March-31,2006
#-------------------------------------------------------------------------
today.portfolio = 676536.28
#-------------------------------------------------------------------------
#Calculation for total P/L scenario in USD for EACH SCENARIO on April-01,2006
#-------------------------------------------------------------------------
for (i in 1:1000)
{
sum = 0
for (j in 1:n)
{
sum = sum + value[i,j]
}
value[i,n+1] = sum
}
hx <- hist(value[,n+1], breaks=50, plot=FALSE)
plot(hx, col=ifelse((hx$breaks) < quantile(value[,n+1],probs=0.05), 2, 4))
write.table(value,file="e:/arun/Currency_option/simulation.csv",col.names=T,row.names=F,sep=",")
edit(value)
quantile(value[,n+1],probs=0.05)

Vous aimerez peut-être aussi