r/econometrics • • Aug 18 '19

Forecasting with Econometrics vs Machine Learning

https://towardsdatascience.com/machine-learning-vs-econometrics-in-the-real-world-4058095b1013

Pros and cons of econometrics and machine learning for forecasting purposes. Only concerned with out of sample forecasting accuracy in the experiment.

  • Pro: Econometrics still has better forecasting accuracy over short to medium horizons

  • Con: Econometrics takes a long time to run a bunch of models

  • Pro: Machine learning can significantly reduce build and run times for multiple series

  • Con: Machine learning can compete on forecast accuracy over longer horizons but still lacking on short to medium horizons

I built the functions from the article and they are available in the open source package listed there. I have plans to continue enhancing the functions.

Note: the article title from link is click-baity because that's what gets views (wish it weren't the case)

0 Upvotes

45 comments sorted by

11

u/[deleted] Aug 18 '19

One thing I don't find very valid here is the data you used is hardly the kind of time series that most economics models are built for. You might want to look at the more traditional macroeconomic time series such as inflation, consumption, production, interest rates. The big thing you will find here is that there is simply not a lot of data by machine learning standards (most macro data is monthly or quarterly, financial markets time series are an exception as you can get high frequency data). That said, there are more attempts to use fat/short (rather than thin/tall) datasets in macro these days. You won't be able to do truly out-of-sample validation tests (as all the data has been examined very intensively in the literature).

Also it seems to me that you neglect the entire point of models in econometrics. Economists have a primary concern of hypothesis testing and take their models "seriously" (in the structural modeling sense). They sometimes also look at prediction but that is often a secondary issue. On the other hand machine learning people don't care about hypothesis testing, theory, or parameter estimates. The primary focus of ML is on prediction.

3

u/plutostar Aug 18 '19

Actually an interesting study would be to use some of the high frequency nowcasting proxies for macroeconomic variables.

Use ML to forecast daily credit card transactions, then use that forecast to forecast quarterly private consumption.

2

u/[deleted] Aug 18 '19

Sure, we've seen it already for inflation using internet prices. I also loved the recent paper on looking at grocery store micro data, which apparently is much more closely tied to consumer inflation expectations (as it's the prices they see personally and repeatedly) than traditional data economists look at to infer inflation expectations.

2

u/plutostar Aug 18 '19

Care to share some references?

1

u/DougVegas Aug 18 '19

Econometric time series models are not restricted or built solely for the use of being applied to macroeconomic data. Many large enterprises (such as those in the ecommerce, retail, and hospitality verticals) use econometric time series model to create forecasts for a wide range of metrics (such as website traffic, store and SKU sales, and expected number of tourists).

The data set from the article uses weekly store sales data from Walmart, which exhibits the same type of seasonal and cyclical patterns in a traditional macroeconomic data set. Many large companys' revenue is also correlated with macroeconomic activity (such as interest rates, consumer confidence, etc). I'd argue that some of the Walmart store-level sales data would have a significant Pearson correlation to several popular macroeconomic KPIs. So if the AutoTS and AutoCARMA models are able to accurately predict store-level sales, it would be likely be able to accurately predict its highly correlated macroeconomic metrics.

1

u/[deleted] Aug 18 '19

Sure. That's a valid point. I was simply adding a particular perspective, which judging from the other comments from OP, s/he (well 99% its a guy) didn't take very well, of empirical work typically done by economists for research. I think maybe the tension is coming from the fact that I tend to think of econometrics as more defined by the goal of the analysis itself rather than categorizing particular methods or models as econometrics or ML. For example, linear regression models can fall into either category (econometrics or ML/data mining) depending on the goals. But maybe that's just me..

1

u/Savory_Statistics Aug 18 '19

I think OP's response was a valid reply. He ran a test and showed the results. He mentioned that he was looking to see which methods provided the most accurate forecasts and I don't think he was biased in how he ran that test.

3

u/[deleted] Aug 18 '19

Yeah, sure though I'm honestly not really sure what you mean by valid (everyone is entitled to their views imo). I just gave my reaction to OP's article/analysis from my perspective. I think I elaborated already as much as I care to in my previous comments.

0

u/DataScienceHype Aug 18 '19

Why don't you reply to my comment I made to you then?

5

u/eknanrebb Aug 19 '19

Why don't you luv me, mum?? Why?

-1

u/DataScienceHype Aug 19 '19 edited Aug 19 '19

I see you replied to the article in a cowardly fashion. How does it feel to be afraid to stand behind your own ideas?

Oh yeah, and I get paid for the engagement! Thanks

-5

u/DataScienceHype Aug 18 '19

"One thing I don't find very valid here is the data you used is hardly the kind of time series that most economics models are built for. "

  • Sales data that needs to be projected into the future for planning purposes isn't a valid use-case for time series forecasting models? I'm going to have to disagree with you on that. I will agree that it isn't the only kind of data to utilize econometrics models for, but I never claimed that to be the case, nor would a rational person with any background in Economics. That statement is pretty disingenuous.

"Also it seems to me that you neglect the entire point of models in econometrics. Economists have a primary concern of hypothesis testing and take their models "seriously" (in the structural modeling sense). "

  • The entire point? As in, there is no other point in using econometrics models? That is clearly false by the very existence of econometric time series models whose purpose is forecasting. If I'm wrong on that, then what models should be used to forecast data in a business setting? Should all Econometric models be dismissed without checking results if the goal is forecasting accuracy?

  • The goal of the article (which was clearly stated) was to see if ML models could predict out of sample as accurately as econometric models, which has been understood to not be the case for a long time (I even linked an article that showed just that). The problems I saw were that those who present those articles don't properly tune the econometrics or machine learning models and I wanted to give each a fair shot at demonstrated their individual efficacy.

