1
- using DelimitedFiles, Random, ScoreDrivenModels, Statistics
1
+ using DelimitedFiles, Random, ScoreDrivenModels, Statistics, Plots
2
2
3
3
# Load historical Consumer Price Index data
4
4
y = vec (readdlm (" ../test/data/cpichg.csv" ))
@@ -39,10 +39,15 @@ forec.parameter_forecast
39
39
# Similarly, we can access the simulated observation scenarios
40
40
forec. observation_scenarios
41
41
42
- gas_t = Model (1 , 1 , TDistLocationScale, 0 .0 ; time_varying_params = [1 ])
42
+ gas_t = Model (1 , 1 , TDistLocationScale, 1 .0 ; time_varying_params = [1 ])
43
43
steps_ahead = 50
44
44
first_idx = 150
45
45
b_t = backtest (gas_t, y, steps_ahead, first_idx)
46
46
plot (b_t, " GAS(1, 1) Student t" )
47
- using Plots
48
- plot! (b_t, " GAS(1, 1) Student t" )
47
+
48
+ gas_t_1_2 = Model (1 , 2 , TDistLocationScale, 1.0 ; time_varying_params = [1 ])
49
+ steps_ahead = 50
50
+ first_idx = 150
51
+ b_t_1_2 = backtest (gas_t_1_2, y, steps_ahead, first_idx)
52
+ plot (b_t, " GAS(1, 1) Student t" );
53
+ plot! (b_t_1_2, " GAS(1, 2) Student t" ; legend = :topleft )
0 commit comments