Вы находитесь на странице: 1из 15

Introduction to variancecovariance VaR with

VaRworks
Monte Carlo Simulation, Historical Simulation, Variance
Covariance VaR, VaRdelta and Extreme Value Theory

Information in this document is subject to change without notice. Companies, names, and data used in
examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or
transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express
written permission of Financial Engineering Associates, Inc.
19951999 Financial Engineering Associates, Inc. All rights reserved.
@ENERGY, @EQUITY, @GLOBAL, @INTEREST, DerivaTool, SPAV, SWING, VaRdelta, VaRworks,
and Financial Engineering Associates design (logo) are registered trademarks and DTlib, EquiLib, ErgLib,
FEA Datepak, FEA Library Modules, GlobLib, IntrLib, MakeVC, SpavLib, SwingLib, VaRlib, ZCURVE,
and Zlib are trademarks of Financial Engineering Associates, Inc. in the United States of America.
Other brand or product names are trademarks or registered trademarks of their respective holders.
NOTICE: This manual does not constitute financial advice; users should consult their own financial
advisors regarding any such advice.
Carlos Blanco wrote this document.
Printed in the United States of America.
Financial Engineering Associates, Inc.
2484 Shattuck Ave., Suite 225
Berkeley, CA 94704-2029
USA
Tel:
+1-510-548-6200
Fax:
+1-510-548-0332
Email: info@fea.com
http://www.fea.com
Printed: 14-Mar-2000

TABLE OF CONTENTS
What is a cash flow map? ....................................................................................................................... 6
What is a vertex?..................................................................................................................................... 6
Why Vertices?......................................................................................................................................... 7
Allocating Cash Flows to a Single Vertex .............................................................................................. 7
Allocating Cash Flows to more than one Vertex .................................................................................... 7
Inputs .............................................................................................................................................................. 9
Volatility data ......................................................................................................................................... 9
Example of a Volatility File........................................................................................................................ 9
Correlation data..................................................................................................................................... 10
Example of a Correlation File................................................................................................................... 10
Asset Codes File ....................................................................................................................................... 11
Portfolio Data........................................................................................................................................ 12
Horizon (days) ...................................................................................................................................... 13
Confidence ............................................................................................................................................ 14

Value at Risk (VaR)


VaR tries to answer the simple question: How much money can we lose due to normal market movements?
However, the above question is far too imprecise. (Usually, any amount of loss is possible.) We can make
this question more precise rephrasing it in the following way:
How much money (or more) might we lose over time period T with probability X?
Value at Risk is a number that represents an estimate of how much our portfolio may lose due to market
movements for a particular horizon (time period) and for a given confidence level (probability).
The definition of that potential loss depends on three main parameters:
a.
b.

c.

The horizon over which the potential loss is measured. It is not the same to measure the expected loss
over a one day period than over a one week period.
The degree of confidence (probability of ocurrence). The degree of confidence is a measure of the
degree of certainty of the VaR estimate. The most common degree of confidence is 95%, which means
that 95% of the times our losses will be lower than the VaR number, while 5% of the times, our
portfolio will experience greater losses.
The home currency in which we measure the VaR number. VaR is a number, but it is expressed in
U.S. dollars, British pounds or Japaneses yens. It is not the same to say that our VaR is $1 million, than
1 million or 1 million.

In the following graph, we can see the value at risk concept graphically. Extreme outcomes (large losses, or
large gains) are less likely to ocurr, and therefore, the number of expected extreme portfolios outcomes, is
clearly lower.

Value at Risk
1600
1400
1200
Number of Ocurrences

From the distribution of the


portfolio's expected profits
and losses, w e can
determines the probability that
our losses w ill be greater than
a certain number.

Value at Risk at the 95%


level equals 10 $MM.
Prob(x < $-10MM) = 5%

1000
800
600

5% of
expected
ocurrences

400
200

18.2

16.4

14.5

12.7

10.9

9.1

7.3

5.5

3.6

1.8

0.0

1.8

3.6

5.5

7.3

9.1

10.9

12.7

14.5

16.4

18.2

Portfolio's expected profits and losses in $MM.

For example, if your VaR is US$10MM and you have set the time period to one day and the probability to
95% then over the next 24-hour period there is a 5% chance your loss will exceed US$10MM.

How do we measure the market risk of a portfolio?


