-
Notifications
You must be signed in to change notification settings - Fork 19
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
Failure to fit complicated models: handle errors gracefully? #91
Comments
Thanks for the MWE! Unfortunately I haven't managed to fix this in general. In this particular example, you can do
but I'm not sure if this is more robust in general (feel free to test). It is definitely a bit slower for some models. One idea would indeed be to catch the error and then try the other line search algorithm. If your testing reveals that this helps, then we could put that into the package (although it still feels a bit hacky). Cheers |
Hello Simon, thank you for your input. I will try to familiarize myself with the Optim package, in order to test whether different values to the
If a robust general solution to the problem cannot be found, I think that catching the exception, falling back to another algorithm and outputting a warning is the better alternative [1]. I fully agree that it is hacky, but in my opinion it is much more preferable than throwing an exception. What are your thoughts on this? I will contact you again, after I have done some testing. Best regards, Charis ==================================================================== [1]: This is done by other packages as well. If you run this piece of code: using ARCHModels
for i in 1:length(BG96)-100
fit(TGARCH{1,1,1},BG96[i:i+100],meanspec=AR{1},dist=StdT)
end the LineSearches package outputs the following warning about ten times
|
Consider the following example.
This fails instantly with the following error:
The data was specifically chosen to demonstrate this error. The error however isn't related to just that specific data; it happens often when EGARCH (and sometimes TGARCH) models are combined with AR mean specifications and StdT/StdSkewT distribution of errors
At present, my code that depends on ARCHModels is handling this error in a very naive manner:
It would be very helpful if
- 1) this error was handled "gracefully" by ARCHModels, perhaps falling back to simpler models like in my code snippet,
or maybe even better if
- 2) the source of the error could be found and corrected.
In either case sadly I cannot be of much help. For case 1 I'm not familiar enough with the codebase in order to suggest remedies and for case 2 I do not have the required expertise/familiarity with optimizers in order to help
The text was updated successfully, but these errors were encountered: