The need for forecasts

Making Forecasts

Making Forecasts

Forecasting

Course info

Student intro

Forecasting Methods and Applications

Depiction of the Pythia (Oracle) at Delphi, ca. 330 BCE. Source: British Museum, courtesy Wikipedia

Depiction of the Pythia (Oracle) at Delphi, ca. 330 BCE. Source: British Museum, courtesy Wikipedia

Real World Forecasting Examples

To motivate and illustrate the methods and models that will be discussed, we will look at a variety of applications where forecasting methods have been applied. Different applications have unique features which motivate particular approaches, but at the same time illustrate principles that can be applied in other cases.

Exchange Rates

library(ggplot2)
library(fredr) #Access FRED, the Federal Reserve Economic Data
#To access data by API, using R rather than going to the website and downloading
#You need to request a key: you can do so at https://research.stlouisfed.org/docs/api/api_key.html
fredr_set_key("8782f247febb41f291821950cf9118b6") #Key I obtained for this class
#Let's get the (main) series for the Yen-Dollar Exchange rate
DEXJPUS<-fredr(series_id = "DEXJPUS",observation_end=as.Date("1982-01-04")) #Get 1970s data
#You can also download this series at https://fred.stlouisfed.org/series/DEXJPUS
pplt<-ggplot(data=DEXJPUS,mapping=aes(x=date,y=value)) #Plot the data!
pplt+geom_line()+
  labs(x="Date",y="Japanese Yen to One U.S. Dollar",
       title="Japan / U.S. Foreign Exchange Rate",
       subtitle="Daily From 01-04-1973 to 01-04-1983")

Product Sales

Weekly observed and forecast sales for 4 of over 500,000 products on Amazon. Source: Flunkert et. al. (2017)

Weekly observed and forecast sales for 4 of over 500,000 products on Amazon. Source: Flunkert et. al. (2017)

Macroeconomic Forecasting for Policy

Model-based forecasts of GDP growth from FRBNY from October 2018
Source: Cai et al (2018), Liberty Street Economics

Macroeconomic Forecasting for Finance

Web Activity

Events created per day on Facebook, with commentary on data features. Source: Taylor & Letham (2018)

Events created per day on Facebook, with commentary on data features. Source: Taylor & Letham (2018)

Ad Auctions

Tool for display of ad click model performance used internally at Google. Source: McMahan et al (2013)

Tool for display of ad click model performance used internally at Google. Source: McMahan et al (2013)

Monthly Unemployment Releases

#Let's get the (main) series UNRATE for the unemployment rate.
UNRATE<-fredr(series_id = "UNRATE")
#The jobs series has FRED ID "PAYEMS", for "Payroll Employment Survey", as the numbers are calculated by a survey of employers
#The Employment Situation Report reports growth, so report units as change from last month
PAYEMS<-fredr(series_id = "PAYEMS",units="chg")
#You can also download this series at https://fred.stlouisfed.org/series/PAYEMS
#You can also download this series at https://fred.stlouisfed.org/series/UNRATE
plt<-ggplot(data=UNRATE,mapping=aes(x=date,y=value)) #Plot the data!
plt+geom_line()+
  labs(x="Date",y="Unemployment Rate",
       title="U3 Unemployment Rate",
       subtitle="Monthly From 1948")

pplt<-ggplot(data=PAYEMS[2:959,],mapping=aes(x=date,y=value)) #Plot the data!
pplt+geom_line()+
  labs(x="Date",y="Thousands of Persons",
       title="Nonfarm Payrolls Growth",
       subtitle="Monthly From 1939")

For next class