Forecasting: principles and practice. Rob J Hyndman 3.2 Forecasting with multiple seasonality

Similar documents
FORECASTING USING R. Dynamic regression. Rob Hyndman Author, forecast

Forecasting: Principles and Practice. Rob J Hyndman. 12. Advanced methods OTexts.com/fpp/9/2/ OTexts.com/fpp/9/3/

Transformations for variance stabilization

Forecasting using R. Rob J Hyndman. 3.2 Dynamic regression. Forecasting using R 1

Forecasting using R. Rob J Hyndman. 2.4 Non-seasonal ARIMA models. Forecasting using R 1

Forecasting using R. Rob J Hyndman. 1.3 Seasonality and trends. Forecasting using R 1

Forecasting using R. Rob J Hyndman. 2.5 Seasonal ARIMA models. Forecasting using R 1

Forecasting electricity load demand using hybrid exponential smoothing-artificial neural network model

Automatic forecasting with a modified exponential smoothing state space framework

Short-term electricity demand forecasting in the time domain and in the frequency domain

Forecasting: principles and practice 1

Time Series in R: Forecasting and Visualisation. Forecast evaluation 29 May 2017

Exponentially weighted forecasts

LOAD FORECASTING APPLICATIONS for THE ENERGY SECTOR

Time Series Outlier Detection

Forecasting using R. Rob J Hyndman. 2.3 Stationarity and differencing. Forecasting using R 1

Exponential smoothing and non-negative data

Modelling and Forecasting Australian Domestic Tourism

Dennis Bricker Dept of Mechanical & Industrial Engineering The University of Iowa. Forecasting demand 02/06/03 page 1 of 34

Intermittent state-space model for demand forecasting

Forecasting: The First Step in Demand Planning

STA 6857 VAR, VARMA, VARMAX ( 5.7)

Functional time series

Complex exponential Smoothing. Ivan Svetunkov Nikolaos Kourentzes Robert Fildes

SHORT TERM LOAD FORECASTING

Lecture 5: Estimation of time series

Antti Salonen PPU Le 2: Forecasting 1

Lecture 7: Interpolation

PPU411 Antti Salonen. Forecasting. Forecasting PPU Forecasts are critical inputs to business plans, annual plans, and budgets

A Comparison of the Forecast Performance of. Double Seasonal ARIMA and Double Seasonal. ARFIMA Models of Electricity Load Demand

An Evaluation of Methods for Very Short-Term Load Forecasting Using Minute-by-Minute British Data

Ross Bettinger, Analytical Consultant, Seattle, WA

Capacity Planning and Headroom Analysis for Taming Database Replication Latency - Experiences with LinkedIn Internet Traffic

Daily sales forecasting in foodservice: Developing a model for application in an expert system

INDIAN INSTITUTE OF SCIENCE STOCHASTIC HYDROLOGY. Lecture -12 Course Instructor : Prof. P. P. MUJUMDAR Department of Civil Engg., IISc.

Regression of Time Series

Time Series Analysis -- An Introduction -- AMS 586

2.3 Oscillation. The harmonic oscillator equation is the differential equation. d 2 y dt 2 r y (r > 0). Its solutions have the form

Seasonal Models and Seasonal Adjustment

1. Fundamental concepts

Math 54. Selected Solutions for Week 10

Complex Exponential Smoothing

FORECASTING SUGARCANE PRODUCTION IN INDIA WITH ARIMA MODEL

Time series analysis of activity and temperature data of four healthy individuals

Short-term management of hydro-power systems based on uncertainty model in electricity markets

3) sin 265 cos 25 - cos 265 sin 25 C) Find the exact value by using a sum or difference identity. 4) sin 165 C) - 627

Time Series. Anthony Davison. c

Lecture 4. Section 2.5 The Pinching Theorem Section 2.6 Two Basic Properties of Continuity. Jiwen He. Department of Mathematics, University of Houston

