MAFS5220 Final Reserach Project
Transcript of MAFS5220 Final Reserach Project
-
8/13/2019 MAFS5220 Final Reserach Project
1/29
Department of Mathematics
Hong Kong University of Science and Technology
MAFS 5220
Quantitative and Statistical Risk analysis
A Sequential Algorithm on Robust Value at Risk Approach with
application to indexes and migration matrix risk control
Huang Yuelun
UG hall6 room 704
I would like to thank Prof. Ling Shiqing, Prof Jing Bingyi for their kindly
and precious advice on this time series and statistical technique and Prof.
Chan for his kindly guidance on the working optimization problem.
mailto:[email protected]:[email protected]:[email protected] -
8/13/2019 MAFS5220 Final Reserach Project
2/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 2
2
Content
1. Abstract ................................................................................................................ 3
2. background and data selecction certerion .......................................................... 4
3. data indetifcation and resources ......................................................................... 4
4. Value at Risk approach revisited ............................................................................ 6
5. priliminary data analysis and problem description ............................................... 9
6. brief introduction on time series forecasting technique ..................................... 11
7. The pesudo Robust Var algorithm ...................................................................... 15
8. Conclusion on HSI index study ............................................................................. 21
9. further application ............................................................................................... 23
10. Appendix & reference .......................................................................................... 26
-
8/13/2019 MAFS5220 Final Reserach Project
3/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 3
3
1. AbstractValue at Risk approach has been one of the most widely known risk control
techniques for its simplicity, easily and widely applied nature, However, the
dark side of this approach is very often criticized for itsloose control in the tail
events and non-sub-additivity. Although other risk measures like CVaR and
EVaR are developed to successfully conquer such inconsistency. But the
problem is such measures form a strict sub-additive upper bound, and it is
fundamentally too conservative. It trades the profitability with risk in the strict
sense. In essence, the relationship of risk and profit are not clearly solved.
Both methods have advantages in certain situations but fail in other cases.
Therefore they are not robust.
This research project embraces an original idea, by utilizing the advanced timeseries technique to redevelop the VaR approach into Robust VaR (Also called
for General VaR ) approach. With the advanced economy downturn detecting
mechanism and volatility prediction, the methods high accuracy better
balances the risk and business level than the non-robust methods. Moreover,
it gives more robust defense on the downturn risk signaling and control. The
method of the paper is carried in a pseudo algorithm format, it is neat and
easy to implement for simplicity. Throughout the paper HSI index study will be
demonstrated. Moreover the application and the prospect are also oriented.
Key words: Markov switching, volatility, downturn risk, Value at risk, Robust,
empirical Bayesian, asymmetric optimization
2.Background and data selection criterionData Selection criterion:
To carry out the strategy and validate the empirical result of improved
Robustized Value at risk approach, one needs appropriate data selection to
back up the idea and demonstrate the result. To find the data, we need the
data satisfy the following properties:
1. High liquidity with large trading volume.2. There is no closed pricing formula and the return should subject to
stochastic changes and not easy to monitor.
-
8/13/2019 MAFS5220 Final Reserach Project
4/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 4
4
3. The data should be taken in long time horizon and compute withquarterly horizon to stabilize the information shocks.
The reason behind first requirement is that price of certain underlying are
subject to effects of a lot of factors in reality. The high liquidity and large
trading volume means other risks, for instance, liquidity risk and relevant are
less significant so we can better monitor the risk with basic prediction of the
underlying asset volatility movements. The second requirement is that the risk
analytics are applied in real in the sense that people cannot form consistent
predictions for the future and the pricing are at stochastic dynamics changes.
The last one is a way of eliminating the white noises, since the daily return
might subject to strong speculation purposes, while the quarterly returns are
more stable and highly associate with the real behavior and realization of themarket expectation.
In below, it can be demonstrated that the HSI index is a good candidate data
set and we will use it to carry out the method for demonstration purpose.
3.Data identification and collectionHeng Seng Index:
A brief introduction:
The Hang Seng Index ("HSI") is one of the earliest stock market indexes in
Hong Kong. Publicly launched on 24 November 1969, the HSI has become the
most widely quoted indicator of the performance of the Hong Kong stock
market. To better reflect the price movements of the major sectors of the
market, HSI constituent stocks are grouped into Finance, Utilities, Properties,
and Commerce and Industry Sub-indexes.i
High liquidity and trading volume:
-
8/13/2019 MAFS5220 Final Reserach Project
5/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 5
5
Figure 1 HSI trading volume
It can be seen that the trading volume are at least millions level per workday
and the volume subjects to a steady growth in the past 10 years. With such
high turnover rate, we conclude the liquidity requirement is satisfied.
Unpredictability and Risk control
To quote my second case study report, I examine through the efficient market
hypothesis and found out that in reality it does worked for most of the cases,
the arbitrage opportunities are eliminated to almost zero. Due to the highly
diversified asset holding and sectors, the predictability of single component is
extremely difficult and unstable. The time series lags (one lag unit is defined
as a quarter) are very weak. This is verified by figure2. Since no strong lag
implies exists no serially predictability. We can insure that Heng Seng index
satisfies our second requirement. Moreover, we can also reassert that the
market is efficient and any transactions associate with it subject to stochastic
risk.
-
8/13/2019 MAFS5220 Final Reserach Project
6/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 6
6
Figure 2 ACF and PACF of the HSI quarterly return
Data Sources and basic descriptions
Heng Seng index has rather solid historical data and it is easy to found the
stable result. The data below is cached from Yahoo Financeii, with the horizon
from 1986/12/31 to 2013/5/1 in a monthly format and then use natural
logarithmic percentage to denote quarterly rate.
4.Value at Risk approach revisited:From my personal first report, I have been discussing the problem of Value
-
8/13/2019 MAFS5220 Final Reserach Project
7/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 7
7
at risk approach and the standardized result attached as follow:
-
8/13/2019 MAFS5220 Final Reserach Project
8/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 8
8
The pros and cons are demonstrated here, the VAR lacks the information of
the tail distribution beyond the%, the VAR approach are Robustly practicaland gives a very good result when the economics performs normally, where
outliers are eliminated. The CVAR is very sensitive to outliers. It works better
during the recession because the extreme values are more frequent and this
method tends to overestimate the risk in the normal period. With such
insights, it is natural to question whether returns come from the same
stationary distribution and extreme value occurs equally by chance is a
reasonable assumption. Based on my work, I suggest use empirical Bayesian,
-
8/13/2019 MAFS5220 Final Reserach Project
9/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 9
9
trying to utilize the best features of both by conditioning the type of the tails,
i.e. the mode of economy, where whether the extreme values are possible.
5.Preliminary data analysis and problem description
Compute the VaR and CVaR of the HSI index by the normal method.
-
8/13/2019 MAFS5220 Final Reserach Project
10/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 10
10
Figure 3 empirical quantile plot of return Figure 4 kernel density distribution
From the empirical result figure 3, we can compute
VaR at 5%: -21%. CVaR at 5%: ==10610.5=-39.057%
Practice remark:
Those results are too inconsistent, below graph(figure 4) shows the VaR, CVaR
and 95% volatility level. The upper line is CVaR threshold, the lower arrow is
the VaR threshold, while the shock are calculated at 95% of confidence level.
The VaR underestimate the risk extensively, but the CVaR overestimate risk at
all time.
Figure 5 95% volatility level, VaR and CVaR level
-
8/13/2019 MAFS5220 Final Reserach Project
11/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 11
11
The Common VaR and CVaR exists three big problems:
The inconsistency of VaR and CVar:
VaR and CVaR are different measures, CVaR is a strict upper bound of VaR, and
therefore the value of both, especially associate with large volatility, will have large
difference.
whether the weights should be given in the form of exponential decay or
polynomial decay is unknown:
One way to solve it is people can give different weights to historical volatility, the
method shows a concern of conditioning on different situations, but it didnt go deep
enough, there is no theoretical foundation given what and why the weight should begiven in this way other than manipulation. Further than that, once the decay is
determined, it becomes deterministic and no more flexibility is given to predict about
future dynamics.
Lastly, the VaR and CVaR is not local optimal:
Clearly there are three major shocks in 86-88, 97-99,08-10, however our prediction is
static and hence it is not really optimal at the local level, and for 00-06, the HIS are
less volatile, but we predict the VaR and CVaR at the same level, it seems to be more
overall efficient but less local level efficient.
A Robust result for such VaR and CVaR approach can very easily create an
over-specification problem. And it works very badly out of sample because of low
flexibility since the method is created to fit into the overall sample and less
idiosyncratic feature is considered.
To conquer such problem, we will use an entirely different approach based on the
very James D Hamiltons masterpiece iii on Switched Markov Process, using
binjamini Hochbergs false discovery rate on detecting mechanism and Engers Arch
and Garch model for volatility forecastingiv
.
6. Brief introduction of on time series forecasting techniques
A brief introduction on Arch and Garch model:
-
8/13/2019 MAFS5220 Final Reserach Project
12/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 12
12
In econometrics, AutoRegressive Conditional Heteroskedasticity (ARCH) models are
used to characterize and model observed time series. They are used whenever there
is reason to believe that, at any point in a series, the terms will have a characteristic
size, or variance. In particular ARCH models assume the variance of the current error
term or innovation to be a function of the actual sizes of the previous time periods'
error terms: often the variance is related to the squares of the previous innovations.
The Garch model denotes Robustized Arch model with the setup list below arch
model .In our case , we will use Garch to predict the volatility movement as a
building block for risk control.
A brief introduction on Switched Markov Process:
Markov switching model specifics the mechanism of a random process the can be equal to either 0(bad economy) or 1(good economy), this denotes the
different modes of the economy (in our case). Each case will be a simple AR(1)
process.
-
8/13/2019 MAFS5220 Final Reserach Project
13/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 13
13
Then if we can use the data to determine the stationary Markov transition probability
kernel, which at every node, we will look into future and compute whether next
node will be good economy or bad economy.
00 1001 11=
[ ]
Now with the basic setup we can carry out more Robust setup with different mode.
-
8/13/2019 MAFS5220 Final Reserach Project
14/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 14
14
For completeness, the derivation of the mechanism is listed, the expected duration
of good state or bad state are for very useful result to predict short term economics
movement, the filtering probability and the optimal stationary measure is derive in
the following way to detect the markov trend of economics .
-
8/13/2019 MAFS5220 Final Reserach Project
15/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 15
15
A brief introduction on Benjamini Hochberg procedure and FDRv:
The BH procedure is applied for large scale inference, the definition of
False Discover Rate greatly enhance the power of the test. Below
attaches the construction of such a test. In our case, we will test the
-
8/13/2019 MAFS5220 Final Reserach Project
16/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 16
16
threshold probability level for recession and use such inference as an
alternative detecting mechanism to optimization method.
-
8/13/2019 MAFS5220 Final Reserach Project
17/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 17
17
7.The Pseudo Robust VaR Algorithm
Step 1: check for GARCH effect.
{ , , , ARCH effect is method is used to check whether the volatility are constant
during the process, this is very important for Value at Risk approach since the
standard-deviation accounts for the loss we are interested in, therefore we
must forecast the volatility movement. For the HSI index future, the ARCH
effect is very clearly exists (see figure 5), the constant volatility prediction is no
good. Since the p-value is around 0.3 we dont reject the arch effect exists
(more in appendix). The volatility effect existed and non-constant is also
verified by (figure 6). And the predictability is not very good and it subjects to
strong volatility movement.
Figure 6 Arch statistics
-
8/13/2019 MAFS5220 Final Reserach Project
18/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 18
18
Figure 7 fitted and risdual graph assume no arch effect
Step 2: Fit an Optimal grach model to predict the volatility.
Based on AIC criterion, the model fitted below Cgarch(1,1) (figure 8) ,The model
forecast statistics (figure 9) conditional standard deviation (figure 10)
Figure 8 Cgarch model
Model prediction:
-
8/13/2019 MAFS5220 Final Reserach Project
19/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 19
19
Figure 9 model statistics and forecasting
Figure 10 conditional standard variance prediction
Using the model prediction we can demonstrate the path dependent conditional
variance with 1 quarter ahead forecasting above. Denote the predicted conditional
variance Step 3: Work out Markov Switching model
Here is the estimated HSI index Markov transition probability kernel (figure 11) and
the expected duration (figure 10) which accounts for the mean expected time for
each mode. The regime specification on (figure 12), state 1 is good and state 2 is bad.
To demonstrate the power of such method, the HSI historical index price are plot and
shaded for the crisis on (figure 13) the Markov switching auto regression are
specified on (figure 14) with the filtered probability
-
8/13/2019 MAFS5220 Final Reserach Project
20/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 20
20
Figure 11 expected mode duration
Figure 12 markov transition probability kernel
Figure 13 markov regime specification
-
8/13/2019 MAFS5220 Final Reserach Project
21/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 21
21
Figure 14 historical HSI price shaded for crisis
Figure 15 Filtered probability shaded for stated 2
Step 4: Robust VaR threshold model and BH procedure
Basic notation and description:
S(t)=1 denotes good state, S(t)=2 denotes bad state
x denotes the one-step forecast probability ending in state 2
y denotes the realized filtered probability for state 2
{ , . , VaR =1.645*
Where
is the result derived as constant from step 1 or Garch
prediction step 2
For demonstration purpose the is set at 5%
-
8/13/2019 MAFS5220 Final Reserach Project
22/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 22
22
The threshold model:
Function specification:
In below we define the objective function,: , ,
, { , ., Where 0.4 is a cut-off probability value in mode 2.
Threshold= ,}From the historical data, the threshold is 0.24 meaning that:
predited eoo tte { St + , St + 2St .2St + 2, St + 2St .2
The BH procedure:
In this case, the FDR is set to be 25%. This means the wrong detection
(good state is predicted to be bad) has a probability of 25%, we dont
-
8/13/2019 MAFS5220 Final Reserach Project
23/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 23
23
want to make too much wrong detection because this will eliminate
the business opportunity, but too few detection will cause a higher
significant level of downturn prediction, which will not be accurate.
This is trade-off for the user, but it does allow great flexibility. In this
setting the C is 22%, compare to the asymmetric model.
Robust VaR application:
Robust VaR prediction definition condition on good state:
ot r { r., St + } r + , St t }
Where is the result derived as constant from step 1 or Garch predictionstep 2If the economy is at state 2, the bad state:
The kernel is very hard to monitor and for simplicity we use expectation.
( + 2| 2) .3897( + | 2) .3
Robust VaR prediction condition on bad state:
ot r + r8. Conclusion on HSI index study
Out of sample validation:
The data is utilized till the 2013/4/1, with the fitted model above. The one step
bad economy forecast probability is see (figure
16):( + 2| ) .9, which is below both thresholdssolved for both detection bound, therefore we conclude there is no sign
indicates downturn trend. The HSI out of sample performance is listed below
(figure 17). One can fit an up-trend line for validation; therefore we conclude
the result is valid. But if on the other hand, the company is more focused on
high-frequency trading, more delicate risk control technique for short time
horizon could be build based on the framework.
-
8/13/2019 MAFS5220 Final Reserach Project
24/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 24
24
Figure 16 one step 2013 second quarter bad economy probability forecasting
Figure 17out of sample validationFinal result Demonstration and discussion:
(In graph the General VaR denotes Robust VaR)
In figure 18, the HSI return, CVaR,VaR and the Robust VaR is plot for
comparison, it is seen that the Robust Var provides good performance. Firstly,
it provides accuracy, at 95% level; the crossing is only twice, for large-scale
speculation and extreme downturn. Secondly, it gives business dynamics by
lower risk bound. Thirdly, unless extreme downturn occurs, the model handles
-
8/13/2019 MAFS5220 Final Reserach Project
25/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 25
25
normal business cycle downturn well. e.g.1998, 2000-2003, 2011. Last but not
least, more flexibility is allowed for extreme downturn without hurt the
normal period. In Figure(19 and 20), CVaR captures the extreme value. But
reconditioning on CVaR level, we can give more tolerance on extreme crisis.
The NNSD is predicted by Garch, the difference between it with Robust VaR is
determined by downturn detecting mechanism and the risk aversion level or
trade off prediction accuracy level against the bad periods. By reconditioning
the parameter the method gives a better downturn management
performance.
Figure 18 Method comparison
-
8/13/2019 MAFS5220 Final Reserach Project
26/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 26
26
Figure 19 Garch prediction and MS model switching model CVar=39
Figure 20Garch prediction and MS model switching model CVar=45
The HSI study result is very good; this method not only can be converted
into sequential algorithm but also introduce dynamics adjustment into
Risk management,
9. Further Application and prospect:
-
8/13/2019 MAFS5220 Final Reserach Project
27/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 27
27
The key result embedded in this study is the economy downturn detecting
mechanism, this method is fundamentally important in stress testing and
scenario analysis, we can build different scenarios directly into the model and
system without needs to re- parameterize the model and concern about the
inconsistency of the estimation.
On migration matrix:
It is well-known that many securities are subject to economy downturn risk;
corporate bond defaults, CMO defaults and various are all subject to the
business cycle and the effect is significant. For migration matrix, we can apply
the same argument: consider normal predicted migration matrix A
and distressed predicted migration matrixD .Follow similar argument. Firstly, detect the downturn risk and then determine
a downturn transition probability threshold from historical data.
The new migration matrix can be carried out as followings:
{ A, t + dthreholdA + D, otherwieWhere is a weight coefficient depending on the risk aversion level or useBH procedure set
equals to the trade off FDR to validate the argument for
more flexibility.
Prospect:
For the moment, all the work are carried out for single setting, if the portfolio
are highly diversified, in a high dimension space, one can either run a Markov
switching Vector auto regression model, and the state space can be more than
2 to catch up with the situation closely. Or one can still predict only the
economy downturn risk, use the component analysis to work out the portfolio
risk conditioning on the downturn. Survival analysis can also be used for the
expected duration to measure the switching pressure. If on the other hand,
the company is more focused on high-frequency trading, more delicate risk
control technique for short time horizon could be build based on the
framework use the Garch model to decompose the white noise process.
10. Appendix & Reference:
-
8/13/2019 MAFS5220 Final Reserach Project
28/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
Page 28
28
HSI data analytics:
Figure 21 arch lag test
Figure 22 Cgarch parameters estimation table
-
8/13/2019 MAFS5220 Final Reserach Project
29/29
A Sequential Algorithm on Robust Value at Risk Approach With application to
indexes and migration matrix risk control
29
Figure 23 Markov switching AR proces
i http://www.hsi.com.hk/HSI-Net/HSI-Net
ii http://finance.yahoo.com/q/hp?s=%5EHSI+Historical+Prices
iii Hamilton J D. A new approach to the economic analysis of nonstationary time
series and the business cycle[J]. Econometrica: Journal of the Econometric Society,
1989: 357-384.iv Bollerslev T, Engle R F, Nelson D B. ARCH models[J]. 1994.
Engle R F, Kroner K F. Multivariate simultaneous Robustized ARCH[J]. Econometric
theory, 1995, 11(01): 122-150.v Benjamini Y, Hochberg Y. Controlling the false discovery rate: a practical and powerful
approach to multiple testing[J]. Journal of the Royal Statistical Society. Series B(Methodological), 1995: 289-300.
http://www.hsi.com.hk/HSI-Net/HSI-Nethttp://www.hsi.com.hk/HSI-Net/HSI-Nethttp://finance.yahoo.com/q/hp?s=%5EHSI+Historical+Priceshttp://finance.yahoo.com/q/hp?s=%5EHSI+Historical+Priceshttp://finance.yahoo.com/q/hp?s=%5EHSI+Historical+Priceshttp://www.hsi.com.hk/HSI-Net/HSI-Net