Estimating Value at Risk
Eric Marsden
<eric.marsden@risk-engineering.org>
Do you know how risky your bank is?
Estimating Value at Risk Eric Marsden - - PowerPoint PPT Presentation
Estimating Value at Risk Eric Marsden <eric.marsden@risk-engineering.org> Do you know how risky your bank is? 1 Understand measures of fjnancial risk, including Value at Risk 2 Understand the impact of correlated risks 3 Know how to use
Estimating Value at Risk
Eric Marsden
<eric.marsden@risk-engineering.org>
Do you know how risky your bank is?
Learning objectives
1 Understand measures of fjnancial risk, including Value at Risk 2 Understand the impact of correlated risks 3 Know how to use copulas to sample from a multivariateprobability distribution, including correlation
Tie information presented here is pedagogical in nature and does not constitute investment advice!
Methods used here can also be applied to model natural hazards 2 / 41suggest you consult the following associated slides:
▷ Modelling correlations using Python ▷ Statistical modelling with Python
Available from risk-engineering.org & slideshare.net
3 / 41Risk in fjnance
There are 1011 stars in the galaxy. That used to be a huge number. But it’s only a hundred
used to call them astronomical numbers. Now we should call them economical numbers. — Richard Feynman
4 / 41Terminology in fjnance
Names of some instruments used in fjnance:
▷ A bond issued by a company or a government is just a loan
▷ A stock gives you (a small fraction of) ownership in a “listed company”
▷ A future is a promise to do a transaction at a later date
from possibility of unexpected profjt if price increases
5 / 41Risk in fjnance
▷ Possible defjnitions:
▷ Main categories:
bond prices, exchange rates, commodity prices
loans and bonds, because of the “default” of the borrower
people and systems, or from external events
natural hazards, in demographic tables (life insurance), in consumer behaviour, and due to systemic risks
Source: Qvantitative Risk Management: Concepts, Techniques and Tools, A. J. McNeil, R. Frey, P. Embrechts 6 / 41Stock market returns
F e b 2 1 3 M a r 2 1 3 A p r 2 1 3 M a y 2 1 3 J u n 2 1 3 J u l 2 1 3 A u g 2 1 3 S e p 2 1 3 O c t 2 1 3 NCAC40 over 2013
F e b 2 1 3 M a r 2 1 3 A p r 2 1 3 M a y 2 1 3 J u n 2 1 3 J u l 2 1 3 A u g 2 1 3 S e p 2 1 3 O c t 2 1 3 NDaily change in CAC40 over 2013 (%)
Say we have a stock
investment? We want to model the likelihood that our stock portfolio loses money.
7 / 41Value at Risk
▷ Objective: produce a single number to summarize my exposure to market risk
▷ A more informative question:
▷ “5-day 𝑊𝑏𝑆0.9 = 10 M€” tells us:
▷ What it does not tell us:
Value at Risk
Value at risk A measure of market risk, which uses the statistical analysis of historical market trends and volatilities to estimate the likelihood that a given portfolio’s losses (𝑀) will exceed a certain amount 𝑚. VaR𝛽(𝑀) = inf {𝑚 ∈ ℝ ∶ Pr(𝑀 > 𝑚) ≤ 1 − 𝛽} where 𝑀 is the loss of the portfolio and α ∈ [0, 1] is the confjdence level.
If a portfolio of stocks has a one-day 10% VaR of 1 M€, there is a 10% probability that the portfolio will decline in value by more than 1 M€ over the next day, assuming that markets are normal.
9 / 41Value at Risk
Value at risk A measure of market risk, which uses the statistical analysis of historical market trends and volatilities to estimate the likelihood that a given portfolio’s losses (𝑀) will exceed a certain amount 𝑚. VaR𝛽(𝑀) = inf {𝑚 ∈ ℝ ∶ Pr(𝑀 > 𝑚) ≤ 1 − 𝛽} where 𝑀 is the loss of the portfolio and α ∈ [0, 1] is the confjdence level.
If a portfolio of stocks has a one-day 10% VaR of 1 M€, there is a 10% probability that the portfolio will decline in value by more than 1 M€ over the next day, assuming that markets are normal.
9 / 41Applications of VaR
▷ Risk management: how much fjnancial risk am I exposed to?
consolidating risk across an organization
▷ Risk limit setting (internal controls or regulator imposed)
bank exposes itself to through its lending and investment practices
Limitations
VaR
▷ Typical VaR estimation methods assume “normal” market conditions ▷ Tiey do not attempt to assess the potential impact of “black swan”
events
2008 subprime mortgage crisis ▷ More information: see the slides on Black swans at
risk-engineering.org
11 / 41Alternatives to VaR
DIFFICULT
▷ VaR is a frequency measure, not a severity measure
▷ Related risk measure: Expected Shortfall, the average loss for losses larger
than the VaR
▷ Note that
▷ Unlike VaR, expected shortfall is a coherent risk measure
portfolios added together (diversifjcation does not increase risk)
12 / 41Estimating VaR
▷ Estimation is diffjcult because we are dealing with rare events
whose probability distribution is unknown
▷ Tiree main methods are used to estimate VaR:
1 historical bootstrap method 2 variance-covariance method 3 Monte Carlo simulation▷ All are based on estimating volatility ▷ Applications of the constant expected return model which is
widely used in fjnance
identically normally distributed with a constant (time invariant) mean and variance
13 / 41Understanding volatility
low volatility high volatility
F e b 2 1 3 M a r 2 1 3 A p r 2 1 3 M a y 2 1 3 J u n 2 1 3 J u l 2 1 3 A u g 2 1 3 S e p 2 1 3 O c t 2 1 3 NHistorical bootstrap method
▷ Hypothesis: history is representative of future activity ▷ Method: calculate empirical quantiles from a histogram of
daily returns
▷ 0.05 empirical quantile of daily returns is at -0.034:
▷ 0.01 empirical quantile of daily returns is at -0.062:
Variance-covariance method
▷ Hypothesis: daily returns are normally distributed ▷ Method: analytic quantiles by curve fjtting to historical data
▷ 0.05 analytic quantile is at -0.0384
▷ 0.01 analytic quantile is at -0.0546
Monte Carlo simulation
▷ Method:
1 run many “trials” with random market conditions 2 calculate portfolio loss for each trial 3 use the aggregated trial data to establish a profjle of the portfolio’s riskcharacteristics ▷ Hypothesis: stock price evolution can be simulated by geometric
Brownian motion (gbm) with drifu
▷ gbm: a continuous-time stochastic process in which the logarithm of the
randomly varying quantity follows a Brownian motion
Monte Carlo simulation: underlying hypothesis
▷ Applying the GBM “random walk” model means we are following a weak
form of the “effjcient market hypothesis”
▷ Tie strong form of the hypothesis says that current price incorporates
both public and private information
18 / 41Geometric Brownian motion
Δ𝑇 𝑇 = 𝜈Δ𝑢 + 𝜏𝜁√Δ𝑢
where
▷ S = stock price ▷ random variable 𝑚𝑝(𝑇𝑢/𝑇0) is normally distributed with mean = (𝜈 − 𝜏2/2)𝑢, variance = 𝜏2𝑢
drifu (instantaneous rate of return on a riskless asset) volatility follows a Normal(0, 1) distribution time step
19 / 41Monte Carlo simulation: 15 random walks
50 100 150 200 250 300
Time9.0 9.5 10.0 10.5 11.0 11.5
PriceWith large number of simulations, we can estimate:
▷ mean fjnal price ▷ Value at Risk
→ slides on Monte Carlo methods at risk-engineering.org 20 / 41Monte Carlo simulation: histogram of fjnal price
9.0 9.5 10.0 10.5 11.0 11.5 12.0 12.5 0.0 0.2 0.4 0.6 0.8 1.0
Final price distribution after 300 days
Start price: 10€ Mean final price: 10.505€ VaR(0.99): 0.409€ q(0.99): 9.591€
Download the associated Python notebook at r i s kNote
Tie Black-Scholes model is elegant, but it does not perform very well in practice:
▷ it is well known that stock prices jump on occasions
and do not always move in the smooth manner predicted by the gbm model
Industrial Average (djia) of 12.8%
▷ stock prices also tend to have fatter tails than those
predicted by gbm
▷ more sophisticated modelling uses “jump-difgusion”
models
If the effjcient market hypothesis were correct, I’d be a bum in the street with a tin cup. – Warren Bufget (Market capitalization of his company Berkshire Hathaway: US$328 billion)
22 / 41Stock market returns and “fat tails”
−3 −2 −1 1 2 3 Quantiles −0.15 −0.10 −0.05 0.00 0.05 0.10 Ordered Values R2 =0:9242Normal QQ-plot of Microsoft daily returns in 2013
A quantile-quantile plot compares two probability distributions by plotting their quantiles against each other. If distributions are similar, plot will follow a line 𝑍 = 𝑌. Tie reference probability distribution is generally the normal distribution
23 / 41Stock market returns and “fat tails”
−0.08 −0.06 −0.04 −0.02 0.00 0.02 0.04 0.06 0.08 Quantiles −0.15 −0.10 −0.05 0.00 0.05 0.10 Ordered Values R2 =0:9761Student QQ-plot of Microsoft daily returns in 2013
Student’s t distribution tends to fjt stock returns better than a Gaussian (in particular in the tails of the distribution) Tie distribution of a random variable
𝑌 is said to have a “fat tail” if
Pr(𝑌 > 𝑦) ∼ 𝑦−𝛽 as 𝑦 → ∞,
𝛽 > 0
24 / 41Diversifjcation and portfolios
▷ Money managers try to reduce their risk exposure by diversifying their portfolio
goes up
risks
Diversifjcation benefjts can be assessed by correlations between difgerent risk categories. A correlation of +100% means that two variables will fall and rise in lock-step; any correlation below this indicates the potential for diversifjcation benefjts. [Treasury and FSA, 2006] ▷ Area called “portfolio theory”
Expected returns and risk
▷ Expected return for an equity 𝑗: 𝔽[𝑆𝑗] = 𝜈𝑗
▷ More risk → higher expected return
Expected returns and risk
Variance Variance (denoted σ²) is a measure of the dispersion of a set of data points around their mean value, computed by fjnding the probability-weighted average of squared deviations from the expected value.
𝜏2
𝑌 = 𝑊𝑏𝑠𝑗𝑏𝑜𝑑𝑓(𝑌) = 𝔽[(𝑌 − 𝔽[𝑌])2]= 𝔽[(𝑌 − 𝜈)2] =
𝑂∑
𝑗=1𝑞𝑗(𝑦𝑗 − 𝜈𝑌)2
for a discrete random variable
= 1 𝑂
𝑂∑
𝑗=1(𝑦𝑗 − 𝜈)2
for a set of 𝑂 equally likely variables Variance measures the variability from an average (the volatility).
“Risk” in fjnance is standard deviation of returns for the equity, √𝑤𝑏𝑠𝑗𝑏𝑜𝑑𝑓(𝑗)
𝜏𝑗 = √𝔽[(𝔽[𝑆𝑗]–𝑆𝑗)2]
27 / 41Expected return and risk: example
▷ Consider a portfolio of 10 k€ which is invested in equal parts in two
instruments:
increasing value by a quarter ▷ Tie expected return afuer one year is that mathematical expectation of the
return on the portfolio:
▷ Tie risk of this investment is the standard deviation of the return 𝜏 = √0.2 × ((5300 + 2500 − 10000) − 900)2 + 0.8 × ((5300 + 6250 − 10000) − 900)2 = 1503.3
28 / 41Value at Risk of a portfolio
▷ Remember that Var(𝑌 + 𝑍) = Var(𝑌) + Var(𝑍) + 2𝑑𝑝𝑤(𝑌, 𝑍) ▷ Variance of a two-stock portfolio: 𝜏2
𝐵+𝐶 = 𝜏2 𝐵 + 𝜏2 𝐶 + 2𝜏𝐵𝜏𝐶𝜍𝐵,𝐶= (𝜏𝐵 + 𝜏𝐶)2 − 2𝜏𝐵𝜏𝐶 + 2𝜍𝐵,𝐶𝜏𝐵𝜏𝐶
where
▷ Portfolio VaR:
VaR𝐵,𝐶 = √(VaR𝐵 + VaR𝐶)2 − 2(1 − 𝜍𝐵,𝐶)VaR𝐵VaR𝐶 Diversifjcation efgect: unless the equities are perfectly correlated (𝜍𝐵,𝐶 = 1), the level of risk
Negatively correlated portfolio reduces risk
50 100 150 200 Time 2 4 6 8 10 12 14 16 18 Price Stock A Stock B Portfolio: ½A + ½B NVaR of a three-asset portfolio
▷ VaR = √𝜏2
𝐵 + 𝜏2 𝐶 + 𝜏2 𝐷 + 2𝜍𝐵,𝐶 + 2𝜍𝐵,𝐷 + 2𝜍𝐶,𝐷▷ Approach quickly becomes intractable using analytic methods…
Monte Carlo methods can work, assuming we can generate random returns that are similar to those observed on the market
▷ including the dependencies between stocks…
31 / 41VaR of a three-asset portfolio
▷ VaR = √𝜏2
𝐵 + 𝜏2 𝐶 + 𝜏2 𝐷 + 2𝜍𝐵,𝐶 + 2𝜍𝐵,𝐷 + 2𝜍𝐶,𝐷▷ Approach quickly becomes intractable using analytic methods…
Monte Carlo methods can work, assuming we can generate random returns that are similar to those observed on the market
▷ including the dependencies between stocks…
31 / 41Example: correlation between stocks
−0.15 −0.10 −0.05 0.00 0.05 0.10 0.15 CAC40 daily return −0.15 −0.10 −0.05 0.00 0.05 0.10 0.15 DAX daily returnCAC vs DAX daily returns, 2005–2010
Correlation coefficient: 0.918Market
large French & German fjrms tend to be strongly correlated, so high correlation between CAC and DAX indices
32 / 41Example: correlation between stocks
−0.15 −0.10 −0.05 0.00 0.05 0.10 0.15 CAC40 daily return −0.15 −0.10 −0.05 0.00 0.05 0.10 0.15 All Ordinaries index daily returnCAC vs All Ordinaries index daily returns, 2005–2010
Correlation coefficient: 0.356Less market correlation between French & Australian fjrms, so less index correlation
33 / 41Example: correlation between stocks
−0.15 −0.10 −0.05 0.00 0.05 0.10 0.15 CAC40 daily return −0.15 −0.10 −0.05 0.00 0.05 0.10 0.15 Hang Seng index daily returnCAC vs Hang Seng index daily returns, 2005–2010
Correlation coefficient: 0.408Less market correlation between French & Hong Kong fjrms, so less index correlation
34 / 41Correlations and risk: stock portfolios
stock A stock B
both stocks gain strongly both stocks lose strongly “ordinary” days both stocks gain both stocks lose asymmetric days:
asymmetric days:
Simulating correlated random variables
▷ Let’s use the Monte Carlo method to estimate VaR for a portfolio
comprising CAC40 and DAX stocks
▷ We need to generate a large number of daily returns for our CAC40 &
DAX portfolio
▷ We know how to generate daily returns for the CAC40 part of our
portfolio
and standard deviation as the daily returns observed over the last few months for the CAC40 ▷ We can do likewise to generate daily returns for the DAX component ▷ If our portfolio is equally weighted in CAC40 and DAX, we could try to
add together these daily returns to obtain portfolio daily returns
36 / 41Simulating correlated random variables
−0.10 −0.05 0.00 0.05 0.10 0.15 5 10 15 20 25 30 35 40 45 Histogram of CAC40 daily returns over 2005–2010 tμ = 0.000505 tσ = 0.008974 df = 2.768865 −0.10 −0.05 0.00 0.05 0.10 0.15 5 10 15 20 25 30 35 40 45 Histogram of DAX daily returns over 2005–2010 tμ = 0.000864 tσ = 0.008783 df = 2.730707Fit of two Student t distributions to the CAC40 and DAX daily return distribution Python: tdf, tmean, tsigma = scipy.stats.t.fit(returns)
37 / 41Monte Carlo sampling from these distributions
−0.08 −0.06 −0.04 −0.02 0.00 0.02 0.04 0.06 0.08 −0.08 −0.06 −0.04 −0.02 0.00 0.02 0.04 0.06 0.08 0.10 CAC vs DAX returns (simulated, no correlation)Problem: our sampling from these random variables doesn’t match our
We need some way of generating a sample that respects the correlation between the input variables!
38 / 41Continue with
Tie mathematical tool we will use to generate samples from correlated random variables is called a copula. To be continued in slides on Copula and multivariate dependencies (available on risk-engineering.org)
For more free content on risk engineering, visit risk-engineering.org
39 / 41Image credits
▷ Cat stretching (slide 3): norsez via flic.kr/p/e8q1GE, CC BY-NC-ND
licence
▷ Brownian motion (slide 16), reproduced from Jean Baptiste Perrin,
“Mouvement brownien et réalité moléculaire”, Ann. de Chimie et de Physique (VIII) 18, 5-114, 1909 (public domain)
For more free content on risk engineering, visit risk-engineering.org
40 / 41Feedback welcome!
Was some of the content unclear? Which parts were most useful to you? Your comments to feedback@risk-engineering.org (email) or @LearnRiskEng (Twitter) will help us to improve these
For more free content on risk engineering, visit risk-engineering.org
41 / 41