Department of Econometrics and Business Statistics

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY

Antti Salonen KPP Le 3: Forecasting KPP227

Name (print, please) ID

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

Forecasting with R A practical workshop

Forecasting. Operations Analysis and Improvement Spring

STR: A Seasonal-Trend Decomposition Procedure Based on Regression

Forecasting: principles and practice. Rob J Hyndman 1.1 Introduction to Forecasting

Time-Series analysis for wind speed forecasting

Evaluation of Some Techniques for Forecasting of Electricity Demand in Sri Lanka

TMA4285 December 2015 Time series models, solution.

Analytic Trigonometry. Copyright Cengage Learning. All rights reserved.

Time Series Modeling. Shouvik Mani April 5, /688: Practical Data Science Carnegie Mellon University

Construction of an Informative Hierarchical Prior Distribution: Application to Electricity Load Forecasting

Forecasting: Methods and Applications

Chapter 2: Complex numbers

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Financial Econometrics / 49

8.2 Harmonic Regression and the Periodogram

MODELING INFLATION RATES IN NIGERIA: BOX-JENKINS APPROACH. I. U. Moffat and A. E. David Department of Mathematics & Statistics, University of Uyo, Uyo

STA 6857 Signal Extraction & Long Memory ARMA ( 4.11 & 5.2)

ESSE Mid-Term Test 2017 Tuesday 17 October :30-09:45

USING THE MULTIPLICATIVE DOUBLE SEASONAL HOLT-WINTERS METHOD TO FORECAST SHORT-TERM ELECTRICITY DEMAND

Exercises - Time series analysis

Two-Stage Models for Forecasting Time Series with Multiple Seasonality

Time Series and Forecasting Using R

Multiplicative Winter s Smoothing Method

The admissible parameter space for exponential smoothing models

A New Approach to Modeling Multivariate Time Series on Multiple Temporal Scales

Package thief. R topics documented: January 24, Version 0.3 Title Temporal Hierarchical Forecasting

The Analysis to Tertiary-industry with ARIMAX Model

Forecasting intraday call arrivals using the seasonal moving average method

DEPARTMENT OF ECONOMETRICS AND BUSINESS STATISTICS

Monitoring and data filtering II. Dynamic Linear Models

FE570 Financial Markets and Trading. Stevens Institute of Technology

Serie temporali: analisi e decomposizione

21 Linear State-Space Representations

