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

Breaks if Skewness >= 1 as in BoE's latest forecast #1

Closed
brimoran opened this issue Aug 12, 2022 · 5 comments
Closed

Breaks if Skewness >= 1 as in BoE's latest forecast #1

brimoran opened this issue Aug 12, 2022 · 5 comments

Comments

@brimoran
Copy link

brimoran commented Aug 12, 2022

I love what you've done here.

I wanted to see if I could reproduce the latest BoE fanchart (August 2022) but I am encountering the attached error message.

I have played around a bit with the data to try to see what is causing the issue and I think it occurs when Skewness >= 1 as it is in the latest BoE projections for two periods
Screenshot 2022-08-12 at 17 25 16

@quantgirluk
Copy link
Owner

quantgirluk commented Aug 13, 2022

Thanks for finding this issue. Investigation in progress.

@brimoran
Copy link
Author

Great :)

@quantgirluk
Copy link
Owner

After investigating this issue, I have found that the package behaviour is consistent with the assumptions of the distribution forecasts as twopiece normals. That is, the skewness parameter should be in (-1, 1). So, the only change that I plan to make to the package is to raise an appropriate warning when parameters out of range are provided. I wrote a brief explanation about this on my blog. Thanks again for highlighting this to me.

@brimoran
Copy link
Author

Interesting! Great blog post. Thanks for looking into this and for publishing your insight into what the out of range skewness implies.

@quantgirluk quantgirluk reopened this Aug 23, 2022
@quantgirluk
Copy link
Owner

After some communication with BoE, they confirmed that what is published in their recent spreadsheet as Skewness is not the actual $\gamma$ parameter. Instead, they publish Skewness = difference between the mean and the median of the distribution. This quantity indeed can be outside the interval (-1, 1). So, what I did was to change my package twopiece (release 1.3.1) to accept this quantity and then calculate the parameter $\gamma$. This will in turn solve the issue with the fancharts. Besides, I updated fanchart (release 1.0.0) to require twopiece>=1.3.1. So, you can just update fanchart and the correct twopiece will be installed.
Once again, thanks for highlighting this issue! It was very helpful.

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

No branches or pull requests

2 participants