value at risk engine

20
Value at Risk Engine To compute the Initial Margin requirements for FX Forwards using Historical Simulation Name:Lov Loothra Company: Genpact Area:Finance College: IMT Ghaziabad

Upload: lov-loothra

Post on 21-Jan-2015

1.356 views

Category:

Economy & Finance


6 download

DESCRIPTION

The objective of this tool was to give a measure of the Value at Risk of the given asset class using techniques like Historical simulation and Monte Carlo simulation. I was involved in the design of a package for estimating the Initial Margin requirement for OTC Derivatives like FX Forward Contracts and Interest Rate Swaps using Historical Value at Risk. I also designed a prototype for running a Monte Carlo simulation on a given stock using Geometric Brownian Motion.

TRANSCRIPT

Page 1: Value at Risk Engine

Value at Risk Engine

To compute the Initial Margin requirements for FX Forwards using Historical Simulation

Name: Lov LoothraCompany: GenpactArea: FinanceCollege: IMT Ghaziabad

Page 2: Value at Risk Engine

Introduction & AgendaProject deals with optimal computation of the Historical Value at Risk (Historical VaR or HVaR) of FX Forward Contracts in order to estimate Initial Margin requirements.

What is Value at Risk?

Why use VaR?

Techniques for computing VaR

Detailed description of the methodology used in the project

References

AGENDA

Page 3: Value at Risk Engine

• A statistical tool which gives a measure of the market risk of an investment

• Requires 3 quantities to express completely:i. The holding period, tii. The potential loss, xiii. The probability for the said loss, p

• VaR is stated to be no more than x for a holding period of t with a probability of p

Holding period of 10 days

$1 Million $50,000

VaR @ 99% Confidence

What is Value at Risk?

Page 4: Value at Risk Engine

Initial Margin is a collateral that the holder of a financial instrument has to deposit to cover some or all of the credit risk of their counterparty. It is usually supposed to be large enough to cope with one-day losses on most days. As VaR is capable of giving an estimate of worst case scenarios, we can use it to help the firm estimate initial margin requirements.

• A popular and traditional measure of risk is Volatility

• Problem: it does not care about the direction of an investment's movement

• For investors, risk is about the odds of losing money

• VaR fits the bill perfectly because we can use it to answer questions like • "What is my worst-case scenario?" • "How much could I lose in a really bad month?"

• Usage of VaR grew tremendously post October 1994 with the release of J.P. Morgan’s RiskMetric™ system

• Basel Committee on Banking Supervision proposed in April 1995 to allow banks to calculate their capital requirements for market risk using VaR

• In our project, VaR estimate for FX Forward Contracts & IRS is used to determine Initial Margin requirements

Why use VaR?

Page 5: Value at Risk Engine

Variance-Covariance method

Monte Carlo Simulation

Historical method

Techniques for computing VaR

Page 6: Value at Risk Engine

• This methodology assumes a distribution for the underlying observations

• For normally distributed returns, VaR can be computed as:

VaR

Here: mean of the return distribution standard deviation of the return distributionzp value from z-table corresponding to beginning period value of the portfolio

• Example: Initial Value of Portfolio: $100. Returns follow a normal distribution with mean of 10% and a standard deviation of 20%.

• Assuming, 95% Confidence: VaR (5%) = – (10% – 20% 1.65) $100 = $23

Variance-Covariance Method

Page 7: Value at Risk Engine

• Geometric Brownian motion is applied to stocks in order to simulate future scenarios. This is modeled as:

dSt = μ St dt + σ St dWt

Here, St stock price at time tμ is the ‘drift’ of the stockσ is the ‘volatility’ of the stockWt is the stochastic randomness factor

• Stochastic Randomness is simulated by using a pseudo random number generator (we used the Mersenne Twister in our implementation)

• Drift, volatility and initial price of the stock are fed into the model and a large number of simulations are run to generate simulated ‘paths’ for the stock

• P&Ls are calculated for the simulated values & sorted in descending order of losses

• Finally, the value at pth percentile of the P&Ls is selected as the VaR

Monte-Carlo Simulation

Page 8: Value at Risk Engine

Monte-Carlo Simulation: Implementation

Page 9: Value at Risk Engine

• Non-parametric approach to VaR estimation: makes no assumption about the distribution of the underlying observations