A porttfolio may have different instruments (stocks, bonds, swaps, floors, option...) in different markets
(fixed income, commodities, equities...). To analyze the overall risk of the portfolio, it is necessary to
determine the risk of the individual assets, and the interactions (correlations) between those assets. To
compute the volatility for every trade in our portfolio, and then estimate the correlation with the remaining
trades, could be an impossible task.
The VaR methodology provides a way to deal with the problem of measuring the global risk of a portfolio.
It is important to point out, that in the VaR analysis, we assume the portfolio remains constant, and only the
market factors will change.
VaR is highly integrative in nature and provides a global picture of the risk of a portfolio. It attempts to
bring together into a single framework:

Multiple types of market risk


Multiple types of instruments

In a nutshell, VaR is an attempt to quantify risk, given the portfolios current exposure to a certain set of
market factors, by asking how much these factors can move (accounting for volatilities and correlations)
over a period of time.
As a first step, we must identify a set of common risk factors, for which we can obtain volatilities and
correlations, which will represent the Market Factors. To continue the analysis, we have to find a way to
express all the trades of our portfolio in terms of those risk factors (cash flow mapping). Once we have
the cash flow map in terms of the risk factors, and the volatilities and correlations of those risk factors, we
only need to perform basic matrix manipulation to calculate the VaR of our portfolio.
Analytic VaR simplifies the analysis of market risk in the context of a portfolio.

Market Factors

Portfolio Data

How do we define and measure all


the risks of all the instruments in
our portfolio?

How do we analyze the risk


between different instruments and
markets inside the portfolio?

(ANSWER)

(ANSWER)

Vertex Set (Risk Factors)


We have to choose a limited number of
risk factors for which we can obtain:
Individual volatilities
Cross correlations between them
Prices (or interest rates)

Cash Flow Map


We can define all the trades in our
portfolio in terms of a predefined set of
vertices (risk factors). That will allow us
to compare the risks of the heterogenous
instruments inside the portfolio

Value at Risk
Measure of the overall risk of
our portfolio (global picture).

Cash Flow Mapping


The purpose of cash flow mapping is to find the best replicate of a financial instrument for the purpose
of measuring the instruments risk within a portfolio.
What is a cash flow map?
A cash flow map is the representation of a financial instrument as a stream of one or more zero-coupon
instruments marked to market at current market rates and prices. Prior to calculating analytic VaR, financial
instruments must be decomposed into their component cash flows (zero coupon instruments) and allocated
to a pre-determined set of vertices for which we can obtain volatilities, correlations, and other statistics on a
regular basis.

Cash Flow Map of a Sample Portfolio in VaRworks

Assets

 Currencies (USD,CAD,..)
 Commodities (GAS, ...)

Asset class and Maturity








XS (FX / spot)
R (Money Market / days)
S (Swap / years)
Z (Government / years)
SE (Equity index / spot)
 C (Commodity / months)

Total Cash Flows allocated


to the U.S. equity index
(spot) vertex

Total Cash Flows


allocated to the 3month WTI vertex

What is a vertex?
We can think of a vertex as an element which populates a market. For example, USD.GOV.10y would be a
vertex for the market for 10-year U.S. government bonds.
More formally, a vertex is a pre-determined asset class-maturity bucket for which volatilities and other time
series statistics have been measured. It consists of an asset (a currency or commodity code), an asset class
(such as spot currency, interest-rate instrument, equity index, commodity, brady bond), and a tenor or
maturity (a payment date measured in years from today). In VaRworks vertices are represented using the
notation asset.asset_class_and_maturity. A few examples of vertices are the following:
The vertex for the 30-year U.S. Government Bond is USD.Z30.

The vertex for the Japanese equities is JPY.SE (notice it is a spot position)
The vertex for the three month Natural Gas is GAS.C03
Why Vertices?
Vertices reduce the market description to a manageable size. They may be the only answer to
unmanageably huge information sets characterizing markets. To use them properly, two problems need to
be solved:



The systematic measurement of actual markets for the production of data applicable to the vertex set
chosen (for example, using Riskmetrics datasets, or creating your own with MakeVC); and
The reduction of portfolio exposures to a form which can be analyzed using vertex datasets (Cashflow mapping problem)

