Out of sample forecast for VARX-MGARCH-BEKK
Posted: Sun Sep 11, 2016 6:04 pm
Hello,
I have long run contrivance stationarity for my model.
I am now trying to generate n=1000 sample paths over 365 days for estimated VARX-MGARCH-BEKK.
Is there any code/RPF that can help me to do this? Could you help me with this please?
The following is the code i used:
calendar(7) 2013:7:17
data(format=xls, org=obs, dateform="y/m/d") 2013:7:17 2015:10:11
log wikibtc / lwikibtc
log wikiltc / lwikiltc
log hashbtc / lhashbtc
log hashltc / lhashltc
dec symm[series] hhs(2,2)
clear(zeros) hhs
System(model=varxmodel)
variables logrbtc logrltc
lags 1
deterministic constant lwikibtc lwikiltc tranbtc tranltc lhashbtc lhashltc hhs(1,1) hhs(1,2) hhs(2,1) hhs(2,2)
end(system)
estimate
garch(model=varxmodel,p=2,q=1,mvhseries=hhs,pmethod=bfgs,piters=15,iters=500,mv=bekk)
MV-GARCH, BEKK - Estimation by BFGS
Convergence in 264 Iterations. Final criterion was 0.0000000 <= 0.0000100
Daily(7) Data From 2013:07:18 To 2015:10:10
Usable Observations 815
Log Likelihood 3008.4752
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. LOGRBTC{1} -0.010600 0.051229 -0.20691 0.83608294
2. LOGRLTC{1} -0.041659 0.032841 -1.26852 0.20461167
3. Constant 0.035365 0.032812 1.07781 0.28112076
4. LWIKIBTC 0.003757 0.003472 1.08231 0.27911627
5. LWIKILTC -0.009471 0.004340 -2.18226 0.02909060
6. TRANBTC 0.000000 0.000000 0.84108 0.40030483
7. TRANLTC -0.000000 0.000000 -0.49536 0.62034722
8. LHASHBTC -0.000555 0.002667 -0.20806 0.83518125
9. LHASHLTC -0.002235 0.006937 -0.32217 0.74732387
10. HHS(1,1) 4.534055 1.988871 2.27971 0.02262474
11. HHS(2,1) -0.647625 0.650577 -0.99546 0.31951167
12. HHS(2,1) -0.647626 0.650573 -0.99547 0.31950727
13. HHS(2,2) 0.179942 0.169796 1.05976 0.28925503
14. LOGRBTC{1} 0.212949 0.063509 3.35305 0.00079927
15. LOGRLTC{1} -0.186114 0.057083 -3.26042 0.00111249
16. Constant -0.000179 0.025590 -0.00699 0.99442140
17. LWIKIBTC 0.001552 0.003533 0.43943 0.66034942
18. LWIKILTC -0.005107 0.005115 -0.99828 0.31814554
19. TRANBTC 0.000001 0.000001 1.51152 0.13065626
20. TRANLTC -0.000000 0.000000 -2.18972 0.02854457
21. LHASHBTC 0.001484 0.003453 0.42979 0.66734646
22. LHASHLTC -0.005363 0.007416 -0.72315 0.46958663
23. HHS(1,1) 10.762012 2.826236 3.80790 0.00014015
24. HHS(2,1) -2.382251 1.266273 -1.88131 0.05992991
25. HHS(2,1) -2.382250 1.266275 -1.88131 0.05993043
26. HHS(2,2) 1.041240 0.440775 2.36229 0.01816227
27. C(1,1) 0.008252 0.001129 7.30712 0.00000000
28. C(2,1) 0.005317 0.001876 2.83505 0.00458182
29. C(2,2) 0.009111 0.001278 7.13038 0.00000000
30. A(1,1) 0.389019 0.041446 9.38621 0.00000000
31. A(1,2) -0.267674 0.075349 -3.55245 0.00038166
32. A(2,1) -0.011589 0.026372 -0.43945 0.66033721
33. A(2,2) 0.647103 0.070265 9.20951 0.00000000
34. B{1}(1,1) 0.907638 0.040078 22.64665 0.00000000
35. B{1}(1,2) 0.174280 0.065551 2.65870 0.00784419
36. B{1}(2,1) -0.011844 0.024322 -0.48698 0.62627367
37. B{1}(2,2) 0.733812 0.084778 8.65565 0.00000000
38. B{2}(1,1) 0.100103 0.218180 0.45881 0.64637079
39. B{2}(1,2) -0.206230 0.174590 -1.18123 0.23751331
40. B{2}(2,1) 0.073829 0.043302 1.70496 0.08820125
41. B{2}(2,2) 0.398356 0.122936 3.24036 0.00119381
************I tried @mvgarchtovech(mv=bekk) but nothing show up
***********Then I tried the following
* GraphForecast.RPF
* RATS Introduction, Example from Section 3.15.
*
cal(m) 1960:1
open data oecdsample.rat
data(format=rats) 1960:1 2006:12 jpniptotrs
*
* Use ESMOOTH with automatically selected model to forecast 24 periods
* out of sample. Add the final actual to the period before the forecasts
* start and put a grid line at the last actual data point.
*
esmooth(trend=select,seasonal=select,forecast=crypfore,steps=365) logrbtc
Exponential Smoothing for Series LOGRBTC
Model Selection
TREND SEASONAL SumSquares SBC
None None 1.90585017 -4937.8
Linear None 1.89569351 -4935.5
Model with TREND=None , SEASONAL=None
Alpha (level) 0.009254
set crypfore 2015:10:11 2015:10:11 = logrbtc
graph(header="Forecasts",grid=t==2015:10:11) 2
# logrbtc 2013:7:17 2015:10:11
# crypfore 2015:10:11 2016:10:11
******I do not know what to choose for trend and seasonal. So i left them empty. Is this the right code i need to use? The graph only shows a straight line equals to zero for the forecast.
Kind regards
I have long run contrivance stationarity for my model.
I am now trying to generate n=1000 sample paths over 365 days for estimated VARX-MGARCH-BEKK.
Is there any code/RPF that can help me to do this? Could you help me with this please?
The following is the code i used:
calendar(7) 2013:7:17
data(format=xls, org=obs, dateform="y/m/d") 2013:7:17 2015:10:11
log wikibtc / lwikibtc
log wikiltc / lwikiltc
log hashbtc / lhashbtc
log hashltc / lhashltc
dec symm[series] hhs(2,2)
clear(zeros) hhs
System(model=varxmodel)
variables logrbtc logrltc
lags 1
deterministic constant lwikibtc lwikiltc tranbtc tranltc lhashbtc lhashltc hhs(1,1) hhs(1,2) hhs(2,1) hhs(2,2)
end(system)
estimate
garch(model=varxmodel,p=2,q=1,mvhseries=hhs,pmethod=bfgs,piters=15,iters=500,mv=bekk)
MV-GARCH, BEKK - Estimation by BFGS
Convergence in 264 Iterations. Final criterion was 0.0000000 <= 0.0000100
Daily(7) Data From 2013:07:18 To 2015:10:10
Usable Observations 815
Log Likelihood 3008.4752
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. LOGRBTC{1} -0.010600 0.051229 -0.20691 0.83608294
2. LOGRLTC{1} -0.041659 0.032841 -1.26852 0.20461167
3. Constant 0.035365 0.032812 1.07781 0.28112076
4. LWIKIBTC 0.003757 0.003472 1.08231 0.27911627
5. LWIKILTC -0.009471 0.004340 -2.18226 0.02909060
6. TRANBTC 0.000000 0.000000 0.84108 0.40030483
7. TRANLTC -0.000000 0.000000 -0.49536 0.62034722
8. LHASHBTC -0.000555 0.002667 -0.20806 0.83518125
9. LHASHLTC -0.002235 0.006937 -0.32217 0.74732387
10. HHS(1,1) 4.534055 1.988871 2.27971 0.02262474
11. HHS(2,1) -0.647625 0.650577 -0.99546 0.31951167
12. HHS(2,1) -0.647626 0.650573 -0.99547 0.31950727
13. HHS(2,2) 0.179942 0.169796 1.05976 0.28925503
14. LOGRBTC{1} 0.212949 0.063509 3.35305 0.00079927
15. LOGRLTC{1} -0.186114 0.057083 -3.26042 0.00111249
16. Constant -0.000179 0.025590 -0.00699 0.99442140
17. LWIKIBTC 0.001552 0.003533 0.43943 0.66034942
18. LWIKILTC -0.005107 0.005115 -0.99828 0.31814554
19. TRANBTC 0.000001 0.000001 1.51152 0.13065626
20. TRANLTC -0.000000 0.000000 -2.18972 0.02854457
21. LHASHBTC 0.001484 0.003453 0.42979 0.66734646
22. LHASHLTC -0.005363 0.007416 -0.72315 0.46958663
23. HHS(1,1) 10.762012 2.826236 3.80790 0.00014015
24. HHS(2,1) -2.382251 1.266273 -1.88131 0.05992991
25. HHS(2,1) -2.382250 1.266275 -1.88131 0.05993043
26. HHS(2,2) 1.041240 0.440775 2.36229 0.01816227
27. C(1,1) 0.008252 0.001129 7.30712 0.00000000
28. C(2,1) 0.005317 0.001876 2.83505 0.00458182
29. C(2,2) 0.009111 0.001278 7.13038 0.00000000
30. A(1,1) 0.389019 0.041446 9.38621 0.00000000
31. A(1,2) -0.267674 0.075349 -3.55245 0.00038166
32. A(2,1) -0.011589 0.026372 -0.43945 0.66033721
33. A(2,2) 0.647103 0.070265 9.20951 0.00000000
34. B{1}(1,1) 0.907638 0.040078 22.64665 0.00000000
35. B{1}(1,2) 0.174280 0.065551 2.65870 0.00784419
36. B{1}(2,1) -0.011844 0.024322 -0.48698 0.62627367
37. B{1}(2,2) 0.733812 0.084778 8.65565 0.00000000
38. B{2}(1,1) 0.100103 0.218180 0.45881 0.64637079
39. B{2}(1,2) -0.206230 0.174590 -1.18123 0.23751331
40. B{2}(2,1) 0.073829 0.043302 1.70496 0.08820125
41. B{2}(2,2) 0.398356 0.122936 3.24036 0.00119381
************I tried @mvgarchtovech(mv=bekk) but nothing show up
***********Then I tried the following
* GraphForecast.RPF
* RATS Introduction, Example from Section 3.15.
*
cal(m) 1960:1
open data oecdsample.rat
data(format=rats) 1960:1 2006:12 jpniptotrs
*
* Use ESMOOTH with automatically selected model to forecast 24 periods
* out of sample. Add the final actual to the period before the forecasts
* start and put a grid line at the last actual data point.
*
esmooth(trend=select,seasonal=select,forecast=crypfore,steps=365) logrbtc
Exponential Smoothing for Series LOGRBTC
Model Selection
TREND SEASONAL SumSquares SBC
None None 1.90585017 -4937.8
Linear None 1.89569351 -4935.5
Model with TREND=None , SEASONAL=None
Alpha (level) 0.009254
set crypfore 2015:10:11 2015:10:11 = logrbtc
graph(header="Forecasts",grid=t==2015:10:11) 2
# logrbtc 2013:7:17 2015:10:11
# crypfore 2015:10:11 2016:10:11
******I do not know what to choose for trend and seasonal. So i left them empty. Is this the right code i need to use? The graph only shows a straight line equals to zero for the forecast.
Kind regards