Home / Reply To: Getting started

Home Forums General Getting started Reply To: Getting started

#6276

Hi,

let’s look at Example_15, which provides a VaR calculation of a portfolio of trades. Furthermore let’s focus on EQ_CALL_SP5 which is an equity option corresponding to the case you are looking at. This trade has sensitivities to

– the USD discount curve
– the SP5 equity forecast curve
– the SP5 equity spot
– the SP5 equity volatility surface
– and finally the USDEUR FX Spot rate, since the reporting currency is EUR

To compute a parametric VaR you can provide a covariance matrix for all of these risk factors that influence the trade’s NPV. Notice that the covariance matrix contains the variances of the single risk factors on the diagonal, so even if we only consider one single risk factor it makes sense to provide a (1×1) covariance matrix, the only entry being the variance of this factor. You do not need to provide each cell of the covariance matrix, missing values are assumed to be zero. In case of zero variances (diagonal elements of the matrix) for a risk factor with a non-zero sensitivity, a warning is logged though indicating that the covariance matrix specification is incomplete.

As an example let’s take the equity spot sensitivity (from the output file sensitvitiy.csv)

`EQ_CALL_SP5,EquitySpot/SP5/0/spot,21.475600,179736.37,7599.69,156.28`

for which in covariance.csv we have the variance

`EquitySpot/SP5/0/spot EquitySpot/SP5/0/spot 100`

which has the following interpretation: Since we are computing equity spot sensitivities by applying a 1% relative shift, as can be seen in the input file sensitivity.xml

``````  <!-- Equity spot shifts -->
...
<EquitySpot equity="SP5">
<ShiftType>Relative</ShiftType>
<ShiftSize>0.01</ShiftSize>
</EquitySpot>``````

the variance is expected to be consistent with this shift type, i.e. the variance of relative movements of the equity spot expressed in percent. In other words you could estimate the variance on a historical time series by computing the sample variance of daily percentage relative changes 100.0 * (Spot(t+1) – Spot(t)) / Spot(t) of the equity spot. If you plug this value into covariance.csv the resulting value at risk will be a 1-day value at risk w.r.t. the given confidence level.

If you instead want to compute a say 10-day value at risk, you could for example

– estimate the variance of 10d changes 100.0 * (Spot(t+10)-Spot(t)) / Spot(t) directly on your time series, with an overlapping or non-overlapping 10 day window, or
– use your 1d estimate for the variance and scale (multiply) this by 10, following the square-root of time rule (notice we scale a variance here, not a standard deviation, so no square root shows up)

or use another method to arrive at an estimate for the 10 day variance. This is what is meant by “no scaling is applied” in the user guide. i.e. you directly provide the variance consistent with the horizon of the value at risk calculation. In the example covariance.csv we have

`EquitySpot/SP5/0/spot EquitySpot/SP5/0/spot 100`

which means that the variance of the equity spot risk factor key is 100, i.e. the standard deviation of relative equity spot moves is 10%. If we wanted to specify a correlation with another equity “Lufthansa” assume first we have a variance of the Lufthansa spot of 200, i.e.

`EquitySpot/Lufthansa/0/spot EquitySpot/Lufthansa/0/spot 200`

Then if the correlation between the two spots’ relative movements is 30% we would add a line

`EquitySpot/SP5/0/spot EquitySpot/Lufthansa/0/spot 42.4264`

because the covariance is the correlation times the standard deviation of SP5 and Lufthansa respectively, i.e. 0.3 * sqrt(100) * sqrt(200). Notice that in the covariance file of Example_15 no non-zero correlations are specified.

Does that make sense to you?

Best Regards
Peter