-
Notifications
You must be signed in to change notification settings - Fork 28
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
Upgrade to the GARCH implementation #56
base: master
Are you sure you want to change the base?
Conversation
- Bring out the old GARCH test file. - Enable `garch.jl` for REPL testing. - Wrap REPL testing in `all.jl` with a test capsule module.
- Update GARCH test to remove depreciated constructs, and use `FactCheck` for testing. - Create a random process file to run GARCH on. - Include dependent packages locally. - Remove method `garchPkgTest`. Not necessary to do test in source code.
With the change, the output shows small values in the range of 10e-6 correctly. The formatting is more consistent, since numbers that are too long will no longer burst the tab limit. Also the χ² symbol shows correctly on Juno.
I passed the test on my local system. However the test failed on Travis CI because there is no |
The variables names are chosen as per Bollerslev's GARCH paper so it is easier to read the code and paper together.
Do only cosmetic changes. There is rename of variables, removal of semicolon after statements, adding of the return statement, mainly things that make the code more Julia-like.
I think it is better to house each model separately in their own submodule. If the aim of the Currently, we need to go to |
Its ok, I passed the Travis CI test by putting |
By the way, I added a test capsule module wrap in |
After working with the code, I realized that this is just a GARCH(1, 1) implementation. The volatility process is not derived correctly. Also, the package and functions used may be outdated, and there may be better ways to represent them. Lastly, the notation deviates from the original paper by Bollerslev. In the spirit of providing Julia examples of these models, we may want to keep the notation closer to the original. These are things that I will try to do going ahead. Any recommendation or help to this PR is greatly appreciated =) |
Thanks for the input @milktrader. Do keep the suggestion coming. I will continue to give the original code a face lift until I fully understood the code. Then I will upgrade its functionality. |
The process `y` that GARCH takes in will be processed to form its error process `ɛ`. It should not be processed outside of GARCH. Update the test to reflect this.
In GARCH, there is no assumption that mean should be zero-ed. Popular implementations, like MATLAB's `garch`, or R's `fGarch` and `rugarch`, all does not perform zeroing. Add in comment to the test to remind user to zero their own mean first before fitting GARCH.
…time we need to use it. There is some speedup, and less total memory creation is done as we do not need to recreate the `ɛ²` array every time we need it.
Please refer to issue #53.