In order to be compatible with the available data (i.e. vertices), every instrument in a portfolio needs to be
reduced to a collection of cahs-flows.
Definition of cash flow in the VaR methodology
A cashflow is a vertex and a number representing the amount (size) of the cashflow. For example, the cashflow (+100, 10y, USD, GOV) represents a long position of 100 units of 10 year, U.S. dollars, governmentcredit.
We can think of a cash flow map as a many-to-one association between a portfolio (or trade) and a set of
cash flows lying at pre-selected vertices
Cash flow mapping takes a trade description and produces a series of home currency present values of cash
flows marked by 1) a currency, 2) an asset class (which may be indicative of credit rating), 3) a maturity in
years, and 4) a signed amount.
This process has four steps:
1.
2.
3.

4.

DECOMPOSITION: Take a description of the trade and shred it into a series of times and
signed cash flows in the local currencies.
MARKING-TO-MARKET: Present value the cash flows to the effective date (usually today),
using local currency interest rates and market information.
HOME BASING: Convert the cash flows (valued at the effective date) to the home currency
(currency VaR is calculated for). Spot exchange rates are used since present values of cash
flows are converted.
ALLOCATION: Allocate the cash flows to the standard vertices defined in the volatility
dataset.

We have to repeat the process for all the trades in our portfolio.
Following certain rules, we will be able to aggregate the cash flows at each vertex and perform the VaR
calculations. All the cash flows in a cash flow map are expressed in the same currency (home
currency), and are valued at the same date (effective date)

Allocating Cash Flows to a Single Vertex


If only a single appropriate vertex exists for a cash flow (as in the case of spot foreign exchange, equity
indexes, and spot commodities) then the entire cash flow is allocated to that vertex preserving present value
only.
Allocating Cash Flows to more than one Vertex
If a cash flow falls between two vertices (for example, 2.56 years), we will have to allocate it to the two
closer vertices. For a detailed explanation see the Users Guide.

Allocating a Cash Flow to Vertices

Amount
Original cash
flow

C
T

Time

Amount
Allocated
cash flows
C1

C2
T1

T2

Time

There are two possible choices of units for cashflow amounts: local currency units and home currency. By
local currency, we mean the currency the instrument is originally denominated in. At the portfolio level, we
may have assets denominated in different local currencies, but after the cash-flow mapping process, all the
cash-flows will be denominated in the same currency unit, that is, the home currency chosen.

Inputs
There are three types of inputs to calculate VaR: Market data, Portfolio Data, and Users choices

Market Data

Portfolio Data

Users Choices

Volatilities
Correlations
Prices (interest rates)

Description of all the


trades in the portfolio in
a particular format

Horizon
Confidence Level
Home Currency

A. MARKET DATA: CORRELATIONS, VOLATILITIES, PRICES, AND INTEREST


RATES
Volatility data
Volatility files define vertices onto which cash flows are mapped. Each record specifies a vertex series
name, price volatility, exchange rate or yield (where applicable), and other statistics. You can create your
own volatility files with MakeVC or download publicly available ones. The sample volatility file,
dvmmddyy.rm3 (where mmddyy is some date), is a RiskMetrics file containing daily volatilities.

Example of a Volatility File


Example of Volatility File Contents
*Estimate of volatilities for a one-day horizon
*COLUMNS=5,LINES=367,DATE=01/30/98,VERSION 2.0
Volatility File
*MakeVC(TM) Version 1.0
Headers
*Copyright information.
*SERIES,PRICE/YIELD,DECAYFCTR,PRICEVOL,YIELDVOL
FRF.XS.VOLD,1.000500,0.940,0.035927,NA
Volatility Data (separated by commas)
JPY.XS.VOLD,0.083867,0.940,0.786864,NA
Each record identifies a series (vertex)
......................................
and several time series statistics,
WTI.C03.VOLD,0.774500,0.940,0.567395,NA
including volatility and price.

FIELD

Description

SERIES and VOLATILITY


ESTIMATE

Identification Code of the series and horizon of the


volatility estimate. VOLD for daily, VOLM for
monthly, and VOL for other horizons.
This price or interest rate obtained on the final day of
observation period for the time series. The value of
price/yield depends on the asset class.
The exponential moving average decay factor. It is
the same for all series.
The forecast price volatility over the horizon -h (not
annualized), expressed as a percent, and multiplied
by the confidence factor -m.
The forecast yield volatility for interest rates (asset
classes R, S, and Z) over the horizon -h (not
annualized), expressed as a percent, and multiplied
by the confidence factor -m.

