A quick project: Put together the smallest framework needed for nowcasting. Not going for high accuracy here.
A framework for nowcasting. Gives me confidence nowcasting is do-able for macro-economic series.
With more attention to data curation and selecting a series to nowcast, we can up sample a low frequency series to a higher frequency.
Blue dot is actual, green series is nowcast.
Okay, time for some explanations as to what is going on here…
Get annual series that would be nice to have monthly
Get monthly series related to the annual series
Do required data cleaning, and feature engineering for time series
Train xgboost model on matching annual values for annual target x monthly training data
Feed hold out monthly training data into model to get estimated annual series in monthly format
I used UNCOMTRADE product level import/export series
Using dbnomics I download the Global Economic Monitor GEM from the World Bank
The data release is long but it has global macro variables monthly in a single dataset.
There are not many series, just:
I also used the IMF DOTS trade balance data
I convert these series into annual percent change
Then use an augmented dickey fuller test to filter out non-stationary series
The remaining series will be used to nowcast
I also got data from the IMF but didn’t have time to properly merge it into the training data.
I’ve seen a few example of this done before, and in a day or so put this together out of curiosity
Here are the examples I found:
The OECD one is kinda hokey, the fed one looks the best of what I’ve seen
the xgboost models trained look to be fairly high bias low variance
the annual trade series are very volatile, which kinda sets this up for inaccurate results
Now that I have some code that does this analysis, what I will do to recreate to get accurate results: