Monday, June 02, 2008

VALUE AT RISK (VAR) (PART 4)

Value-at-Risk (VaR)

by Simon Benninga and Zvi Wiener

Risk Mapping
“Risk mapping” is a nice wording for a pricing function. In a general case we might decompose the pricing function for each type of financial instrument into simple risk factors (perhaps using the option pricing techniques explained in our previous articles). However, in our simple example the current value of each instrument is a simple one-dimensional function of current market data. For example, the price of the stock is just its market value and the price of the bond isac its discounted future payoff translated to a local currency according to the current exchange rate. Next, we define the pricing functions for the stock index
and the foreign bond. Suppose we are given a list of market data, market={dayN[{1997,3,6}], 283.,5.26, 3.47}. The stock market price is the second item in this list, whereas the bond price in the local currency is
given by 100*3.47*exp[-5.26%*(time to maturity in years)]. We use Mathematica ’s calendar functions to define two dollar pricing functions:
Clear[stock,fbond]
stock[ param_, market_]:= market[[2]];
fbond[ param_,market_]:=market[[4]]*100*Exp[-market[[3]]/100*(param[[1]]-market[[1]])/365.25];
junk={dayN[{1997,8,9}],355.,5.77,6.};
stock[{},junk]
fbond[{1223},junk]
355.
512.08
Next we define
pricingFun[instr_]:=Switch[instr, STOCK,stock, FBOND,fbond]
valueP[ portf_, mrkt_]:=Module[{valueList, i},
valueList =Table[Apply[ pricingFun[ portf[[i,1]] ],
{portf[[i,2]], mrkt}]*portf[[i,3]],
{i,Length[ portf]}];
Apply[ Plus,valueList]
];
Check that it works
mrkt9Feb97 = {40, 293., 5.30, 3.4};
currentPrice = valueP[ portfolio, mrkt9Feb97]
299.63
If everything is correct we should get 299.63 since the current value of our stock position is 586 = 2 * 293, and the bond position has a value of -286.37 = -100 * 3.4 *e-0.053*1183/365.25.
For a VaR calculation we have to fix two parameters: the time horizon and the confidence level (1 - quantile). We choose a one day time horizon and an 80This time horizon is a typical one for financial institutions, however the confidence level 80% is very low, but it will allow us to use a short data file. For a higher precision much more data is necessary.
Historical Simulation
The first method we are presenting here is the historical simulation. We pretend that the change in the market conditions from today to tomorrow are the same as the to the changes that took place some time in the past. There is an important question on what type of current changes are the same as historic changes. The main difficulty is to distinguish between multiplicative and additive types of market variables. We provide here a simplistic scheme assuming that all changes are additive, for a detailed explanation
of this problem see [Grundy, Wiener 1996].
This procedure pretends that the change in market parameters from today to tomorrow will be the same as it was some time ago. The routine below returns a list of the historical prices. Note that this procedure is completely different from just pricing the current portfolio according to old data, in which case the global change in the market level is lost. Parameters of the historical simulation function are: portf - the current portfolio, mrkt - the current market data, histData - the historical data.
histSimul[ portf_, mrkt_, histData_]:=Module[{histPrice={}, i},
For[ i=1, i
AppendTo[ histPrice,
valueP[portf,
mrkt+histData[[i+1]]-histData[[i]]]
];
];
histPrice
];
To use this simulation for VaR measurement we use the following function, which requires in addition to the parameters described above the quantile.
HistApproach[ portf_, mrkt_, hData_, quant_]:=
Module[{currPrice, histPr, changes},
currPrice = valueP[ portf, mrkt];
histPr = histSimul[ portf, mrkt, hData];
changes = histPr - currPrice;
{Quantile[ changes, quant], changes, histPr}
];
The outcome of this function is a list of three objects.
The first one is the VaR, the second one is a list of pretended market changes in the value of our portfolio. The third is a list of resulting portfolio values.
4 MathematicainEducationandResearch Vol. 7 No. 4 1998
VALUE-AT-RISK (VAR)
HistApproach[portfolio, mrkt9Feb97,
dataVAR, 0.2]
{-3.0144, {4.30181, 4.52345, -9.10677, 4.05111,
-2.97692, 2.80083, 9.73534, -5.41111, 4.32482,
5.98798, 2.05111, 2.80083, -2.88394, 0.682656,
8.35297, 2.89323, -15.4328, -4.26466, 1.02308,
3.73534, -14.2647, 1.90504, 6.57746, 6.89323,
2.05111, -5.72633, -3.0144, 8.18042, 3.64322,
0.170379, -3.53993, 2.18042, 3.71166, 0.577459,
0.743977, 0.143757, -1.63311, 0.577459,
2.61594}, {303.932, 304.153, 290.523, 303.681,
296.653, 302.431, 309.365, 294.219, 303.955,
305.618, 301.681, 302.431, 296.746, 300.313,
307.983, 302.523, 284.197, 295.365, 300.653,
303.365, 285.365, 301.535, 306.207, 306.523,
301.681, 293.904, 296.615, 307.81, 303.273,
299.8, 296.09, 301.81, 303.342, 300.207,
300.374, 299.774, 297.997, 300.207, 302.246}}
Thus the simulated daily VaR at 20% level is a loss of $3.0144.

seja o primeiro a comentar!

Post a Comment

Edited By JuraganTAHU Design by Usuário ^