PRICE/YIELD

DECAY FACTOR
PRICE VOLATILITY

YIELD VOLATILITY

Example
WTI.CO3.VOLD

0.774500

0.94 (daily)
0.97 (monthly)
0.567395

Only for interest


rate series. For the
others NA (no yield
volatility)

Correlation data
Correlation files contain correlations for the vertices defined in a corresponding volatility file. Each record
specifies two vertices and their correlation. You may create your own correlation files with MakeVC or
download publicly available ones. The sample correlation file, dcmmddyy.rm3 (where mmddyy is some
date), is a RiskMetrics file containing daily correlations.

Example of a Correlation File


Correlation File contents
*Estimate of correlations for a oneday horizon
*COLUMNS=2,LINES=67161,DATE=01/30/98
,VERSION 2.0
*MakeVC(TM) Version 1.0
*Copyright information.
*SERIES,CORRELATION
FRF.XS.FRF.XS.CORD,1.000000
FRF.XS.DEM.XS.CORD,0.144465
.............................
WTI.C01.ZNC.CO3.CORD,0.013546

WTI.C01.

ZNC.CO3.

Identification Code for Series1


asset1.asset_class1[maturity1].

Correlation File Headers

Correlation Data
Each record specifies two series
(vertices) and their correlation.

CORD

CORD for daily correlation


CORM for monthly (25-day)
COR for other horizons.

Identification Code for Series2


asset2.asset_class2[maturity2].

0.013546
The forecast correlation
coefficient between the
two assets. The value is
a real number between
1 and +1, inclusive.

Field Delimiter (comma)


If n is the number of records in the volatility file, then the correlation file contains n (n + 1) / 2 records
(the correlation data includes the diagonal elements, all ones). Each series in the correlation file must have
a corresponding record in the volatility file.

ASSET CODES FILE


Example of asset codes file
File Type
*Asset Codes File
*COLUMNS=3,LINES=11,DATE=01/30/98,
Characteristics of the asset
VERSION 2.0
codes file
*ASSET,ASSET_CLASS,CCY
Column titles
AUD,XS,USD
CAD,XS,USD
DEM,XS,USD
The asset field specifies a currency or commodity code. Examples: USD,
GBP,XS,USD
DEM, JPY, WTI, GAS.
JPY,XS,USD
The asset_class field indicates if asset is a currency (XS) or a commodity (C).
CHF,XS,DEM
Example: XS or C
ELE,C,USD
The ccy field indicates the currency in which the original price series are
GAS,C,CAD
denominated in .
GLD,C,HKD
WTI,C,USD
BRENT,C,GBP

Portfolio Data
One of the obvious inputs in the VaR calculation is the specification of your portfolio.
Portfolio consists of text specifying a portfolio filemay include directory and drive. The portfolio file
describes the financial instruments for which VaR is to be calculated. Each record in a portfolio file
specifies either:
the terms of a single trade, or
a path pointing to another file containing trades.
VaRworkss sample portfolio file, port.txt, contains the names of files containing different types of trades.

Commodities

Portfolio
File

Bonds
Portfolio File

Options

Interest Rates

Equities
Trade Files

Example of a portfolio file


Headers of the portfolio file. The most important one
is TYPE=PORTFOLIO, which identifies the file as a
portfolio file

Example of a portfolio file (port.txt) composed


by trade files in which the different instruments
of the portfolio are described in detail. (bond.txt,
bondfut.txt, swaps.txt,...)

Example of an instrument file

Headers of the trade file. Each trade file is


