This is the section you need to check regularly during the semester. It will be updated continuously throughout the semester.

1. Introduction to the Course

2. Motivation Forecasting

3. Introduction to R

4. Descriptive Analysis and Time Series Plotting

5. Review: Simple Regression

6. Review: Multiple Regression

**Homework Assignments:**

5. Homework 5 due Tue, Oct 3, 2017

- Data for Homework 5 - you have to download the data into a .csv-file, save it locally and import it into
`R`

.

4. Homework 4 due ~~Tue, Sep 26, 2017~~, Sat, Sep 30, 2017

- Data for Homework 4 - this is the monthly “Air Passengers” data set that starts in 1949 Jan
`?AirPassengers`

. - Solutions for Homework 4

3. Homework 3 due Tue, Sep 19, 2017

- Data for Homework 3 - that includes the sales data until Dec 2017, the realization from Jan 2019, and the revision from Feb 2019. To complete this assignment you need to install the
`forecast`

package in`R`

. For more information on the forecast packages`?forecast`

, in particular, you might want to explore`?meanf`

,`?naive`

, and`?snaive`

as well as`?accuracy`

. - Solutions for Homework 3

2. Homework 2 due Tue, Sep 12, 2017

- Data for Homework 2 - please ensure you know how to import .csv-files into
`R`

and how to save them locally. - Solutions for Homework 2

1. Homework 1 due Tue, Sep 5, 2017

- Data for Homework 1
- CSV for Homework 1, if you like to implement some of that in
`R`

- Solutions for Homework 1

**Instructional R Videos:**

Please go through these videos on your own time^{1}.

- 01. Installing R
- 02. R Interface
- 03. Basic Math
- 04. Variables and Datatypes
- 05. Introducing Vectors
- 06. Set up your work directory
- 07. Create vectors sequences - Part 1
- 08. Create vectors sequences - Part 2
- 09. Random Numbers
- 10. Find and Remove Missing Values
- 12. Get specific items from vector using which()
- 13. Convert one variable type to another
- 13. Introduction to Lists
- 14. Set Operations - Part 1
- 15. Set Operations - Part 2
- 16. Special Ways to Check Conditions
- 17. For Loops
- 18. Dataframes - Part 1
- 19. Dataframes - Part 2
- 20. Get Specific Items from a Dataframe Using Which()
- 21. Binning Data
- 22. Counts Tables - Part 1
- 23. Counts Tables - Part 2
- 24. Read and Write Data - Part 1
- 25. Read and Write Text Data - Part 2
- 26. Read and Write Data (customized) - Part 3
- 27. Built-in Datasets
- 28. Useful Dataframe Operations
- 29. Exercise 1 (With Solutions)
- 30. Exercise 2 (With Solutions)
- 31. Exercise 3 (With Solutions)
- 32. Dates
- 33. Exercise 4
- 34. Dates Operations
- 35. Write Functions
- 36. Tips to Write Awesome Functions
- 37. Debugging Code

**In-Class Forecasting Exercises:**

2. Initial Claims released Thursday, September 14, 2017.

1. Employment Report for August 2017, released Friday, September 1, 2017

- Headline Unemployment Rate - FRED Code UNRATE
- Change in Total Nonfarm Payrolls - FRED Code PAYEMS - notice the variable of interest here is \(\mathbb{E} \Delta y_{t} = \mathbb{E} \left( y_{t} - y_{t-1} \right)\)

Here are your forecasts and a few graphs depicting them. Think about the logic of those graphs. What are they trying to depict? What can we learn from them? **Try and replicate the graphs.** On Friday Sept 1, 2017, check the news or the U.S. Bureau of Labor Statistics directly and see the realized numbers for unemployment and nonfarm payrolls.

```
f.un <- c(3, 5.7, 5.2, 4.8, 4.4, 4.1, 4.3, 4.5, 4.4, 4.3, 4.2, 4.2, 4, 5.3, 4.2, 4.4, 4.2, 4.2, 4.4, 4.8, 4.7, 4.3, 4.3)
f.nfp <- c(160000,208000,190000,215000,202000,200000,224000,147000,195000,148000,146830,150000,147000,200000,220000,180000,237500,176000,250000,146850,190000,182000,220000,220000)
```

This course is dedicated to teaching students tools in econometrics that are especially useful in forecasting business time series such as sales, expenditures, and macroeconomic variables such as GDP, interest rates, inflation, stock market, etc.

The student will learn the essentials of and demonstrate proficiency in

- Graphical examination of time series
- Decomposition of time series into trend, seasonal, cyclical, and irregular components
- Stable seasonal pattern forecasting model
- Deterministic Trend/Seasonal forecasting Model
- Unobserved Component Forecasting Model
- Box-Jenkins Forecasting Model
- Exponential Smoothing Forecasting Model
- Transfer Function Model
- Vector Autoregressive Time Series Models
- Evaluation of the forecasting accuracies of competing forecasting methods
- Evaluation of the usefulness of a proposed leading economic / business indicator
- Forming efficient “combination” forecasts
- Running R Computer programs