• Works by using historical values of assets returns over a large period of time and applying them to the current value to generated ‘simulated’ values

• Simulated values are used to compute P&Ls w.r.t. the base price at computation date

• P&Ls are then sorted and the value lying at a certain percentile (based on the required confidence interval) gives us the VaR estimate

• Example: For 1000 simulated values and a confidence interval of 99%, the observation that determines VaR would be the (1% x 1000)th = 10th observation

• We used a modified historical simulation methodology in our project to compute FX Forward margins the details of which are given in the following slides

Historical Simulation

Page 10: Value at Risk Engine

• Obtain historical rates over the last 10 years from a reliable source for the currency pair for all required tenor points

• First 5 years are inputs pertaining to volatility computations whereas the next 5 are for the actual simulation

• Assuming we have 16 tenor points, we get the following 5-year zero-rate matrix:

• Compute the 5-day Log Return Matrix by taking the log of ratio of the continuously compounded zero rates and the fifth-previous business day

rt,j = log (Rt, j / Rt–5, j)

R1, 1 R1, 2 R1, 3 … R1, 16

R2, 1 R2, 2 R2, 3 … R2, 16

R3, 1 R3, 2 R3, 3 … R3, 16

… … … … …R1265, 1 R1265, 2 R1265, 3 … R1265, 16

Detailed Methodology

Page 11: Value at Risk Engine

• Applying the log returns formula to our matrix, we get:

• Compute a time series of volatility forecasts: EWMA (exponentially-weighted moving average) was used to construct a model capable of reacting to changes in the underlying volatility:

σ2

t, j = (1 – λ) r2t–1, j + λσ2

t–1, j

Here, σ volatility forecastr log returnλ time decay coefficient of historical log returns

• To avoid model error, first 5 years of data was used to generate a seed value for the EWMA forecast with the first value seeded as the square of the returns

r1, 1 r1, 2 r1, 3 … r1, 16

r2, 1 r2, 2 r2, 3 … r2, 16

r3, 1 r3, 2 r3, 3 … r3, 16

… … … … …r1260, 1 r1260, 2 r1260, 3 … r1260, 16

Detailed Methodology contd.

Page 12: Value at Risk Engine

• Applying the aforementioned transformation to our matrix, we get:

• Volatility Smoothing is performed to reduce noise and account for unwarranted fluctuations in margins and is done by averaging the forecasted volatility over a short look-back horizon:

σ'

t, j = σ't–1, j + α (σt, j – σ'

t–1, j)α = 2 / (L + 1)

Here, σ' smoothened volatilityα smoothing coefficientL look-back horizon (10 days in our project)

• Introduce the volatility floor around the least value of the implied volatility observed in a short period to prevent low margin values

σ1, 1 σ1, 2 σ1, 3 … σ1, 16

σ2, 1 σ2, 2 σ2, 3 … σ2, 16

σ3, 1 σ3, 2 σ3, 3 … σ3, 16

… … … … …σ1260, 1 σ1260, 2 σ1260, 3 … σ1260, 16

Detailed Methodology contd.

Page 13: Value at Risk Engine

• Flooring is done using the following equation:

σ''t, j = max { σ'

t, j , X% }

Here, σ'' modified volatility after the flooringσ' smoothened volatilityX% 97th percentile of recent sample of volatilities

• Calculate scaling coefficients by dividing the forecasted volatility by the historically determined EWMA volatility:

Ct, j = σ''t, j / σ'

t, j

• After applying the above formula to our matrix, we get:C1, 1 C1, 2 C1, 3 … C1, 16

C2, 1 C2, 2 C2, 3 … C2, 16

C3, 1 C3, 2 C3, 3 … C3, 16

… … … … …C1260, 1 C1260, 2 C1260, 3 … C1260, 16

Detailed Methodology contd.

Page 14: Value at Risk Engine

• Calculate scaled returns by taking the product of the scaling coefficient and the historical 5-day log return for each scenario and tenor point

• We generate a matrix of scaled returns as follows:

• Here, r* represents the matrix of scaled log returns

  r1, 1 r1, 2 r1, 3 … r1, 16   C1, 1 C1, 2 C1, 3 … C1, 16

  r2, 1 r2, 2 r2, 3 … r2, 16   C2, 1 C2, 2 C2, 3 … C2, 16

