Closed paksas closed 7 months ago
Thanks for the great report! The fix will be on the next release.
thank you so much for a speedy fix :)
On Tue, 5 Mar 2024, 21:37 José Morales, @.***> wrote:
Thanks for the great report! The fix will be on the next release.
— Reply to this email directly, view it on GitHub https://github.com/Nixtla/utilsforecast/issues/67#issuecomment-1979678988, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABR6BTEHAUPV6AFU64TGSKDYWY3LHAVCNFSM6AAAAABEH323KCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZGY3TQOJYHA . You are receiving this because you authored the thread.Message ID: @.***>
Problem:
Calling
StatsForecast.plot(returns, forecasts, unique_ids = ['AAPL'], models = ['GARCH(2,1)'], level=[80])
yields a KeyError:'GARCH(2,1)-lo-80'
Steps to reproduce:
Follow the steps outlined in tutorial https://nixtlaverse.nixtla.io/statsforecast/docs/tutorials/garch_tutorial.html until and including section Forecast volatility. It contains the call shown above.
Analysis:
The exception originates in the auto-generated file
utilsforecast/plotting.py
.forecasts_df
passed as an argument toplot_series
and filtered using_filter_series
function has the level columns removed if the model name contains any regex-reserved characters (such as parentheses).The code that incorrectly removes those columns is located in line 30 of
plotting.py
: