Skip to main content

Parametric Bootstrapping via the GARCH model

Project description

ParametricGarch

A Python library that uses parametric bootstrapping via the GARCH model to estimate volatility and Value-at-Risk (VaR) for financial assets.

Installation

You can install parametricGarch using pip:

pip install parametricGarch

Dependencies

The package dependencies are:

  • arch
  • numpy
  • pandas
  • scipy

Usage

To get started with parametricGarch, import the necessary modules and create an instance of the Garch class:

from parametricGarch import Garch

# Create an instance of the Garch class to fit and forecast the model
model = Garch(data, vol='Garch', p=1, q=1, dist='normal', update_freq=0, disp='off', horizon=1, start=None, reindex=False)

# View the summary of the fitted model
model.summary

# View the conditional volatility of the fitted model
model.conditional_volatility

# View the standardised residuals of the fitted model
model.standardised_residuals

# View the forecasted conditional mean of the fitted model
model.forecast_mean

# View the forecasted conditional variance of the fitted model
model.forecast_variance

# View the forecasted conditional variance of the residuals of the fitted model
model.forecast_residual_variance

# Perform parametric bootstrapping
model.bootstrap()

# View the summary of the bootstrapped model
model.bootstrap_summary

# View the forecasted mean and volatility list from the bootstrapped model
model.bootstrap_samples

# Estimate volatility and VaR
risk_estimates = model.estimate_risk()

Documentation

Please refer to the documentation for detailed information on the available parameters, methods, and properties of the Garch class.

Examples

Please refer to example.ipynb for a detailed example to help you get started quickly with parametricGarch. The examples cover various use cases and demonstrate the library's capabilities.

License

parametricGarch is licensed under the GNU General Public License v3.0 License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parametricGarch-0.0.6.tar.gz (17.2 kB view hashes)

Uploaded Source

Built Distribution

parametricGarch-0.0.6-py3-none-any.whl (17.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page