|
75 | 75 | plt.figure(1) |
76 | 76 |
|
77 | 77 | ## Plot the log-returns |
78 | | -plt.subplot(5, 3, (1, 2, 3)) |
| 78 | +plt.subplot(5, 3, (1, 3)) |
79 | 79 | plt.plot(y, color='#1B9E77', linewidth=1.5) |
80 | 80 | plt.xlabel("time") |
81 | 81 | plt.ylabel("log-return") |
82 | 82 |
|
83 | 83 |
|
84 | 84 | ## Plot the log-volatility estimate |
85 | | -plt.subplot(5, 3, (4, 5, 6)) |
| 85 | +plt.subplot(5, 3, (4, 6)) |
86 | 86 | plt.plot(np.mean(resXhat, axis=0), color='#D95F02', linewidth=1.5) |
87 | 87 | plt.xlabel("time") |
88 | 88 | plt.ylabel("log-volatility estimate") |
|
114 | 114 | macf = macf[macf.size/2:] |
115 | 115 | macf = macf[0:100] |
116 | 116 | macf /= macf[0] |
117 | | -grid = range(len(macf)) |
118 | | -plt.plot(grid, macf, color='#7570B3') |
| 117 | +grid_acf = range(len(macf)) |
| 118 | +plt.plot(grid_acf, macf, color='#7570B3') |
119 | 119 | plt.xlabel("lag") |
120 | 120 | plt.ylabel("ACF of mu") |
121 | 121 |
|
|
145 | 145 | macf = macf[macf.size/2:] |
146 | 146 | macf = macf[0:100] |
147 | 147 | macf /= macf[0] |
148 | | -grid = range(len(macf)) |
149 | | -plt.plot(grid, macf, color='#E7298A') |
| 148 | +grid_acf = range(len(macf)) |
| 149 | +plt.plot(grid_acf, macf, color='#E7298A') |
150 | 150 | plt.xlabel("lag") |
151 | 151 | plt.ylabel("ACF of phi") |
152 | 152 |
|
|
175 | 175 | macf = macf[macf.size/2:] |
176 | 176 | macf = macf[0:100] |
177 | 177 | macf /= macf[0] |
178 | | -grid = range(len(macf)) |
179 | | -plt.plot(grid, macf, color='#66A61E') |
| 178 | +grid_acf = range(len(macf)) |
| 179 | +plt.plot(grid_acf, macf, color='#66A61E') |
180 | 180 | plt.xlabel("lag") |
181 | 181 | plt.ylabel("ACF of sigmav") |
182 | 182 |
|
|
0 commit comments