There will be two mid-term exams, a double-point homework assignment due in lieu of a final exam, homework assignments, and class attendance. The weights of each of these items are as follows: mid-term exams (30% each), homework assignments (30%), and class attendance (10%). I will be assigning a maximum of 10 points for class attendance - 10 points for no unexcused absences, 8 points for 1 or 2 absences, and 6 points for more than 2 absences. After 4 or more absences in class attendance, I reserve the right to administratively drop the student from the class. My policy is to drop the lowest homework score you have before forming a homework average to be used in calculating your overall average in the class. The empirical project due in lieu of a final exam will be a double-point (20 points) assignment that will be included in the homework part of your grading scale. (The usual homework problems are valued at 10 points each.) Finally, you must obtain a doctor’s letter if you are to be excused from any exams or homework assignments due to illness.

**Disability Accommodations:** Students needing academic accommodations for a disability must first register with Disability Accommodations & Success Strategies (DASS). Students can call 214-768-1470 or visit http://www.smu.edu/Provost/ALEC/DASS to begin the process. Once registered, students should then schedule an appointment with the professor as early in the semester as possible, present a DASS Accommodation Letter, and make appropriate arrangements. Please note that accommodations are not retroactive and require advance notice to implement.

**Religious Observance:** Religiously observant students wishing to be absent on holidays that require missing class should notify their professors in writing at the beginning of the semester, and should discuss with them, in advance, acceptable ways of making up any work missed because of the absence. (See University Policy No. 1.9.)

**Excused Absences for University Extracurricular Activities:** Students participating in an officially sanctioned, scheduled University extracurricular activity should be given the opportunity to make up class assignments or other graded assignments missed as a result of their participation. It is the responsibility of the student to make arrangements with the instructor prior to any missed scheduled examination or other missed assignment for making up the work. (University Undergraduate Catalogue)

In accordance with Texas Senate Bill 11, also known as the **“campus carry” law**, following consultation with entire University community SMU determined to remain a weapons-free campus. Specifically, SMU prohibits possession of weapons (either openly or in a concealed manner) on campus. For more information, please see: http://www.smu.edu/BusinessFinance/Police/Weapons_Policy.

I am going to be relying more on classroom presentations to teach this course than on any one textbook. I have not found any textbook that closely enough matches the topics that I think are important for this course. However, there is a nice open source (free) book that can serve as a useful supplementary textbook for this course. It is *Forecasting Principles and Practice* (FPP) by Rob. J. Hyndman and George Athanasopoulos. You can find it at the website https://www.otexts.org/fpp. In particular, if you are interested in learning some R programming language you should run some of the R programs that are detailed in the FPP book.

**Some other useful textbook treatments:**

- Diebold (2007)
*Elements of Forecasting (Fourth Edition)* - Cryer and Chan (2008)
*Time Series Analysis With Applications in R* - Cowpertwait and Metcalfe (2009)
*Introductory Time Series with R* - Shumway and Stoffer (2011)
*Time Series Analysis and Its Applications*

- First Day of Class:
~~Tuesday, August 23~~. Monday, August 28 - Labor Day Holiday: Monday, September 4
- Fall Break: Monday - Tuesday, October 10-11
- Last Day to Drop a Class: Friday, November 3
- No Classes on Wednesday, November 22
- Thanksgiving Break: Thursday - Friday, November 23-24
- Last Day of Class: Monday, November 27
- When double-point homework assignment is due (in lieu of final exam): Monday, December 4 by 5:00 pm. Assignment can be turned in to my mailbox in the 301 Office Suite in Umphrey Lee Building.

**My grading scale** in this course is as follows:

- A: 92-100;
- A-: 90-91;
- B+: 88-89;
- B: 82-87;
- B-: 80-81;
- C+: 78-79;
- C: 72-77;
- C-: 70-71;
- D+: 68-69;
- D: 62-67;
- D-: 60-61;
- F: 0-59.

With respect to homework exercises, students can confer with each other with respect to programming advice and discussion of basic ideas but in the final analysis each student is expected to write up his/her own homework answers and not make copies of others’ homework. Copying someone else’s homework to hand in as one’s own work is a violation of the SMU Honor Code and will be dealt with according to the rules of the SMU Honor Code. It is important to know that the homework assignments are very important in that the basic ideas covered by them invariably show up on the mid-term and final exams. If you know you are going to be missing a class on the day a homework exercise is due, hand in your homework **in advance** to receive full credit for your work.