A time series is called strictly stationary if the joint distribution of every collection (Y t

Review of Exponential Relations

Modelling Wind Farm Data and the Short Term Prediction of Wind Speeds

CHAPTER 4 FOURIER SERIES S A B A R I N A I S M A I L

Trend and long-run relations in electricity prices

Solar irradiance forecasting for Chulalongkorn University location using time series models

Periodic functions: simple harmonic oscillator

New York University Department of Economics. Applied Statistics and Econometrics G Spring 2013

Statistical Methods for Forecasting

Forecasting using robust exponential smoothing with damped trend and seasonal components

3 Time Series Regression

Autobox. Statistical Principles Guide

Dynamic Time Series Regression: A Panacea for Spurious Correlations

António Ascensão Costa

peak half-hourly Tasmania

Transcription:

Forecasting: principles and practice Rob J Hyndman 3.2 Forecasting with multiple seasonality 1

Outline 1 Time series with complex seasonality 2 STL with multiple seasonal periods 3 Dynamic harmonic regression 4 TBATS model 5 Lab session 21 2

Examples autoplot(gasoline) + xlab("year") + ylab("thousands of barrels per day") + ggtitle("weekly US finished motor gasoline products") Weekly US finished motor gasoline products Thousands of barrels per day 9 8 7 1990 1995 2000 2005 2010 2015 3

Examples 5 minute call volume at North American bank 400 Call volume 300 200 100 0 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 Weeks 400 Call volume 300 200 100 1 2 3 4 Weeks 4

Examples Turkish daily electricity demand 25 Electricity Demand (GW) 20 15 10 2000 2002 2004 2006 2008 Year 5

Outline 1 Time series with complex seasonality 2 STL with multiple seasonal periods 3 Dynamic harmonic regression 4 TBATS model 5 Lab session 21 6

STL with multiple seasonal periods calls %>% mstl() %>% autoplot() + xlab("week") 400 300 200 100 0 220 210 200 190 180 100 50 0 50 100 150 60 40 20 0 20 40 100 50 0 50 100 0 10 20 30 Week Data Trend Seasonal169 Seasonal845 Remainder 7

. STL with multiple seasonal periods calls %>% stlf() %>% autoplot() + xlab("week") Forecasts from STL + ETS(M,N,N) 400 300 200 100 level 80 95 0 100 0 10 20 30 Week 8

. STL with multiple seasonal periods calls %>% stlf() %>% autoplot(include=5*169) + xlab("week") Forecasts from STL + ETS(M,N,N) 400 300 200 100 level 80 95 0 100 33 34 35 Week 9

Outline 1 Time series with complex seasonality 2 STL with multiple seasonal periods 3 Dynamic harmonic regression 4 TBATS model 5 Lab session 21 10

Dynamic harmonic regression fit <- auto.arima(calls, seasonal=false, lambda=0, xreg=fourier(calls, K=c(10,10))) fit %>% forecast(xreg=fourier(calls, K=c(10,10), h=2*169)) %>% autoplot(include=5*169) + ylab("call volume") + xlab("weeks") 400 Forecasts from Regression with ARIMA(3,1,4) errors Call volume 300 200 level 80 95 100 32.8 33.2 33.6 34.0 Weeks 11

Outline 1 Time series with complex seasonality 2 STL with multiple seasonal periods 3 Dynamic harmonic regression 4 TBATS model 5 Lab session 21 12

TBATS model TBATS Trigonometric terms for seasonality Box-Cox transformations for heterogeneity ARMA errors for short-term dynamics Trend (possibly damped) Seasonal (including multiple and non-integer periods) 13

TBATS model y observation at time t (y ω t 1)/ω if ω 0; log y t if ω = 0. l t 1 + φb t 1 + M i=1 l l t 1 + φb t 1 + αd t t m i + d t b (1 φ)b + φb t 1 + βd t d p i=1 k i φ i d t i + j,t q θ j ε t j + ε t j, s(i) j,t 1 cos λ(i) j + s (i) j,t 1 sin λ(i) j + γ 1 (i) d t j, s(i) j,t 1 sin λ(i) j + s (i) j,t 1 cos λ(i) j + γ (i) 2 d t 14

TBATS model y observation at time t (y ω t 1)/ω if ω 0; log y t if ω = 0. l t 1 + φb t 1 + M i=1 l l t 1 + φb t 1 + αd t t m i + d t Box-Cox transformation b (1 φ)b + φb t 1 + βd t d p i=1 k i φ i d t i + j,t q θ j ε t j + ε t j, s(i) j,t 1 cos λ(i) j + s (i) j,t 1 sin λ(i) j + γ 1 (i) d t j, s(i) j,t 1 sin λ(i) j + s (i) j,t 1 cos λ(i) j + γ (i) 2 d t 14

TBATS model y observation at time t (y ω t 1)/ω if ω 0; log y t if ω = 0. l t 1 + φb t 1 + M i=1 l l t 1 + φb t 1 + αd t t m i + d t Box-Cox transformation M seasonal periods b (1 φ)b + φb t 1 + βd t d p i=1 k i φ i d t i + j,t q θ j ε t j + ε t j, s(i) j,t 1 cos λ(i) j + s (i) j,t 1 sin λ(i) j + γ 1 (i) d t j, s(i) j,t 1 sin λ(i) j + s (i) j,t 1 cos λ(i) j + γ (i) 2 d t 14

TBATS model y observation at time t (y ω t 1)/ω if ω 0; log y t if ω = 0. l t 1 + φb t 1 + M i=1 l l t 1 + φb t 1 + αd t t m i + d t b (1 φ)b + φb t 1 + βd t d p i=1 k i φ i d t i + j,t q θ j ε t j + ε t j, Box-Cox transformation M seasonal periods global and local trend s(i) j,t 1 cos λ(i) j + s (i) j,t 1 sin λ(i) j + γ 1 (i) d t j, s(i) j,t 1 sin λ(i) j + s (i) j,t 1 cos λ(i) j + γ (i) 2 d t 14

TBATS model y observation at time t (y ω t 1)/ω if ω 0; log y t if ω = 0. l t 1 + φb t 1 + M i=1 l l t 1 + φb t 1 + αd t t m i + d t b (1 φ)b + φb t 1 + βd t d p i=1 k i φ i d t i + j,t q θ j ε t j + ε t j, Box-Cox transformation M seasonal periods global and local trend ARMA error s(i) j,t 1 cos λ(i) j + s (i) j,t 1 sin λ(i) j + γ 1 (i) d t j, s(i) j,t 1 sin λ(i) j + s (i) j,t 1 cos λ(i) j + γ (i) 2 d t 14

TBATS model y observation at time t (y ω t 1)/ω if ω 0; log y t if ω = 0. l t 1 + φb t 1 + M i=1 l l t 1 + φb t 1 + αd t t m i + d t b (1 φ)b + φb t 1 + βd t d p i=1 k i φ i d t i + j,t q θ j ε t j + ε t j, s(i) j,t 1 Box-Cox transformation M seasonal periods global and local trend ARMA error Fourier-like seasonal terms + s (i) j,t 1 sin λ(i) j + γ 1 (i) d t cos λ(i) j j, s(i) j,t 1 sin λ(i) j + s (i) j,t 1 cos λ(i) j + γ (i) 2 d t 14

TBATS model y observation at time t (yt ω 1)/ω if ω 0; log TBATS y t if ω = 0. l t 1 + φb t 1 + M i=1 l l t 1 + φb t 1 + αd t t m i + d t b (1 φ)b + φb t 1 + βd t d p q φ i d t i + i=1seasonal k i Trigonometric Box-Cox ARMA Trend j,t θ j ε t j + ε t j, s(i) j,t 1 Box-Cox transformation M seasonal periods global and local trend ARMA error Fourier-like seasonal terms + s (i) j,t 1 sin λ(i) j + γ 1 (i) d t cos λ(i) j j, s(i) j,t 1 sin λ(i) j + s (i) j,t 1 cos λ(i) j + γ (i) 2 d t 14

. Complex seasonality gasoline %>% tbats() %>% forecast() %>% autoplot() Forecasts from TBATS(1, {0,0},, {<52.18,12>}) 10 9 level 8 80 95 7 1990 2000 2010 2020 Time 15

. Complex seasonality calls %>% tbats() %>% forecast() %>% autoplot() Forecasts from TBATS(0.555, {0,0},, {<169,6>, <845,4>}) 800 600 level 400 80 95 200 0 0 10 20 30 Time 16

. Complex seasonality telec %>% tbats() %>% forecast() %>% autoplot() Forecasts from TBATS(0.005, {4,2},, {<7,3>, <354.37,7>, <365.25,3>}) 25 20 level 80 95 15 10 2000 2004 2008 Time 17

TBATS model TBATS Trigonometric terms for seasonality Box-Cox transformations for heterogeneity ARMA errors for short-term dynamics Trend (possibly damped) Seasonal (including multiple and non-integer periods) Handles non-integer seasonality, multiple seasonal periods. Entirely automated Prediction intervals often too wide Very slow on long series 18

Outline 1 Time series with complex seasonality 2 STL with multiple seasonal periods 3 Dynamic harmonic regression 4 TBATS model 5 Lab session 21 19

Lab Session 21 20