arch.univariate.base.ARCHModelFixedResult.hedgehog_plot¶
-
ARCHModelFixedResult.hedgehog_plot(params: ndarray | Series | None =
None
, horizon: int =10
, step: int =10
, start: int | str | datetime | datetime64 | Timestamp | None =None
, plot_type: 'volatility' | 'mean' ='volatility'
, method: 'analytic' | 'simulation' | 'bootstrap' ='analytic'
, simulations: int =1000
) Figure [source]¶ Plot forecasts from estimated model
- Parameters:¶
- params: ndarray | Series | None =
None
¶ Alternative parameters to use. If not provided, the parameters computed by fitting the model are used. Must be 1-d and identical in shape to the parameters computed by fitting the model.
- horizon: int =
10
¶ Number of steps to forecast
- step: int =
10
¶ Non-negative number of forecasts to skip between spines
- start: int | str | datetime | datetime64 | Timestamp | None =
None
¶ An integer, datetime or str indicating the first observation to produce the forecast for. Datetimes can only be used with pandas inputs that have a datetime index. Strings must be convertible to a date time, such as in ‘1945-01-01’. If not provided, the start is set to the earliest forecastable date.
- plot_type: 'volatility' | 'mean' =
'volatility'
¶ Quantity to plot, the forecast volatility or the forecast mean
- method: 'analytic' | 'simulation' | 'bootstrap' =
'analytic'
¶ Method to use when producing the forecast. The default is analytic. The method only affects the variance forecast generation. Not all volatility models support all methods. In particular, volatility models that do not evolve in squares such as EGARCH or TARCH do not support the ‘analytic’ method for horizons > 1.
- simulations: int =
1000
¶ Number of simulations to run when computing the forecast using either simulation or bootstrap.
- params: ndarray | Series | None =
- Returns:¶
fig – Handle to the figure
- Return type:¶
figure
Examples
>>> import pandas as pd >>> from arch import arch_model >>> am = arch_model(None,mean='HAR',lags=[1,5,22],vol='Constant') >>> sim_data = am.simulate([0.1,0.4,0.3,0.2,1.0], 250) >>> sim_data.index = pd.date_range('2000-01-01',periods=250) >>> am = arch_model(sim_data['data'],mean='HAR',lags=[1,5,22], vol='Constant') >>> res = am.fit() >>> fig = res.hedgehog_plot(plot_type='mean')