Any homework that is handed in late will be given a one letter grade reduction for each day of tardiness. It is my policy to drop your lowest exercise score before calculating your exercise average.

Students will be excused from taking the mid-term exam or the final exam only with a note from a physician, or in the case of a death in the family, with a note from a parent or guardian. Even with an excused absence, either of these exams must eventually be taken before a course grade will be assigned to the student.

If you must miss a class due to legitimate circumstances beyond your control, be sure and contact me **beforehand** so that I will know of your circumstances. If excused, I will correspondingly excuse you from any QQ that is given that day. I want to emphasize that diligent attendance in this course is essential because a lot of the course material presented in class will be from my personal class notes and can’t be found in any textbook per se. **Note:** After 4 unexcused class absences, I reserve the right to administratively drop students from the class.

- Introduction to the Course
- Focus of this Course: Time Series Forecasting
- Field of Forecasting is meeting the Market Test
- Definitions of Time Series, Point Forecasts, and Prediction Interval Forecasts
- Evaluation of Competing Forecasting Accuracy
- Forecasting Accuracy Measures
- Naïve Forecasting Methods as Benchmarks

- Example: The Plano City Manager Planning Problem

**Reference:**Class Notes, R programs, and Chapters 1 and 2, FPP.

- A Brief Software Introduction
- APPS.SMU and Accessing Computer Programs on SMU’s Virtual Server - Downloading Citrix Receiver
- Introduction to R

**References:**Class Notes

- Salient Characteristics of Time Series Data
- Trend, Seasonal, Cycle, Irregular Components
- Y = T + S + C + I (Additive Decomposition)
- log(Y) = T + S + C + I (Multiplicative Decomposition)
- A Stylized Decomposition of a Time Series
- Importance of knowing which components are in your time series

**References:**Class notes, R programs, and Chapter 6, FPP

- The Detection of Seasonality, Trend,and Cycle
- Trend Tests
- Seasonality Tests
- Cycle
- Example: Plano Sales Tax Revenue Data

**References:**Class notes and R programs

- A Beginning Time Series Model: The Stable Seasonal Pattern Model
- Determination of Seasonal Proportions
- Test of Equal Proportions
- Estimation of Trend
- Example: Plano Sales Tax Revenue Data

**References:**Class Notes

- A First Generation Forecasting Model - The Deterministic Trend/Deterministic Seasonal (DTD) Model
- The Simple Trend Model - A Deterministic Trend
- Trend Model with Seasonal Dummies
- DTDS plus Autocorrelated Errors
- Example: Plano Sales Tax Revenue Data
- Tests for Trend and Seasonality - F-tests

**References:**Class Notes, R programs, and Chapter 5, FPP

- A Sophisticated Time Series Decomposition Model: The Unobserved Components Model
- Three Unobservable Components
- Trend

- Seasonal

- Cycle

- Trend
- Test of the Significance of the Components
- Example: Airline Passenger Data
- Forecasting the Airline Passenger Data

- Three Unobservable Components

**References:**Class Notes and R programs

- Some Important Concepts Leading up to Box Jenkins Modeling
- Mean, Variance, and Autocorrelation in Time Series
- Definition of Covariance Stationarity
- Example of a Stationary Time Series: the AR(1) model
- AR(1) Time Series Model

- Mean, Variance, Autocovariance, and Autocorrelation

- The Special Case of \(\phi\) = 1. The Random Walk model

- The Random Walk Model in not Stationary

- Differing Prediction Profiles for the two cases: Do Stock Prices follow a Random Walk?

- AR(1) Time Series Model

**References:**Class Notes and Chapter 8, FPP

- Box Jenkins Models for Stationary, Non-Seasonal Time Series
- Some Simple Box-Jenkins Models and Their Properties
- ARMA(0,0)
- MA(1)
- AR(1)
- ARMA(1,1)
- General Notation
- Concepts of Stationarity and Invertibility

- Identification Tools
- Autocorrelation Function (ACF)

- Partial Autocorrelation Function (PACF)

- Autocorrelation Function (ACF)
- Pattern Table

- Sample Counterparts

- Information Criteria

- P/Q Box

- Overfitting Exercises

- Example: Lead Production Data

- Some Simple Box-Jenkins Models and Their Properties

**References:**Class Notes, R programs, and Chapter 8, FPP

- Box-Jenkins Models - Forecasting for Stationary, Non-Seasonal Time Series
- Minimum MSE Forecasting
- Various Forecast Profiles
- Example: The Forecast Profile and Confidence Intervals for the Lead Production Data

**References:**Class Notes, R programs, and Chapter 8, FPP

- Box-Jenkins Models for Non-Seasonal, Stochastically-Trending Time Series
- Taking the First Difference to Control for Stochastic Trends
- Taking, On Occasion, Second Differences of the Data
- Augmented Dickey-Fuller Tests for Unit Roots: To Difference or Not To Difference?
- Example: The Dow Jones Index
- Forecasting Levels Based on Forecasts of Differences
- The Log Transformation and how to use it