composed of instruments of the same type
(swaps, futures, options). The header that
defines the instrument type is:
TYPE=INSTRUMENT_ NAME
(for example, TYPE=SWAP. The other headers
provide additional information to value the
instruments defined in that particular file.

Example of a trade file for swaps (swap.txt). This


record describes a $100 million interest rate swap
that pays floating and receives fixed with
maturity in 1/1/1999.

USERS CHOICES
Horizon (days)
In VaRworks, horizon is a number specifying the number of business days of the VaR horizon. Express
the horizon in number of days (e.g. 1 month is expressed as 30 days) even if you are using monthly (or
longer) volatility and correlation datasetsVaRs are scaled using the square root of the horizon. The
resulting VaR is the expected change in the portfolios value under adverse circumstances in this time
interval. For example, enter 1 (one) for a one-day horizon.

Choice of horizon
The horizon can be a function either of the position or the investor. In the former case, the longer horizon
for estimating risk can be the result of the time it takes for the position to be liquidated or neutralized. In
less liquid markets, it can take up to a week or longer to significantly modify the market risk profile of a
portfolio. In the latter case, it is the investor who defines the horizon. Risk is measured over the period until
investment objectives are reviewed and reassessed.
When choosing a horizon, consider:

Unwind periodhow long, on average, does it take to reverse a market position or individual
trade?
Attention periodhow often, on average, do you re-examine your portfolio and its mark-tomarket or hedging trades?
Accounting periodhow long until the next financial reporting must be done?

Common choices of horizon

One dayrecommended by the J. P. Morgan RiskMetrics specification (termed DEaR, for


daily earnings at risk). It is thought to be appropriate for banks, clearing houses, traders, etc.,
because of their rapid turnover, short unwind periods.
Ten daysrecommended by the Basle Committee on Banking Supervision. It is thought to be
appropriate to banks for capital charges.
25 daysa RiskMetrics alternative. It is thought to be appropriate for funds and triple-A bank
derivatives subsidiaries.
65 daysa calendar quarter. It is thought to be appropriate for corporations.

Horizon choice and random walks


Since Samuelsons pioneering work in 1965, it is widely believed (and infrequently disputed by evidence)
that Brownian motion (simple random walk) governs the rate-of-return behavior of most assets. When
this is true, VaR for long periods (VaRT) is related to the one-day VaR (VaR1) by:

VaRT = VaR1 T
This is known as the square-root-of-T rule. If this rule holds then the choice of horizon is completely
unimportant since all horizons would scale accordingly. But autocorrelation, mean reversion, nonlinear
positions (options), and other issues can damage the applicability of the square-root-of-T rule.

Recommendations
A long period is merely the sequence of several short periods of risk. You cannot expect to manage risk
over long periods unless you are able to manage it over short periods; there is no catching up later in risk
management. We recommend that you make the VaR horizon as short as you can, but no shorter than the
actual trading decisions or VaR recalculations can be done.

Confidence
In VaRworks, confidence is a number between 0.5 and 1, exclusive, specifying the size of the one-tailed
VaR confidence level.
The probability of incurring losses larger than our VaR will be (1-X) %, being X the confidence level. For
example, for a 95% confidence level (5% one-tail level), the probability that the portfolios losses will
exceed the the VaR number will be 5%.

Confidence level selection


Common choices for a confidence level are 95% (RiskMetrics) and 99% (Basle).
With a 95% level and a one-day horizon, losses in excess of the VaR will occur about once in
every twenty days.
With a 99% level and a one-day horizon, losses in excess of the VaR will occur about once in
every one hundred days.
If the probability of loss is normally distributed, the 5% one-tail level is 1.645 standard deviations from the
mean; the 1% one-tail level is about 2.33 standard deviations.

Recommendations
Confidence levels should be established for solid statistical reasons, not wishful thinking. No choice is
more conservative than the other: it is nonsense to say, We want to experience a serious loss
infrequently, so we use a confidence level which involves a small probability of loss in computing our
VaR.
Therefore, we recommend you choose a confidence level sufficiently large to get one outlier a month.

For the same portfolio, the Value at Risk will be a different number for different confidence levels, but the
underlying risk that is attempting to measure is the same. The choice of the confidence interval does not
make your portfolio more or less risky.
VaR provides an estimate of maximum likely loss with a given confidence level. The larger the confidence
level, the larger the VaR number will be.

VaR @ 90%
1.28 S.D

VaR @ 97.5%
1.96 S.D.

VaR @ 95%
1.645 S.D.

.4
-1

.5
-1

.8

.7
-1

-1

-2

.1
-2

.3
-2

.4
-2

.6
-2

.7
-2

.9

VaR @ 99%
2.33 S.D.

-2

-3

Probability that loss will


exceed VaR number

VaR for different confidence levels


10.00%
9.00%
8.00%
7.00%
6.00%
5.00%
4.00%
3.00%
2.00%
1.00%
0.00%

Number of standard deviations from mean

When choosing a confidence level, we have to take into account that, from a statistical point of view, the
less-extreme order statistics have higher significance. Therefore, choose 95% or 92.5%, not 97.5% or 99%.

Вам также может понравиться