r* = r3, 1 r3, 2 r3, 3 … r3, 16 x C3, 1 C3, 2 C3, 3 … C3, 16

  … … … … …   … … … … …  r1260, 1 r1260, 2 r1260, 3 … r1260, 16   C1260, 1 C1260, 2 C1260, 3 … C1260, 16

  C1, 1 x r1, 1 C1, 2 x r1, 2 C1, 3 x r1, 3… C1, 16 x r1, 16

  C2, 1 x r2, 1 C2, 2 x r2, 2 C2, 3 x r2, 3… C2, 16 x r2, 16

r* = C3, 1 x r3, 1 C3, 2 x r3, 2 C3, 3 x r3, 3… C3, 16 x r3, 16

  … … … … …  C1260, 1 x r1260, 1 C1260, 2 x r1260, 2 C1260, 3 x r1260, 3

… C1260, 16 x r1260, 16

Detailed Methodology contd.

Page 15: Value at Risk Engine

• Compute the Shocked US Zero Curves and Shocked FX Forward Curves by applying the matrix of scaled log returns to the base curves (US Zero curve and FX Forward curve) as on the margin date:

R*t, j = R T, j · e ^ (r*

t, j)

Here, R*t, j shocked curve of the jth tenor point

RT, j base curve on the margin dater*

t, j scaled log returns at time t & tenor point j

• Base curve matrix, R, where t = the margin date for all tenors is [R1, R2, … , R16]; the final matrix of 1260 scenarios is obtained as shown below:

  R1 e^(r*1, 1) R2 e^(r*

1, 2) R3 e^(r*1, 3) … R16 e^(r*

1, 16)

  R1 e^(r*2, 1) R2 e^(r*

2, 2) R3 e^(r*2, 3) … R16 e^(r*

2, 16)

R* = R1 e^(r*3, 1) R2 e^(r*

3, 2) R3 e^(r*3, 3) … R16 e^(r*

3, 16)

  … … … … …  R1 e^(r*

1260, 1) R2 e^(r*1260, 2) R3 e^(r*

1260, 3) … R16 e^(r*1260, 16)

Detailed Methodology contd.

Page 16: Value at Risk Engine

• Compute Portfolio Value from the shocked forward curve for all scenarios:

• Compute the portfolio Profit/Loss (P&L) by taking the difference between the Portfolio Value for each scenario & the Base Portfolio Value on the margin date:

• Sort the P&Ls in ascending order of losses and use the required confidence interval (99.7 in our project) to extract the required margin:

Required value of Initial Margin = P&L0.3th

SC1, 1 SC1, 2 SC1, 3 … SC1, 16   PV1

SC2, 1 SC2, 2 SC2, 3 … SC2, 16   PV2

SC3, 1 SC3, 2 SC3, 3 … SC3, 16⇒ PV3

… … … … …   …SC1260, 1 SC1260, 2 SC1260, 3 … SC1260, 16   PV1260

PV1   P&L1

PV2   P&L2

PV3 – Base Price margin-date = P&L3

…   …PV1260   P&L1260

Detailed Methodology contd.

Page 17: Value at Risk Engine

Shocked US Zero Curve

FX – Forward HVAR Implementation

Page 18: Value at Risk Engine

• The tool that I’ve developed is now capable of accepting new trades via an input form and computing the Initial Margin for EURUSD FX Forward Contracts

• I’ve added dynamic support for up to 19 tenor points and potentially unlimited historical data

• Support for other currency pairs would need to be added

• We also used a similar methodology to compute initial margin requirements for Interest Rate Swaps

Status and Future Scope

Page 19: Value at Risk Engine

1. Linsmeier, Thomas J. and Pearson, Neil D. “Risk Measurement: An Introduction to Value at Risk”, University of Illinois at Urbana-Champaign, July 1996

2. J. P. Morgan/Reuters “RiskMetrics™: Technical Document”, Fourth Edition, 17 December 1996

3. Elliot, Timothy R. “Certification of the Change in Performance Bond Methodology from SPAN to HVaR for cleared OTC FX Spot, Forward and Swap Transactions”, Chicago Mercantile Exchange Rule Submission, 30 March 2012

References

Page 20: Value at Risk Engine

THANK YOU!