8

u/eknanrebb Aug 18 '19

I think the previous commentor was just giving you great feedback from a certain perspective. I found it very valid. No need to be so sensitive and defensive (or else you'll have a hard time posting articles on the internet).

-4

u/DataScienceHype Aug 18 '19

The feedback wasn't great though. It didn't address the goal of the article which is what the post was meant for. He brought up issues that fall outside the scope of the article and the experiment. I did take time to address them nonetheless.

3

u/eknanrebb Aug 18 '19 edited Aug 18 '19

Dude, you're still doing it. Stop doing it. You can't expect people to always narrowly restrict their comments to the scope you have in mind. And remember that you did post in r/econometrics and not r/datamining so maybe its to be expected that you're getting an economics perspective here despite your stated goals. But my main point is if you write stuff for public consumption, just take the comments in stride and look for the insights (which again the comment did have imo - namely that horseraces between traditional econometrics models and ML models on the basis of predictive power may not be the entire discussion; I think that's what s/he was getting at).

-6

u/DataScienceHype Aug 18 '19

Dude, you're an idiot (is that still doing it??).

4

u/eknanrebb Aug 18 '19

Ok, Im done with you. Tried to genuinely help but clearly you are clueless and/or an a** who can't take constructive feedback. I'm guessing you are still an undergrad or something but do try to get some social awareness before you graduate (otherwise working life is gonna be rough for you).

-4

u/DataScienceHype Aug 18 '19

Dude, you're a concern troll

3

u/eknanrebb Aug 18 '19

Doug Vegas? Gimmie a break! LMFAO!

-2

u/DataScienceHype Aug 18 '19

Replied to wrong user jackass

→ More replies (0)

4

u/plutostar Aug 18 '19

Along with some of the other criticisms given, I think my main criticism is that you haven’t really compared ML to econometrics.

You’ve compared ML to a lighter form of ML.

A true econometric approach would be to build the correct model for each of the series (without using the data itself to choose the model), then estimate the model and forecast from it.

You are comparing two different methods of automatic forecasting, which is a worthy approach, but isn’t really true econometrics.

-1

u/DataScienceHype Aug 18 '19

I welcome you to join the competition. I mention that in the article as well and I provide all the data and code to reproduce the experiment. The ML models replicate an ARMA forecasting process in an automated way, similar to the econometric models.

Let me know if you're interested.

3

u/plutostar Aug 18 '19

Appreciate the offer, but I am already comfortable with the pros and cons of ML, semi-ML and true econometric methods.

I’m happy to help you correct and rewrite your blog post though.

1

u/DataScienceHype Aug 18 '19

Why don't you leave your comments on the blog post if you disagree with it? I know it would be embarrassing if your suggestions were terrible as they'd be associated with you personally but you sound so confident.

3

u/plutostar Aug 18 '19

You're taking unnatural offense at people trying to help. It is your article, and your face on it. If you want to leave the mistakes up there, that's up to you.

You should read through this though: https://robjhyndman.com/hyndsight/statistics-vs-econometrics/

1

u/DataScienceHype Aug 18 '19

Tell me that with the AutoTS() function where I'm violating his principles? https://otexts.com/fpp2/

4

u/plutostar Aug 18 '19

You’re not, but given that the author of the packages you are using claims he is not an econometrician, and that they are not econometric packages, is it really fair for you to use them as econometrics?

0

u/DataScienceHype Aug 19 '19

I'm sure you didn't make it to the comments so I'll just leave this here. It's always the econ student who doesn't listen...

https://imgur.com/a/nmR7quW

4

u/plutostar Aug 18 '19

One more thing you should probably mention - you are only looking at univariate “econometric” models, where the vast majority of econometrics deals with multivariate models.

1

u/DataScienceHype Aug 18 '19

If you read the article you would've seen that I clearly define the purpose of the experiment. You obviously didn't but nonetheless felt compelled to add irrelevant talking points. Like I said, comment on the post if you think what I did was wrong.

4

u/plutostar Aug 18 '19

Read it a few times. Nowhere do you mention that you are hamstringing “econometrics” to univariate models.

You do mention that Econometrics is not as good as ML when forecasting multiple series, but that seems an odd claim when you don’t use multivariate forecasts.

3

u/[deleted] Aug 18 '19

Where's the article?

1

u/DataScienceHype Aug 18 '19

Sorry, I pasted in the link to the sub tab called "Link". I'm new to reddit so my apologies. I just edited the post with the link

7

u/[deleted] Aug 18 '19

Wow OP, you have by far the worst attitude I have ever seen on this sub.

-2

u/Savory_Statistics Aug 18 '19

Thanks for the post! Not sure why others are giving you a hard time. I think the experiment you ran was really interesting. I've taken my share of time series modeling courses and I'd be interested in seeing how prophet compares to the models you tested.

0

u/DataScienceHype Aug 18 '19

Thanks for that! I originally had Facebook's prophet model in AutoTS. Originally I was planning to submit my package to CRAN AND USING prophet was making that a bit too challenging. However, now that I'm using catboost models CRAN won't accept the package so I can add prophet back in the mix. I'm probably going to update the experiment in a few months once I'm done making the next set of feature enhancements and I'll have prophet in the mix. Thanks for asking.

2

u/eknanrebb Aug 18 '19

OMF Gawd! I'm just waiting for "Doug" to chime in now! OP replying to himself is just 2 funny.

5

u/plutostar Aug 19 '19

Brand new account created just to make that post!

3

u/eknanrebb Aug 19 '19

Two brand new accounts!

3

u/plutostar Aug 19 '19

Looks like those new accounts also commented on his blog post.