Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing component GARCH process #188

Open
wants to merge 102 commits into
base: main
Choose a base branch
from

Conversation

RichardMM
Copy link

@RichardMM RichardMM commented Aug 6, 2017

This implements the Engle & Lee 1999 Components GARCH model which decomposes volatility into long term and short term components.

A lot of change has been in the volatility.py and recursion.py files but parts of base.py and mean.py have been modified but only slightly to handle a volatility process that generates two volatility series.

Tests have been added to test forecasting, representation, recursion, and estimation of CGARCH.

Forecasting is enabled for CGARCHbut only analytical method. Other methods will be included later.

One example has been put in the Examples folder and the docs have been changed where needed to show the new functionality.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 98.238% when pulling 580ae56 on RichardMM:master into ef52881 on bashtage:master.

1 similar comment
@coveralls
Copy link

coveralls commented Aug 6, 2017

Coverage Status

Coverage decreased (-0.5%) to 98.238% when pulling 580ae56 on RichardMM:master into ef52881 on bashtage:master.

@codecov
Copy link

codecov bot commented Aug 6, 2017

Codecov Report

Merging #188 into master will decrease coverage by 2.27%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
- Coverage   99.36%   97.08%   -2.28%     
==========================================
  Files          72       35      -37     
  Lines       13285     8728    -4557     
  Branches     1131      780     -351     
==========================================
- Hits        13201     8474    -4727     
- Misses         28      159     +131     
- Partials       56       95      +39     
Impacted Files Coverage Δ
arch/univariate/base.py 93.13% <47.22%> (-4.50%) ⬇️
arch/univariate/recursions_python.py 84.87% <72.72%> (-13.73%) ⬇️
arch/univariate/volatility.py 95.77% <75.92%> (-3.39%) ⬇️
arch/univariate/mean.py 92.97% <80.00%> (-5.34%) ⬇️
arch/univariate/recursions.pyx 94.64% <85.71%> (-5.36%) ⬇️
arch/tests/univariate/test_volatility.py 99.76% <96.87%> (-0.24%) ⬇️
arch/utility/array.py 81.81% <0.00%> (-13.81%) ⬇️
arch/unitroot/unitroot.py 93.39% <0.00%> (-5.51%) ⬇️
... and 71 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3dcaed2...f0f65c5. Read the comment docs.

@bashtage
Copy link
Owner

Thanks for making these changes. I'm not sure this is the simplest method to implement Component GARCH since the standard Component GARCH is just a restricted GARCH(2,2). This said, I hanve't carefully reviewed these changes and so these might be more general.

@RichardMM
Copy link
Author

I didn't want to modify the GARCH class to allow for a restricted GARCH(2,2) because it's a really loaded class, adding it there would make it even more complicated, so I opted for a separate class altogether.
Thanks for the response

@bashtage
Copy link
Owner

I think it should be possible to subclass GARCH setting p=q=2, and then overwriding some of the methods to specialize for the different parameter interpretations (e.g. that starting values, likelihood, etc). I think many of the methods, aside from handelign the mapping between CGARCH parameters and GARCH(2,2) parameters, will be unchanged. These could be written in a manner like

def some_func(self, params):
    tparams = self._transform_params(params)
    return super(CGARCH,self).some_func(tparams)

@RichardMM
Copy link
Author

With subclassing , I think it would get problematic with methods that deal with the long term component e.g compute_variance and _analytic_forecast because how would one change the super(CGARCH,self).some_func(tparams) to return the long term component even if we transform parameters.

@coveralls
Copy link

coveralls commented Sep 21, 2017

Coverage Status

Coverage decreased (-0.5%) to 98.196% when pulling 1d2d55a on RichardMM:master into 3d3b390 on bashtage:master.

@RichardMM
Copy link
Author

Hello, are you still considering this pull request?

@coveralls
Copy link

coveralls commented Nov 19, 2017

Coverage Status

Coverage decreased (-0.5%) to 98.179% when pulling f0f65c5 on RichardMM:master into 2db76fa on bashtage:master.

@coveralls
Copy link

coveralls commented Nov 19, 2017

Coverage Status

Coverage decreased (-0.5%) to 98.179% when pulling f0f65c5 on RichardMM:master into 2db76fa on bashtage:master.

@bashtage
Copy link
Owner

I haven't forgotten about this -- just been quite busy.

@bashtage bashtage force-pushed the master branch 2 times, most recently from e2ef1e4 to 71af26b Compare August 20, 2018 13:41
@RichardMM
Copy link
Author

Hello;
Is there anymore needed from my end

@SvenEck
Copy link

SvenEck commented Dec 31, 2018

Hi guys,

Is this topic still being pursued?

@bashtage bashtage force-pushed the master branch 2 times, most recently from b8b0a6f to 34183b4 Compare March 27, 2019 11:28
Base automatically changed from master to main February 22, 2021 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants