ABCDEFGHIJKLMNOPQRSTUVWXYZAA
1
Date9988.hk700.hk3690.hk3032.HKLn return9988.hk700.hk3690.hk3032.HKStatistics
2
2021/10/4137457236.8000035.9252021/10/5-0.01248636848-0.01543580813-0.013605639040.00084352598849988.hk700.hk3690.hk3032.HKRemark
3
2021/10/5135.300003450233.6000065.932021/10/60.01467377727-0.008032185138-0.02163649903-0.01443761809Mean return-0.002334265533-0.002298948711-0.001596208672-0.0022745179*AVERAGE
4
2021/10/6137.300003446.399994228.6000065.8452021/10/70.070303009210.054491580150.092682043110.05249018262Var0.0017865684960.00082608337390.0020146236060.0008863478027
*VAR.S gives unbiased estimator for sigma^2
5
2021/10/7147.300003471.399994250.8000036.162021/10/80.054174387780.02182208750.02052162376-0.001624695727SD0.042267818680.028741666160.044884558660.02977159389*SQRT of Var
6
2021/10/8155.5481.7999882566.152021/10/110.076127080290.029046861450.080283041770.03514738777
7
2021/10/11167.800003496277.3999946.372021/10/12-0.03950680818-0.02614525527-0.03074910665-0.02705017753
Covariance Matrix (COVARIANCE.S)
8
2021/10/12161.300003483.2000122696.22021/10/150.0030950194360.025338490410.042931249810.012024192979988.hk700.hk3690.hk3032.HK
9
2021/10/15161.800003495.600006280.7999886.2752021/10/180.006775455610.002820864235-0.0014254956540.0015923570249988.hk0.0017865684960.00098676862910.0014385147930.001096707397
10
2021/10/18162.899994497280.3999946.2852021/10/190.01159615690.0040160696550.018375117710700.hk0.00098676862910.00082608337390.0010537623610.0007563975769
11
2021/10/19164.800003499285.6000066.2852021/10/200.064614366640.020823756910.028306971420.058704111593690.hk0.0014385147930.0010537623610.0020146236060.001183343165
12
2021/10/20175.800003509.5293.7999886.6652021/10/21-0.01086661546-0.007881814202-0.01855083829-0.0098003045983032.HK0.0010967073970.00075639757690.0011833431650.0008863478027
13
2021/10/21173.899994505.5288.3999946.62021/10/220.0028710902140.0078818142020.0027701471720.01652930195
14
2021/10/22174.399994509.5289.2000126.712021/10/25-0.002296177857-0.008871423387-0.008333464894-0.001491424587
Remark: To compute correlation matrix, we can use
CORREL
15
2021/10/25174505286.7999886.72021/10/26-0.02620237239-0.005958309584-0.01333816924-0.01352387253
16
2021/10/26169.55022836.612021/10/27-0.02994235662-0.03033599661-0.05222359122-0.03384938547
17
2021/10/27164.5487268.6000066.392021/10/280.0042462727220.0024610594560.013313827880.002344666959
Single Asset VaR
18
2021/10/28165.199997488.200012272.2000126.4052021/10/29-0.01340664212-0.01485791243-0.009597733009-0.008624122444
19
2021/10/29163481269.6000066.352021/11/1-0.02170627858-0.02398598882-0.008193759064-0.01747463052
Compute VaR for 700.hk
20
2021/11/1159.5469.600006267.3999946.242021/11/20.01308026099-0.011996729060.013373178650.004796172263Normal VaRWealth (W)alphaz_alphaERSD1-day VaR10-day VaR1-day absolute VaR
10-day absolute VaR
21
2021/11/2161.6000064642716.272021/11/3-0.0062073443430.010718216220.02189868531-0.007202912294FormulaNORM.S.INV(alpha)-W*z_alpha*SD1-day VaR*sqrt(T)-W*(ER+z_alpha*SD)
-W*(mean return*T+z_alpha*SD*sqrt(T)
22
2021/11/3160.6000064692776.2252021/11/40.030658439310.024848589820.031974304630.01751637142Quantity $ 1,000,000.00 5%-1.644853625-0.0022989487110.02874166616 $ 47,275.83 $ 149,499.31 $ 49,574.78 $ 172,488.80
23
2021/11/4165.600006480.7999882866.3352021/11/5-0.03502669587-0.02826594899-0.03269663043-0.01671348097Remark
24
2021/11/5159.899994467.399994276.7999886.232021/11/8-0.01639375318-0.00773201032-0.02043858008-0.01129955525
1. VaR by default means relative VaR
25
2021/11/8157.300003463.799988271.2000126.162021/11/9-0.0012722456820.000431153278-0.0029542783350.002432104969
2. Open questions: what are the underlying assumptions in above Normal VaR model? Does it make sense?
26
2021/11/9157.100006464270.3999946.1752021/11/100.025763228010.041373578920.025558164270.02162679404
27
2021/11/10161.199997483.600006277.3999946.312021/11/110.01233061269-0.012484556510.017863998120.0188388617
28
2021/11/11163.199997477.600006282.3999946.432021/11/12-0.0049140333660.015787627160.025866504110.01236491797
Portfolio VaR
29
2021/11/12162.399994485.200012289.7999886.512021/11/15-0.0055572481190.01351090358-0.00069030724890.006888660995
Assume we invest $W on ATM with following weights:
30
2021/11/15161.5491.799988289.6000066.5552021/11/160.022651700260.021523534550.026577332620.01438873745
Weight vector (w)
31
2021/11/16165.199997502.5297.3999946.652021/11/17-0.0024242072480.01285237662-0.01627150476-0.0037664827959988.hk-25%
32
2021/11/17164.800003509292.6000066.6252021/11/18-0.05487662843-0.02426051009-0.02491482507-0.02987583362700.hk150%
33
2021/11/18156496.799988285.3999946.432021/11/19-0.1132261049-0.00161157974-0.0162490546-0.0038956029013690.hk-25%
34
2021/11/19139.300003496280.7999886.4052021/11/22-0.01591927199-0.003231032717-0.02451452303-0.003910837992
35
2021/11/22137.100006494.3999942746.382021/11/23-0.03036150211-0.02706188497-0.0318900071-0.01420702664
36
2021/11/23133481.200012265.3999946.292021/11/24-0.009063483392-0.018880358970.02969780305-0.0047808856Normal VaRWealth (W)alphaz_alphaPortfolio Var1-day VaR10-day VaR
37
2021/11/24131.800003472.200012273.3999946.262021/11/250.026947671330.011789559710.0029219085480.01112005104FormulaNORM.S.INV(alpha)w^T(cov)w-W*z_alpha*SD
1-day VaR*sqrt(T)
38
2021/11/25135.399994477.799988274.2000126.332021/11/26-0.04764597184-0.03060161073-0.0394249855-0.03210548621Quantity $ 1,000,000.00 5%-1.6448536250.0007456782044 $ 44,916.20 $ 142,037.49
39
2021/11/26129.100006463.399994263.6000066.132021/11/290.006947106127-0.002160294668-0.07317461485-0.01148494987Remark
40
2021/11/29130462.3999942456.062021/11/30-0.02098792133-0.006509027188-0.02898753687-0.01412570226
1. cov = covariance matrix
41
2021/11/30127.300003459.3999942385.9752021/12/1-0.01264843740.020254935470.027353574110.00584065073
2. press ctrl+shift+enter in the same time for running array function
42
2021/12/1125.699997468.799988244.6000066.012021/12/2-0.024971084540.010186883570.01299773352-0.00584065073
3. Matrix multiplication
MMULT(M1,M2)
43
2021/12/2122.599998473.600006247.8000035.9752021/12/3-0.02644778948-0.02350033347-0.02699552889-0.01347956383
4. Matrix transpose:
TRANSPOSE(M1)
44
2021/12/3119.400002462.600006241.1999975.8952021/12/6-0.05774982328-0.0325160854-0.03716645326-0.03715330126
45
2021/12/6112.699997447.799988232.3999945.682021/12/70.11551291370.035106721580.056058210180.04475790064
Contribution of risky asset to portfolio VaR
46
2021/12/7126.5463.799988245.8000035.942021/12/8-0.047763040460.006875858721-0.00244401751-0.001684920365Contribution AssetWeight (w_i)BetaMVaRCVaR
47
2021/12/8120.599998467245.1999975.932021/12/90.022951859970.011920119780.0073141448010.02251032939Formula
{(cov)w}/portfolio Var
Portfolio VaR*beta
MVaR_i*w_i
48
2021/12/9123.400002472.6000062476.0652021/12/10-0.0179890788-0.0196587784-0.01632689329-0.01244313027Quantity9988.hk-25%0.9037170692 $ 40,591.53 $ (10,147.88)
49
2021/12/10121.199997463.3999942435.992021/12/13-0.0008254148390.0068817733960.020367302820.002501043405700.hk150%0.9776232014 $ 43,911.12 $ 65,866.67
50
2021/12/13121.099998466.6000062486.0052021/12/14-0.0200173577-0.01468078622-0.0072845446-0.029575455173690.hk-25%0.962022139 $ 43,210.38 $ (10,802.59)
51
2021/12/14118.699997459.799988246.1999975.832021/12/150.01919126925-0.008737495747-0.01803325098-0.01121184664sum of CVaR $ 44,916.20
52
2021/12/15121455.799988241.8000035.7652021/12/16-0.002482442348-0.007045344028-0.014161040560.006052763831Remark
53
2021/12/16120.699997452.600006238.3999945.82021/12/17-0.03113416845-0.03278983608-0.05430024502-0.02620237239
1. MVaR = Mariginal VaR; CVaR = Component VaR
54
2021/12/17117438225.8000035.652021/12/20-0.0215991118-0.01843370169-0.02966512361-0.03237692872
55
2021/12/20114.5430219.1999975.472021/12/21-0.0052539349820.024806021930.043737462170.02080581609
VaR change approximation
56
2021/12/21113.900002440.7999882295.5852021/12/220.0087413142490.004978539430.0060948992260.009799632989Case 1Case 2
57
2021/12/22114.900002443230.3999945.642021/12/23-0.014023007750.04156210089-0.01663052771-0.006225008986
Assume we rebalance the portfolio as
Assume we rebalance the portfolio as
58
2021/12/23113.300003461.799988226.6000065.6052021/12/24-0.0026513758-0.002167787595-0.005309800086-0.002679769357
change in weight (a)
change (a)
59
2021/12/24113460.799988225.3999945.592021/12/280.004415018209-0.02282801984-0.008912715209-0.012601426889988.hk-1%9988.hk $ -
60
2021/12/28113.5450.399994223.3999945.522021/12/29-0.02588276592-0.01251134755-0.03368545209-0.01459879942700.hk2%700.hk $ 10,000.00
61
2021/12/29110.599998444.7999882165.442021/12/30-0.006349191397-0.0031524323080.01104980871-0.00091954029473690.hk-1%3690.hk $ -
62
2021/12/30109.900002443.399994218.3999945.4352021/12/310.078711940910.029773348420.031548358590.03791067703
Approximated change in VaR = Transpose(MVaR)a
$ 40
Approximated change in VaR = Transpose(MVaR)a/W
$ 439.11
63
2021/12/31118.900002456.799988225.3999945.6452022/1/3-0.03335069215-0.00658908617-0.008912715209-0.005328609411
64
2022/1/3115453.799988223.3999945.6152022/1/40.01638675722-0.008408963138-0.01715612282-0.01164366043Remark:
65
2022/1/4116.900002450219.6000065.552022/1/5-0.02074406259-0.0440679839-0.1182954586-0.04797968189
1. For case 1, the estimated new VaR is $44,956.2, while the VaR under full valuation is $44,961.86, error is roughly 0.01% or 1 bp
66
2022/1/5114.5430.600006195.1000065.292022/1/60.05521572260.014753596230.035745013370.01314572921
2. For case 2, the estimated new VaR is $45,355.31 while the VaR under full valuation is $45,355.65, error is basically not noticeble
67
2022/1/6121437202.1999975.362022/1/70.062470291370.013636574950.0088627020950.01848481467
68
2022/1/7128.8000034432045.462022/1/10-0.009360481725-0.0070755665670.012664591880.02353049741
69
2022/1/10127.599998439.876587206.6000065.592022/1/11-0.015798117130.01489290880.006753493974-0.003584233228Backtest
70
2022/1/11125.599998446.4766542085.572022/1/120.057246890110.044224954650.087411937780.04819154098
71
2022/1/12133466.6651922275.8452022/1/13-0.006033223497-0.01171567308-0.003530467062-0.01812738459
Suppose we perform backtest on 99% VaR over 500 days, we find 13 exceptions, should we reject the model at 5% significance level?
72
2022/1/13132.199997461.229797226.1999975.742022/1/14-0.02218059575-0.003795043624-0.0250684164-0.004364913085
Using Kupiec test (lecture note ch3 p.27)
73
2022/1/14129.300003459.482727220.6000065.7152022/1/17-0.006206404644-0.0166137734-0.01829877175-0.006143064514
74
2022/1/17128.5451.912048216.6000065.682022/1/18-0.0164774068-0.02787638565-0.003700295542-0.005295687575
failure rate under H0,tilde alpha
1%
75
2022/1/18126.400002439.488342215.8000035.652022/1/19-0.017558352190.00660358905-0.006508665514-0.01067625799
Exception days, N
13
76
2022/1/19124.199997442.400146214.3999945.592022/1/200.057113706270.063916401160.10442727250.04546237408
Total Observation T
500
77
2022/1/20131.5471.6000062385.852022/1/21-0.034032689160.0067624560760-0.0051413995Test statistic8.973292711
78
2022/1/21127.099998474.7999882385.822022/1/24-0.06501070289-0.01101235617-0.02209094493-0.02787636953Critical value3.84
79
2022/1/24119.099998469.600006232.8000035.662022/1/25-0.01950036349-0.005980406585-0.03053006374-0.02867579998Rej H0?TRUE
80
2022/1/25116.800003466.799988225.8000035.52022/1/260.00085578950760.01446222153-0.0035492627970.007246408521
81
2022/1/26116.900002473.6000062255.542022/1/27-0.07456871261-0.02263604215-0.07185413242-0.03676884779Remark:
82
2022/1/27108.5463209.3999945.342022/1/280.01373019281-0.006500564603-0.006708190082-0.01414450739
Formula for test stat
-2*LN((1-tilde_alpha)^(T-N)*tilde_alpha^N)+2*LN((1-N/T)^(T-N)*(N/T)^N)
83
2022/1/281104602085.2652022/1/310.041839632190.024056168320.056998130960.02160722859
84
2022/1/31114.699997471.200012220.1999975.382022/2/40.048499551510.016417939610.029532374420.02930612659
85
2022/2/4120.400002479226.8000035.542022/2/7-0.04588742112-0.002089864919-0.004418920079-0.01180222506
86
2022/2/7115478225.8000035.4752022/2/8-0.03360177353-0.01687803779-0.02148696348-0.01471967699
87
2022/2/8111.1999974702215.3952022/2/90.066111077340.026869769660.036432270230.03550668846
88
2022/2/9118.800003482.799988229.1999975.592022/2/100.028217590010.0033085349240.016443481810.002679769357
89
2022/2/10122.199997484.3999942335.6052022/2/110.001635364231-0.0153945084-0.02257038938-0.01256749036
90
2022/2/11122.400002477227.8000035.5352022/2/14-0.03069511008-0.0105375053-0.03666032722-0.0136427764
91
2022/2/14118.699997472219.6000065.462022/2/15-0.002530537-0.004246290881-0.02583172194-0.003669728889
92
2022/2/15118.4000024702145.442022/2/160.034042290640.013105264550.024920505470.02361599307
93
2022/2/16122.5476.200012219.3999945.572022/2/170.0040733253880.0058626381590.0063608074960.005371543802
94
2022/2/17123479220.8000035.62022/2/18-0.028867984-0.01896790271-0.1608153652-0.02990707717
95
2022/2/18119.54701885.4352022/2/21-0.03925416911-0.05375995335-0.04071118506-0.0270412747
96
2022/2/21114.900002445.399994180.55.292022/2/22-0.03093485681-0.001348025394-0.05231435493-0.02294555735
97
2022/2/22111.400002444.799988171.3000035.172022/2/230.0089366098070.00044956620830.03047089930.01630731581
98
2022/2/23112.400002445176.6000065.2552022/2/24-0.06905642079-0.03941851357-0.03691312363-0.04575007063
99
2022/2/24104.900002427.799988170.1999975.022022/2/250.003805913162-0.00892231336600.007936549596
100
2022/2/25105.300003424170.1999975.062022/2/28-0.0105013471-0.0066256464820.011682376060.001974334304