**References:**Class Notes, R programs, and Chapter 8, FPP

- Box-Jenkins Models for Seasonal, Stochastically-Trending Time Series
- Year-over-Year Differencing
- Year-over-Year Differencing Combined with First Differencing
- The Multiplicative Class of Box-Jenkins Models
- The ACFs and PACFs of Multiplicative Seasonal Models
- Examples: Airline Passenger Data and Electricity Production Data
- Testing for Seasonal Differencing

**References:**Class Notes, R Programs, and Chapter 8, FPP

- Exponential Smoothing
- Simple Exponential Smoothing (No Trend, No Seasonality)
- Double (Brown) Exponential Smoothing (Trend, No Seasonality)
- Additive Seasonal Exponential Smoothing (No Trend, Seasonality)
- Winters Additive Method (Trend, Seasonality)
- Plano Sales Tax Revenue Data - An experiment showing the importance of Determining the presence or absence of trend in your time series data

**References:**Class Notes, R programs, and Chapter 7, FPP

- Searching for an Extra Variable to Help Us Forecas: VARs
- Be careful: The Spurious Regression Problem
- The Transfer Function Model
- The Equal-Lag Length Vector Autoregressive Model
- System-Wide Goodness of Fit Measures to Help Choose the Lag-Length
- Using Out-of-Sample Forecasting Experiments to Detect Useful “Extra” Variables for use in Forecasting a Variable of Interest
- Diebold-Mariano Test for Significant Differences in Forecasting Accuracies
- Example: The “Series M” Data Set

**References:**Class Notes, R programs, and Chapter 9, FPP

- Combining Forecasts
- Combination Forecasting
- Some Basic Theorems on Diversification of Forecasts
- Nelson Combination Method
- Granger-Ramanathan Combination Method
- Combinations with Time-Varying Weights

- Application to Economic Time Series

- Combination Forecasting

**References:**Class Notes and R programs

- Aug 28, 2017: Introduction to the Course
- Aug 30, 2017: Some Practice with R programming
- Sep 6, 2017: Salient Characteristics of Time Series Data
- Sep 11, 2017: Detection of Seasonality, Trend, and Cycle in Time Series Data
- Sep 13, 2017: The Stable Seasonal Pattern Model
- Sep 18, 2017: Deterministic Trend/Deterministic Season Model
- Sep 20, 2017: Deterministic Trend/Deterministic Season Model continued.
- Sep 25, 2017: Unobserved Components Model
- Sep 27, 2017: Unobserved Components Model continued.
- Oct 2, 2017:
*Review for Mid-term I exam* - Oct 4, 2017:
**Mid-term I exam** - Oct 9, 2017: Fall Break
- Oct 11, 2017: Important Concepts Leading up to Box-Jenkins Modeling
- Oct 16, 2017: Important Concepts Leading up to Box-Jenkins Modeling continued.
- Oct 18, 2017: Box-Jenkins Modeling
- Oct 23, 2017: Box-Jenkins Modeling continued.
- Oct 25, 2017: Box-Jenkins Modeling continued.
- Oct 30, 2017: Box-Jenkins Modeling continued.
- Nov 1, 2017: Box-Jenkins Modeling continued.
- Nov 6, 2017: Exponential Smoothing
- Nov 8, 2017: Searching for an Extra Variable to Help us Forecast
- Nov 13, 2017: Searching for an Extra Variable to Help us Forecast continued.
- Nov 15, 2017: Searching for an Extra Variable to Help us Forecast continued.
- Nov 20, 2017: Combination Forecasting
- Nov 27, 2017:
*Review for Mid-term II exam* - Nov 29, 2017:
**Mid-term II exam** - Double-Point Homework in lieu of final exam due at 5, 2017:00 pm on Monday, December 4 in my mailbox.

Cowpertwait, Paul S.P., and Andrew V. Metcalfe. 2009. *Introductory Time Series with R*. Springer.

Cryer, Jonathan D., and Kung-Sik Chan. 2008. *Time Series Analysis with Applications in R*. Springer.

Diebold, Francis X. 2007. *Elements of Forecasting (Fourth Edition)*. Thomson Higher Education.

Shumway, Robert H., and David S. Stoffer. 2011. *Time Series Analysis and Its Applications*. Springer.

These tutorials are from DataScience+. I do not know where lecture 11 went.↩

Copyright © Christoffer Koch. All rights reserved.

**Disclaimer:** The views expressed on this website are those of the author and are not necessarily reflective of views at the Federal Reserve Bank of Dallas or the Federal Reserve System. Any errors or omissions are the sole responsibility of the author.