CS代考 FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 1 / 20

Plan for the rest of term
Tue 22 Nov (today): Lecture 9 Backtesting and Stress Testing
Week 10 classes: Class9Lecture.pdf
Tue 29 Nov: Lecture 10 Risk Forecasts for Bonds and Options

Copyright By PowCoder代写 加微信 powcoder

Week 11: no classes
Tue 29 Nov: Summative Assignment 2 due
Wed 30 Nov: optional Zoom review session at noon
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 1 / 20

Plan for the rest of the term
Tue 6 Dec: ICA (75 min)
Fri 9 Dec: release of course project
Due at 4 pm on Fri, 20 Jan 2023
Similar to summative assignments and class material
For fairness, no questions will be answered about it after the release. So please be well-prepared and make sure you are familiar implementing techniques in R before then.
My office hours available for questions: Tue 6 Dec 4-5 pm, Thu 8 Dec 2-3 pm.
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 2 / 20

Lecture 10: Backtesting and Evaluating Risk
FM321: Risk Management and Zhu
29 November 2022
LSE Finance
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 3 / 20

Backtesting
Consists of two parts:
implementing risk forecasts in the historical sample;
evaluating their performance.
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 4 / 20

Backtesting: implementing risk forecasts
We denote by T the sample size and by W the minimum estimation window; dates are t = 1,2,…,T:
Set initial estimation window from t = 1 to t = W .
Estimate model with this window, and produce V aRp estimate for
t = W + 1.
Change estimation window
either by including one more observation in the sample (so that the sample is t = 1,2,…,W,W + 1; i.e., “expanding window”)
or by shifting start and end points by 1 (so that the sample is t = 2,3,…,W + 1; i.e., “moving window”).
Repeat procedure from second step to obtain V aRp estimate for t = W + 2.
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 5 / 20

