Multivariate GARCH modelling in Python
Project description
mvgarch
Multivariate GARCH modelling in Python
Description
This project performs a basic multivariate GARCH modelling exercise in Python. Such approaches are available in other environments such as R, but there is yet to exist a tractable framework for performing the same tasks in Python. This package should help alleviate such limitations and allow Python users to deploy multivariate GARCH models easily.
Installation
$ pip install mvgarch
Usage
# get return data
# returns = pd.DataFrame() of periodic returns of shape (n_periods, n_assets)
# import modules
from mvgarch.mgarch import DCCGARCH
from mvgarch.ugarch import UGARCH
# FIT UNIVARIATE GARCH MODEL
# get one of the return series
asset = returns.iloc[:, 0]
# fit a gjr-garch(1, 1) model to the first return series
garch = UGARCH(order=(1, 1))
garch.spec(returns=asset)
garch.fit()
# FIT MULTIVARIATE DCC GARCH MODEL
# make a list of garch(1, 1) objects
garch_specs = [UGARCH(order=(1, 1)) for _ in range(n_tickers)]
# fit DCCGARCH to the return data
dcc = DCCGARCH()
dcc.spec(ugarch_objs=garch_specs, returns=returns)
dcc.fit()
# forecast 4 weeks ahead
dcc.forecast(n_ahead=4)
Contributing
Pull requests are welcome.
License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mvgarch-1.2.4.tar.gz.
File metadata
- Download URL: mvgarch-1.2.4.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f62a1a42c9ba7815f6916e7bbfe2c63c16184acd3a0ef30048f7a02d92dcd5f8
|
|
| MD5 |
e05e6d70c6fa479badba599daa6aa678
|
|
| BLAKE2b-256 |
aeacebbeb5ba4d64c8cd9e39dd9da2d1610f570387443351c4c388a6aa6545b7
|
Provenance
The following attestation bundles were made for mvgarch-1.2.4.tar.gz:
Publisher:
python-package.yml on jack-tobin/mvgarch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mvgarch-1.2.4.tar.gz -
Subject digest:
f62a1a42c9ba7815f6916e7bbfe2c63c16184acd3a0ef30048f7a02d92dcd5f8 - Sigstore transparency entry: 146255187
- Sigstore integration time:
-
Permalink:
jack-tobin/mvgarch@f77547ff30c4b9cda51d15c2e10ec766aba6ec09 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jack-tobin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@f77547ff30c4b9cda51d15c2e10ec766aba6ec09 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mvgarch-1.2.4-py3-none-any.whl.
File metadata
- Download URL: mvgarch-1.2.4-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81844a283195a95cd3bcb0207b56ed293fe2f257c57db63d365610bb6ffbfde5
|
|
| MD5 |
b5593939a9a51ef7e6f5861baddb58d0
|
|
| BLAKE2b-256 |
685765ec496ee871bb8a9821557c105d3f8c9af5d9b163767584abd0ac0ffb9a
|
Provenance
The following attestation bundles were made for mvgarch-1.2.4-py3-none-any.whl:
Publisher:
python-package.yml on jack-tobin/mvgarch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mvgarch-1.2.4-py3-none-any.whl -
Subject digest:
81844a283195a95cd3bcb0207b56ed293fe2f257c57db63d365610bb6ffbfde5 - Sigstore transparency entry: 146255188
- Sigstore integration time:
-
Permalink:
jack-tobin/mvgarch@f77547ff30c4b9cda51d15c2e10ec766aba6ec09 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jack-tobin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@f77547ff30c4b9cda51d15c2e10ec766aba6ec09 -
Trigger Event:
push
-
Statement type: