class parametricGarch.Garch(data, vol='Garch', p=1, q=1, dist='normal', update_freq=0, disp='off', horizon=1, start=None, reindex=False)[source]

Parametric bootstrapping with GARCH models.

bootstrap(num_iterations=1000)[source]

Perform parametric bootstrapping to estimate the forecast distribution.

Parameters:
num_iterations: int, optional

Number of bootstrap iterations. Default is 1000.

Returns:

bool: True if the bootstrap is successful.

property bootstrap_samples

Get the forecasted mean and volatility list from the bootstrapped model.

Returns:

list: List of tuples containing forecasted mean and volatility for each bootstrap iteration.

property bootstrap_summary

Get the summary of the bootstrapped model.

Returns:

arch.univariate.base.ARCHModelResultSummary: Summary of the bootstrapped model.

property conditional_volatility

Get the conditional volatility of the fitted model.

Returns:

pandas.Series: Conditional volatility series.

estimate_risk(confidence_level=0.95, q='empirical')[source]

Estimate risk measures: volatility and Value-at-Risk (VaR) using the bootstrapped model.

Parameters:
confidence_level: float, optional

Confidence level for calculating VaR and volatility. Default is 0.95.

q: str, optional

Quantile calculation method. ‘empirical’ for empirical quantile, ‘parametric’ for parametric quantile. Default is ‘empirical’.

Returns:
dict: Dictionary containing risk estimates including mean volatility, volatility confidence interval,

mean VaR, and VaR confidence interval.

property forecast_mean

Get the forecasted conditional mean of the model.

Returns:

pandas.DataFrame: Forecasted conditional mean series.

property forecast_residual_variance

Get the forecasted conditional variance of the residuals of the model.

Returns:

pandas.DataFrame: Forecasted conditional residual variance series.

property forecast_variance

Get the forecasted conditional variance of the model.

Returns:

pandas.DataFrame: Forecasted conditional variance series.

property standardised_residuals

Get the standardized residuals of the fitted model.

Returns:

pandas.Series: Standardized residuals series.

property summary

Get the summary of the fitted model.

Returns:

arch.univariate.base.ARCHModelResultSummary: Summary of the fitted model.

Python API

class parametricGarch.parametric.Garch(data, vol='Garch', p=1, q=1, dist='normal', update_freq=0, disp='off', horizon=1, start=None, reindex=False)[source]

Bases: object

Parametric bootstrapping with GARCH models.

bootstrap(num_iterations=1000)[source]

Perform parametric bootstrapping to estimate the forecast distribution.

Parameters:
num_iterations: int, optional

Number of bootstrap iterations. Default is 1000.

Returns:

bool: True if the bootstrap is successful.

property bootstrap_samples

Get the forecasted mean and volatility list from the bootstrapped model.

Returns:

list: List of tuples containing forecasted mean and volatility for each bootstrap iteration.

property bootstrap_summary

Get the summary of the bootstrapped model.

Returns:

arch.univariate.base.ARCHModelResultSummary: Summary of the bootstrapped model.

property conditional_volatility

Get the conditional volatility of the fitted model.

Returns:

pandas.Series: Conditional volatility series.

estimate_risk(confidence_level=0.95, q='empirical')[source]

Estimate risk measures: volatility and Value-at-Risk (VaR) using the bootstrapped model.

Parameters:
confidence_level: float, optional

Confidence level for calculating VaR and volatility. Default is 0.95.

q: str, optional

Quantile calculation method. ‘empirical’ for empirical quantile, ‘parametric’ for parametric quantile. Default is ‘empirical’.

Returns:
dict: Dictionary containing risk estimates including mean volatility, volatility confidence interval,

mean VaR, and VaR confidence interval.

property forecast_mean

Get the forecasted conditional mean of the model.

Returns:

pandas.DataFrame: Forecasted conditional mean series.

property forecast_residual_variance

Get the forecasted conditional variance of the residuals of the model.

Returns:

pandas.DataFrame: Forecasted conditional residual variance series.

property forecast_variance

Get the forecasted conditional variance of the model.

Returns:

pandas.DataFrame: Forecasted conditional variance series.

property standardised_residuals

Get the standardized residuals of the fitted model.

Returns:

pandas.Series: Standardized residuals series.

property summary

Get the summary of the fitted model.

Returns:

arch.univariate.base.ARCHModelResultSummary: Summary of the fitted model.