Backtesting: implementing risk forecasts
The above procedure yields T − W forecasts for V aRp, which can be compared to realized values for the underlying returns or P/L.
A violation is the event that VaR is breached. We define the violation indicator as
(1 ifPt−Pt−1<−VaRp Vt = 9 otherwise We get out of the procedure a sequence of zeros and ones, indicating the periods when the violations occurred: VW+1,VW+2,...,VT This is called the hit sequence. LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 6 / 20 Backtesting: computational tip The procedure aims to replicate what one would do in practice by making sure one only uses information that is available in real time. Given the need to re-estimate models every period, this is potentially time-consuming and computationally intensive. One useful tip: since parameter estimates will typically not change very much by adding one data point to an already large sample, one can start the iteration in each period using the parameter estimates from the previous period as initial values. LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 7 / 20 Backtesting: evaluation Violation ratios & Unconditional coverage ratio test. If V aRp forecasts are correct, a breach (P/L < −V aRp) happens with probability p. Conditional coverage ratio test. If V aRp forecasts are correct, the probability of having a breach (P/L < −V aRp) should not depend on whether a breach occurred the day before. LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 8 / 20 Evaluation: violation ratios The violation ratio for the entire simulation by V R = 1 PTt=W +1 Vt pT−W Violations should happen with frequency p. Violation ratios tell us whether the model overforecasts risk (if V R < 1) or underforecasts risk (if V R > 1).
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 9 / 20

Evaluation: unconditional coverage test
How to test H0 : violations occur with probability p = p0 (say, 1% or 5%)?
Likelihood-ratio test.
LU : likelihood of data {VW +1, . . . , VT } as a function of parameters
p where p is a free parameter.
LR: likelihood of data {VW +1, . . . , VT } as a function of parameters
p where p = p0.
Under H0 : p = p0, the likelihood ratio test statistic:
−2logLR −LU ∼ χ21
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 10 / 20

Evaluation: unconditional coverage test
Denote by p the true probability of a violation, so that the distribution of Vt is Bernoulli with parameter p and its density is given by
f(Vt|p) = (1 − p)1−Vt pVt
The number of violations V1 and non-violations V0 are given by
V1= X Vt V0=(T−W)−V1
L = ΠTt=W +1 f (Vt |p) = (1 − p)V0 pV1 Lecture 10: Backtesting and Evaluating Risk Forecasts

Evaluation: unconditional coverage test
Under the null, the value of the likelihood (p is constrained to be equal to p0)
L =(1−p )V0pV1 R00
The unconstrained likelihood is given by
V0 V1 LU=(1−pˆ) pˆ
where pˆ is estimated by maximum likelihood pˆ =
Under the null, the likelihood ratio test statistic:
−2logLR −LU ∼ χ21
PTt=W+1 Vt T −W .
This test helps determine whether violations are happening with the expected frequency (either underforecasting or overforecasting risk are generally undesirable).
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 12 / 20

Evaluation: conditional coverage test
We denote by pij the probability that state Vt = i will be followed by state Vt+1 = j.
pij = Prob(Vt+1 = j|Vt = i) i,j ∈ {0,1}
We can consider the hit sequence {VW +1 , . . . , VT } as a realization
of a Markov Chain with transition matrix
p00 p01  Π=p10 p11
By construction, p00 + p01 = p10 + p11 = 1.
So there are only two free parameters in Π to estimate: p01 and p11.
LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 13 / 20

Evaluation: conditional coverage test
Ideally, the likelihood of a violation at time t would be independent of whether a violation occurred at time t − 1 or not, so that we should have p01 = p11 (if p01 < p11 then violations will cluster). How to test whether p01 = p11? Likelihood-ratio test. LU : likelihood of data {VW +1, . . . , VT } as a function of parameters (p01, p11) when parameters are unconstrained. LR: likelihood of data {VW +1, . . . , VT } as a function of parameters (p01, p11) when p01 = p11. Under H0 : p01 = p11, the likelihood ratio test statistic: −2logLR −LU ∼ χ21 LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 14 / 20 Evaluation: conditional coverage test What is LR? If we constrain p01 = p11, then our maximum likelihood estimate equals that of the unconstrained estimator for the unconditional coverage test: PTt=W+1 Vt pˆ01=pˆ11=pˆ= T−W Thus, in this case we have V0 V1 LR=(1−pˆ) pˆ LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 15 / 20 Evaluation: conditional coverage test What is LU ? If p01 and p11 are unconstrained, the likelihood of Vt+1 conditional f(Vt+1|Vt) = (1 − pVt1 )1−Vt+1 pVt+1 Vt1 The likelihood of the hit sequence {VW +1, . . . , VT } is LU =f(VW+1)f(VW+2|VW+1)f(VW+3|VW+2)...f(VT|VT−1) Thus, we have logLU =(1−VW+1)log(1−pˆ)+VW+1log(pˆ)+ | {z } log f(VW+1) X (1 − Vt+1)log(1 − pVt1 ) + Vt+1log(pVt1 ) t=W +1 | {z } log f(Vt+1|Vt) Lecture 10: Backtesting and Evaluating Risk Forecasts Evaluation: conditional coverage test Maximizing logLU with respect to p01 and p11 yields PT−1 t=W+1 t=W +1 PT−1 t t+1 I{V =0} PT−1 t=W +1 (1−Vt)Vt+1 PT−1 I{V =0 and V =1} PT−1 t=W +1 PT−1 t=W +1 I{V =1 and V =1} t t+1 so LU is given by replacing pVt1 in the previous slide by pˆ01 and pˆ11. PT−1 t=W+1 LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 17 / 20 Evaluation: conditional coverage test Thus, the likelihood ratio test statistic is −2 logLR − logLU  ∼ χ21 logLU =(1−VW+1)log(1−pˆ)+VW+1log(pˆ)+ log f(Vt+1|Vt) V0 V1 LR=(1−pˆ) pˆ log f(VW+1) X (1 − Vt+1)log(1 − pˆVt1 ) + Vt+1log(pˆVt1 ) t=W +1 | {z } This test helps determine whether a violation in one period predicts a higher likelihood of a violation in the next. LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 18 / 20 Issues with coverage tests Note that coverage tests require a lot of data: if p = 0.01, then in order to expect to have three instances of one violation followed by another we would need 30, 000 data points (or 120 years with daily data). LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 19 / 20 Backtesting expected shortfall The general process is: Given an assumption for conditional distribution of returns, compute expected shortfall (ESt) for each day when a violation occurs. For each such that, compute the ratio between actual shortfall (St and expected shortfall. The expected value of the ratio St should be 1 if the model is ESt accurate, so we can carry out tests of this hypothesis. Usually, data requirements for testing expected shortfall are much greater than those for backtesting VaR. LSE FM321 Lecture 10: Backtesting and Evaluating Risk Forecasts 20 / 20 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com