2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical...

152
Hierarchical Forecasting 1 2017 Beijing Workshop on Forecasting Hierarchical Forecasting Rob J Hyndman robjhyndman.com/beijing2017

Transcript of 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical...

Page 1: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical Forecasting 1

2017 Beijing Workshop onForecasting

HierarchicalForecasting

Rob J Hyndman

robjhyndman.com/beijing2017

Page 2: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Outline

1 Hierarchical and grouped time series

2 Forecast reconciliation

3 Fast computational tricks

Hierarchical Forecasting Hierarchical and grouped time series 2

Page 3: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Labour market participationAustralia and New Zealand Standard Classification ofOccupations

8 major groups43 sub-major groups

97 minor groups– 359 unit groups

* 1023 occupations

Example: statistician2 Professionals

22 Business, Human Resource and Marketing Professionals224 Information and Organisation Professionals

2241 Actuaries, Mathematicians and Statisticians224113 Statistician

Hierarchical Forecasting Hierarchical and grouped time series 3

Page 4: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Labour market participationAustralia and New Zealand Standard Classification ofOccupations

8 major groups43 sub-major groups

97 minor groups– 359 unit groups

* 1023 occupations

Example: statistician2 Professionals

22 Business, Human Resource and Marketing Professionals224 Information and Organisation Professionals

2241 Actuaries, Mathematicians and Statisticians224113 Statistician

Hierarchical Forecasting Hierarchical and grouped time series 3

Page 5: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Australian tourism demand

Hierarchical Forecasting Hierarchical and grouped time series 4

Page 6: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Australian tourism demand

Hierarchical Forecasting Hierarchical and grouped time series 4

Quarterly data on visitor night from 1998:Q1 –2013:Q4From: National Visitor Survey, based on annualinterviews of 120,000 Australians aged 15+,collected by Tourism Research Australia.Split by 7 states, 27 zones and 76 regions (ageographical hierarchy)Also split by purpose of travel

HolidayVisiting friends and relatives (VFR)BusinessOther

304 bottom-level series

Page 7: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

3. PBS sales

Hierarchical Forecasting Hierarchical and grouped time series 5

Page 8: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

3. PBS salesATC drug classification

A Alimentary tract and metabolismB Blood and blood forming organsC Cardiovascular systemD DermatologicalsG Genito-urinary system and sex hormonesH Systemic hormonal preparations, excluding sex hormones and in-

sulinsJ Anti-infectives for systemic useL Antineoplastic and immunomodulating agentsM Musculo-skeletal systemN Nervous systemP Antiparasitic products, insecticides and repellentsR Respiratory systemS Sensory organsV Various

Hierarchical Forecasting Hierarchical and grouped time series 6

Page 9: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

3. PBS salesATC drug classification

A Alimentary tract and metabolism14 classes

A10 Drugs used in diabetes84 classes

A10B Blood glucose lowering drugs

A10BA Biguanides

A10BA02 Metformin

Hierarchical Forecasting Hierarchical and grouped time series 7

Page 10: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Spectacle sales

Hierarchical Forecasting Hierarchical and grouped time series 8

Monthly UK sales data from 2000 – 2014Provided by a large spectacle manufacturerSplit by brand (26), gender (3), price range (6),materials (4), and stores (600)About 1 million bottom-level series

Page 11: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Spectacle sales

Hierarchical Forecasting Hierarchical and grouped time series 8

Monthly UK sales data from 2000 – 2014Provided by a large spectacle manufacturerSplit by brand (26), gender (3), price range (6),materials (4), and stores (600)About 1 million bottom-level series

Page 12: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Spectacle sales

Hierarchical Forecasting Hierarchical and grouped time series 8

Monthly UK sales data from 2000 – 2014Provided by a large spectacle manufacturerSplit by brand (26), gender (3), price range (6),materials (4), and stores (600)About 1 million bottom-level series

Page 13: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Spectacle sales

Hierarchical Forecasting Hierarchical and grouped time series 8

Monthly UK sales data from 2000 – 2014Provided by a large spectacle manufacturerSplit by brand (26), gender (3), price range (6),materials (4), and stores (600)About 1 million bottom-level series

Page 14: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time seriesA hierarchical time series is a collection of several timeseries that are linked together in a hierarchical structure.

Total

A

AA AB AC

B

BA BB BC

C

CA CB CC

ExamplesLabour turnover by occupationPharmaceutical salesTourism by state and region

Hierarchical Forecasting Hierarchical and grouped time series 9

Page 15: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time seriesA hierarchical time series is a collection of several timeseries that are linked together in a hierarchical structure.

Total

A

AA AB AC

B

BA BB BC

C

CA CB CC

ExamplesLabour turnover by occupationPharmaceutical salesTourism by state and region

Hierarchical Forecasting Hierarchical and grouped time series 9

Page 16: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time seriesA hierarchical time series is a collection of several timeseries that are linked together in a hierarchical structure.

Total

A

AA AB AC

B

BA BB BC

C

CA CB CC

ExamplesLabour turnover by occupationPharmaceutical salesTourism by state and region

Hierarchical Forecasting Hierarchical and grouped time series 9

Page 17: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time seriesA hierarchical time series is a collection of several timeseries that are linked together in a hierarchical structure.

Total

A

AA AB AC

B

BA BB BC

C

CA CB CC

ExamplesLabour turnover by occupationPharmaceutical salesTourism by state and region

Hierarchical Forecasting Hierarchical and grouped time series 9

Page 18: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Grouped time seriesA grouped time series is a collection of time series thatcan be grouped together in a number of non-hierarchicalways.

Total

A

AX AY

B

BX BY

Total

X

AX BX

Y

AY BY

ExamplesLabour turnover by occupation and stateSpectacle sales by brand, gender, stores, etc.Tourism by state and purpose of travel

Hierarchical Forecasting Hierarchical and grouped time series 10

Page 19: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Grouped time seriesA grouped time series is a collection of time series thatcan be grouped together in a number of non-hierarchicalways.

Total

A

AX AY

B

BX BY

Total

X

AX BX

Y

AY BY

ExamplesLabour turnover by occupation and stateSpectacle sales by brand, gender, stores, etc.Tourism by state and purpose of travel

Hierarchical Forecasting Hierarchical and grouped time series 10

Page 20: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Grouped time seriesA grouped time series is a collection of time series thatcan be grouped together in a number of non-hierarchicalways.

Total

A

AX AY

B

BX BY

Total

X

AX BX

Y

AY BY

ExamplesLabour turnover by occupation and stateSpectacle sales by brand, gender, stores, etc.Tourism by state and purpose of travel

Hierarchical Forecasting Hierarchical and grouped time series 10

Page 21: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Grouped time seriesA grouped time series is a collection of time series thatcan be grouped together in a number of non-hierarchicalways.

Total

A

AX AY

B

BX BY

Total

X

AX BX

Y

AY BY

ExamplesLabour turnover by occupation and stateSpectacle sales by brand, gender, stores, etc.Tourism by state and purpose of travel

Hierarchical Forecasting Hierarchical and grouped time series 10

Page 22: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

The problem

1 How to forecast time series at all nodessuch that the forecasts add up in the sameway as the original data?

2 Can we exploit relationships between theseries to improve the forecasts?

Hierarchical Forecasting Hierarchical and grouped time series 11

Page 23: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

The problem

1 How to forecast time series at all nodessuch that the forecasts add up in the sameway as the original data?

2 Can we exploit relationships between theseries to improve the forecasts?

Hierarchical Forecasting Hierarchical and grouped time series 11

Page 24: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

The solution

1 Forecast all series at all levels of aggregationusing an automatic forecasting algorithm(e.g., ets, auto.arima, . . . )

2 Reconcile the resulting forecasts so they addup correctly using least squaresoptimization (i.e., find closest reconciledforecasts to the original forecasts).

3 This is all available in the hts package in R.

Hierarchical Forecasting Hierarchical and grouped time series 12

Page 25: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

The solution

1 Forecast all series at all levels of aggregationusing an automatic forecasting algorithm(e.g., ets, auto.arima, . . . )

2 Reconcile the resulting forecasts so they addup correctly using least squaresoptimization (i.e., find closest reconciledforecasts to the original forecasts).

3 This is all available in the hts package in R.

Hierarchical Forecasting Hierarchical and grouped time series 12

Page 26: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

The solution

1 Forecast all series at all levels of aggregationusing an automatic forecasting algorithm(e.g., ets, auto.arima, . . . )

2 Reconcile the resulting forecasts so they addup correctly using least squaresoptimization (i.e., find closest reconciledforecasts to the original forecasts).

3 This is all available in the hts package in R.

Hierarchical Forecasting Hierarchical and grouped time series 12

Page 27: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time series

Total

A B C

Hierarchical Forecasting Hierarchical and grouped time series 13

yt : observed aggregate of allseries at time t.

yX,t : observation on series X at timet.

bt : vector of all series at bottomlevel in time t.

Page 28: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time series

Total

A B C

Hierarchical Forecasting Hierarchical and grouped time series 13

yt : observed aggregate of allseries at time t.

yX,t : observation on series X at timet.

bt : vector of all series at bottomlevel in time t.

Page 29: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time series

Total

A B C

yt = [yt, yA,t, yB,t, yC,t]′ =

1 1 11 0 00 1 00 0 1

yA,tyB,tyC,t

Hierarchical Forecasting Hierarchical and grouped time series 13

yt : observed aggregate of allseries at time t.

yX,t : observation on series X at timet.

bt : vector of all series at bottomlevel in time t.

Page 30: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time series

Total

A B C

yt = [yt, yA,t, yB,t, yC,t]′ =

1 1 11 0 00 1 00 0 1

︸ ︷︷ ︸

S

yA,tyB,tyC,t

Hierarchical Forecasting Hierarchical and grouped time series 13

yt : observed aggregate of allseries at time t.

yX,t : observation on series X at timet.

bt : vector of all series at bottomlevel in time t.

Page 31: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time series

Total

A B C

yt = [yt, yA,t, yB,t, yC,t]′ =

1 1 11 0 00 1 00 0 1

︸ ︷︷ ︸

S

yA,tyB,tyC,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Hierarchical and grouped time series 13

yt : observed aggregate of allseries at time t.

yX,t : observation on series X at timet.

bt : vector of all series at bottomlevel in time t.

Page 32: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time series

Total

A B C

yt = [yt, yA,t, yB,t, yC,t]′ =

1 1 11 0 00 1 00 0 1

︸ ︷︷ ︸

S

yA,tyB,tyC,t

︸ ︷︷ ︸

btyt = Sbt

Hierarchical Forecasting Hierarchical and grouped time series 13

yt : observed aggregate of allseries at time t.

yX,t : observation on series X at timet.

bt : vector of all series at bottomlevel in time t.

Page 33: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time seriesTotal

A

AX AY AZ

B

BX BY BZ

C

CX CY CZ

yt =

ytyA,tyB,tyC,tyAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

=

1 1 1 1 1 1 1 1 11 1 1 0 0 0 0 0 00 0 0 1 1 1 0 0 00 0 0 0 0 0 1 1 11 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 00 0 1 0 0 0 0 0 00 0 0 1 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 1 0 0 00 0 0 0 0 0 1 0 00 0 0 0 0 0 0 1 00 0 0 0 0 0 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Hierarchical and grouped time series 14

Page 34: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time seriesTotal

A

AX AY AZ

B

BX BY BZ

C

CX CY CZ

yt =

ytyA,tyB,tyC,tyAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

=

1 1 1 1 1 1 1 1 11 1 1 0 0 0 0 0 00 0 0 1 1 1 0 0 00 0 0 0 0 0 1 1 11 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 00 0 1 0 0 0 0 0 00 0 0 1 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 1 0 0 00 0 0 0 0 0 1 0 00 0 0 0 0 0 0 1 00 0 0 0 0 0 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Hierarchical and grouped time series 14

Page 35: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical time seriesTotal

A

AX AY AZ

B

BX BY BZ

C

CX CY CZ

yt =

ytyA,tyB,tyC,tyAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

=

1 1 1 1 1 1 1 1 11 1 1 0 0 0 0 0 00 0 0 1 1 1 0 0 00 0 0 0 0 0 1 1 11 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 00 0 1 0 0 0 0 0 00 0 0 1 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 1 0 0 00 0 0 0 0 0 1 0 00 0 0 0 0 0 0 1 00 0 0 0 0 0 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Hierarchical and grouped time series 14

yt = Sbt

Page 36: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Grouped dataAX AY A

BX BY B

X Y Total

yt =

ytyA,tyB,tyX,tyY,tyAX,tyAY,tyBX,tyBY,t

=

1 1 1 11 1 0 00 0 1 11 0 1 00 1 0 11 0 0 00 1 0 00 0 1 00 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyBX,tyBY,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Hierarchical and grouped time series 15

Page 37: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Grouped dataAX AY A

BX BY B

X Y Total

yt =

ytyA,tyB,tyX,tyY,tyAX,tyAY,tyBX,tyBY,t

=

1 1 1 11 1 0 00 0 1 11 0 1 00 1 0 11 0 0 00 1 0 00 0 1 00 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyBX,tyBY,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Hierarchical and grouped time series 15

Page 38: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Grouped dataAX AY A

BX BY B

X Y Total

yt =

ytyA,tyB,tyX,tyY,tyAX,tyAY,tyBX,tyBY,t

=

1 1 1 11 1 0 00 0 1 11 0 1 00 1 0 11 0 0 00 1 0 00 0 1 00 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyBX,tyBY,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Hierarchical and grouped time series 15

yt = Sbt

Page 39: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical and grouped time series

Every collection of time series with aggregationconstraints can be written as

yt = Sbt

whereyt is vector of all series at time tbt is vector of the most disaggregated series at time tS is “summing matrix” containing the aggregationconstraints.

Hierarchical Forecasting Hierarchical and grouped time series 16

Page 40: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Outline

1 Hierarchical and grouped time series

2 Forecast reconciliation

3 Fast computational tricks

Hierarchical Forecasting Forecast reconciliation 17

Page 41: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical/grouped time seriesForecasts should be “coherent”, unbiased, minimumvariance.

Existing methods:ã Bottom-upã Top-downã Middle-out

How to compute forecast intervals?

Most research is concerned about relativeperformance of existing methods.

Hierarchical Forecasting Forecast reconciliation 18

Page 42: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical/grouped time seriesForecasts should be “coherent”, unbiased, minimumvariance.

Existing methods:ã Bottom-upã Top-downã Middle-out

How to compute forecast intervals?

Most research is concerned about relativeperformance of existing methods.

Hierarchical Forecasting Forecast reconciliation 18

Page 43: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical/grouped time seriesForecasts should be “coherent”, unbiased, minimumvariance.

Existing methods:ã Bottom-upã Top-downã Middle-out

How to compute forecast intervals?

Most research is concerned about relativeperformance of existing methods.

Hierarchical Forecasting Forecast reconciliation 18

Page 44: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical/grouped time seriesForecasts should be “coherent”, unbiased, minimumvariance.

Existing methods:ã Bottom-upã Top-downã Middle-out

How to compute forecast intervals?

Most research is concerned about relativeperformance of existing methods.

Hierarchical Forecasting Forecast reconciliation 18

Page 45: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical/grouped time seriesForecasts should be “coherent”, unbiased, minimumvariance.

Existing methods:ã Bottom-upã Top-downã Middle-out

How to compute forecast intervals?

Most research is concerned about relativeperformance of existing methods.

Hierarchical Forecasting Forecast reconciliation 18

Page 46: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical/grouped time seriesForecasts should be “coherent”, unbiased, minimumvariance.

Existing methods:ã Bottom-upã Top-downã Middle-out

How to compute forecast intervals?

Most research is concerned about relativeperformance of existing methods.

Hierarchical Forecasting Forecast reconciliation 18

Page 47: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchical/grouped time seriesForecasts should be “coherent”, unbiased, minimumvariance.

Existing methods:ã Bottom-upã Top-downã Middle-out

How to compute forecast intervals?

Most research is concerned about relativeperformance of existing methods.

Hierarchical Forecasting Forecast reconciliation 18

Page 48: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down method

Hierarchical Forecasting Forecast reconciliation 19

AdvantagesWorks well in presenceof low counts.Single forecastingmodel easy to buildProvides reliableforecasts for aggregatelevels.

DisadvantagesLoss of information,especially individualseries dynamics.Distribution of forecaststo lower levels can bedifficultNo prediction intervals

Page 49: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down method

Hierarchical Forecasting Forecast reconciliation 19

AdvantagesWorks well in presenceof low counts.Single forecastingmodel easy to buildProvides reliableforecasts for aggregatelevels.

DisadvantagesLoss of information,especially individualseries dynamics.Distribution of forecaststo lower levels can bedifficultNo prediction intervals

Page 50: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down method

Hierarchical Forecasting Forecast reconciliation 19

AdvantagesWorks well in presenceof low counts.Single forecastingmodel easy to buildProvides reliableforecasts for aggregatelevels.

DisadvantagesLoss of information,especially individualseries dynamics.Distribution of forecaststo lower levels can bedifficultNo prediction intervals

Page 51: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down method

Hierarchical Forecasting Forecast reconciliation 19

AdvantagesWorks well in presenceof low counts.Single forecastingmodel easy to buildProvides reliableforecasts for aggregatelevels.

DisadvantagesLoss of information,especially individualseries dynamics.Distribution of forecaststo lower levels can bedifficultNo prediction intervals

Page 52: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down method

Hierarchical Forecasting Forecast reconciliation 19

AdvantagesWorks well in presenceof low counts.Single forecastingmodel easy to buildProvides reliableforecasts for aggregatelevels.

DisadvantagesLoss of information,especially individualseries dynamics.Distribution of forecaststo lower levels can bedifficultNo prediction intervals

Page 53: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down method

Hierarchical Forecasting Forecast reconciliation 19

AdvantagesWorks well in presenceof low counts.Single forecastingmodel easy to buildProvides reliableforecasts for aggregatelevels.

DisadvantagesLoss of information,especially individualseries dynamics.Distribution of forecaststo lower levels can bedifficultNo prediction intervals

Page 54: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Bottom-up method

Hierarchical Forecasting Forecast reconciliation 20

AdvantagesNo loss of information.Better capturesdynamics of individualseries.

DisadvantagesLarge number of seriesto be forecast.Constructing forecastingmodels is harderbecause of noisy data atbottom level.No prediction intervals

Page 55: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Bottom-up method

Hierarchical Forecasting Forecast reconciliation 20

AdvantagesNo loss of information.Better capturesdynamics of individualseries.

DisadvantagesLarge number of seriesto be forecast.Constructing forecastingmodels is harderbecause of noisy data atbottom level.No prediction intervals

Page 56: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Bottom-up method

Hierarchical Forecasting Forecast reconciliation 20

AdvantagesNo loss of information.Better capturesdynamics of individualseries.

DisadvantagesLarge number of seriesto be forecast.Constructing forecastingmodels is harderbecause of noisy data atbottom level.No prediction intervals

Page 57: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Bottom-up method

Hierarchical Forecasting Forecast reconciliation 20

AdvantagesNo loss of information.Better capturesdynamics of individualseries.

DisadvantagesLarge number of seriesto be forecast.Constructing forecastingmodels is harderbecause of noisy data atbottom level.No prediction intervals

Page 58: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Bottom-up method

Hierarchical Forecasting Forecast reconciliation 20

AdvantagesNo loss of information.Better capturesdynamics of individualseries.

DisadvantagesLarge number of seriesto be forecast.Constructing forecastingmodels is harderbecause of noisy data atbottom level.No prediction intervals

Page 59: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecasting notation

Let yn(h) be vector of initial h-step forecasts, made attime n, stacked in same order as yt.(In general, they will not “add up”.)

Reconciled forecasts must be of the form:yn(h) = SPyn(h)

for some matrix P.

P extracts and combines base forecasts yn(h) to getbottom-level forecasts.S adds them up

Hierarchical Forecasting Forecast reconciliation 21

Page 60: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecasting notation

Let yn(h) be vector of initial h-step forecasts, made attime n, stacked in same order as yt.(In general, they will not “add up”.)

Reconciled forecasts must be of the form:yn(h) = SPyn(h)

for some matrix P.

P extracts and combines base forecasts yn(h) to getbottom-level forecasts.S adds them up

Hierarchical Forecasting Forecast reconciliation 21

Page 61: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecasting notation

Let yn(h) be vector of initial h-step forecasts, made attime n, stacked in same order as yt.(In general, they will not “add up”.)

Reconciled forecasts must be of the form:yn(h) = SPyn(h)

for some matrix P.

P extracts and combines base forecasts yn(h) to getbottom-level forecasts.S adds them up

Hierarchical Forecasting Forecast reconciliation 21

Page 62: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecasting notation

Let yn(h) be vector of initial h-step forecasts, made attime n, stacked in same order as yt.(In general, they will not “add up”.)

Reconciled forecasts must be of the form:yn(h) = SPyn(h)

for some matrix P.

P extracts and combines base forecasts yn(h) to getbottom-level forecasts.S adds them up

Hierarchical Forecasting Forecast reconciliation 21

Page 63: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecasting notation

Let yn(h) be vector of initial h-step forecasts, made attime n, stacked in same order as yt.(In general, they will not “add up”.)

Reconciled forecasts must be of the form:yn(h) = SPyn(h)

for some matrix P.

P extracts and combines base forecasts yn(h) to getbottom-level forecasts.S adds them up

Hierarchical Forecasting Forecast reconciliation 21

Page 64: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Bottom-up forecasts

yn(h) = SPyn(h)

Bottom-up forecasts are obtained using

P = [0 | I] ,

where 0 is null matrix and I is identity matrix.Pmatrix extracts only bottom-level forecasts fromyn(h)S adds them up to give the bottom-up forecasts.

Hierarchical Forecasting Forecast reconciliation 22

Page 65: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Bottom-up forecasts

yn(h) = SPyn(h)

Bottom-up forecasts are obtained using

P = [0 | I] ,

where 0 is null matrix and I is identity matrix.Pmatrix extracts only bottom-level forecasts fromyn(h)S adds them up to give the bottom-up forecasts.

Hierarchical Forecasting Forecast reconciliation 22

Page 66: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Bottom-up forecasts

yn(h) = SPyn(h)

Bottom-up forecasts are obtained using

P = [0 | I] ,

where 0 is null matrix and I is identity matrix.Pmatrix extracts only bottom-level forecasts fromyn(h)S adds them up to give the bottom-up forecasts.

Hierarchical Forecasting Forecast reconciliation 22

Page 67: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down forecasts

yn(h) = SPyn(h)

Top-down forecasts are obtained using

P = [p | 0]

where p = [p1, p2, . . . , pmK ]′ is a vector of proportions that

sum to one.P distributes forecasts of the aggregate to the lowestlevel series.Different methods of top-down forecasting lead todifferent proportionality vectors p.

Hierarchical Forecasting Forecast reconciliation 23

Page 68: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down forecasts

yn(h) = SPyn(h)

Top-down forecasts are obtained using

P = [p | 0]

where p = [p1, p2, . . . , pmK ]′ is a vector of proportions that

sum to one.P distributes forecasts of the aggregate to the lowestlevel series.Different methods of top-down forecasting lead todifferent proportionality vectors p.

Hierarchical Forecasting Forecast reconciliation 23

Page 69: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Top-down forecasts

yn(h) = SPyn(h)

Top-down forecasts are obtained using

P = [p | 0]

where p = [p1, p2, . . . , pmK ]′ is a vector of proportions that

sum to one.P distributes forecasts of the aggregate to the lowestlevel series.Different methods of top-down forecasting lead todifferent proportionality vectors p.

Hierarchical Forecasting Forecast reconciliation 23

Page 70: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: bias

yn(h) = SPyn(h)

Assume: base forecasts yn(h) are unbiased:E[yn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]

Let bn(h) be bottom level base forecastswith βn(h) = E[bn(h)|y1, . . . , yn].Then E[yn(h)] = Sβn(h).We want the revised forecasts to be unbiased:E[yn(h)] = SPSβn(h) = Sβn(h).

Reconciled forecast are unbiased if and only if SPS = S.

True for bottom-up, but not top-down or middle-out.Hierarchical Forecasting Forecast reconciliation 24

Page 71: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: bias

yn(h) = SPyn(h)

Assume: base forecasts yn(h) are unbiased:E[yn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]

Let bn(h) be bottom level base forecastswith βn(h) = E[bn(h)|y1, . . . , yn].Then E[yn(h)] = Sβn(h).We want the revised forecasts to be unbiased:E[yn(h)] = SPSβn(h) = Sβn(h).

Reconciled forecast are unbiased if and only if SPS = S.

True for bottom-up, but not top-down or middle-out.Hierarchical Forecasting Forecast reconciliation 24

Page 72: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: bias

yn(h) = SPyn(h)

Assume: base forecasts yn(h) are unbiased:E[yn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]

Let bn(h) be bottom level base forecastswith βn(h) = E[bn(h)|y1, . . . , yn].Then E[yn(h)] = Sβn(h).We want the revised forecasts to be unbiased:E[yn(h)] = SPSβn(h) = Sβn(h).

Reconciled forecast are unbiased if and only if SPS = S.

True for bottom-up, but not top-down or middle-out.Hierarchical Forecasting Forecast reconciliation 24

Page 73: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: bias

yn(h) = SPyn(h)

Assume: base forecasts yn(h) are unbiased:E[yn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]

Let bn(h) be bottom level base forecastswith βn(h) = E[bn(h)|y1, . . . , yn].Then E[yn(h)] = Sβn(h).We want the revised forecasts to be unbiased:E[yn(h)] = SPSβn(h) = Sβn(h).

Reconciled forecast are unbiased if and only if SPS = S.

True for bottom-up, but not top-down or middle-out.Hierarchical Forecasting Forecast reconciliation 24

Page 74: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: bias

yn(h) = SPyn(h)

Assume: base forecasts yn(h) are unbiased:E[yn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]

Let bn(h) be bottom level base forecastswith βn(h) = E[bn(h)|y1, . . . , yn].Then E[yn(h)] = Sβn(h).We want the revised forecasts to be unbiased:E[yn(h)] = SPSβn(h) = Sβn(h).

Reconciled forecast are unbiased if and only if SPS = S.

True for bottom-up, but not top-down or middle-out.Hierarchical Forecasting Forecast reconciliation 24

Page 75: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: bias

yn(h) = SPyn(h)

Assume: base forecasts yn(h) are unbiased:E[yn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]

Let bn(h) be bottom level base forecastswith βn(h) = E[bn(h)|y1, . . . , yn].Then E[yn(h)] = Sβn(h).We want the revised forecasts to be unbiased:E[yn(h)] = SPSβn(h) = Sβn(h).

Reconciled forecast are unbiased if and only if SPS = S.

True for bottom-up, but not top-down or middle-out.Hierarchical Forecasting Forecast reconciliation 24

Page 76: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: bias

yn(h) = SPyn(h)

Assume: base forecasts yn(h) are unbiased:E[yn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]

Let bn(h) be bottom level base forecastswith βn(h) = E[bn(h)|y1, . . . , yn].Then E[yn(h)] = Sβn(h).We want the revised forecasts to be unbiased:E[yn(h)] = SPSβn(h) = Sβn(h).

Reconciled forecast are unbiased if and only if SPS = S.

True for bottom-up, but not top-down or middle-out.Hierarchical Forecasting Forecast reconciliation 24

Page 77: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: bias

yn(h) = SPyn(h)

Assume: base forecasts yn(h) are unbiased:E[yn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]

Let bn(h) be bottom level base forecastswith βn(h) = E[bn(h)|y1, . . . , yn].Then E[yn(h)] = Sβn(h).We want the revised forecasts to be unbiased:E[yn(h)] = SPSβn(h) = Sβn(h).

Reconciled forecast are unbiased if and only if SPS = S.

True for bottom-up, but not top-down or middle-out.Hierarchical Forecasting Forecast reconciliation 24

Page 78: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: variance

yn(h) = SPyn(h)

Let error variance of h-step base forecasts yn(h) be

Σh = Var[yn+h − yn(h) | y1, . . . , yn]

Then the error variance of the corresponding reconciledforecasts is

Var[yn+h − yn(h) | y1, . . . , yn] = SPΣhP′S′

This is a general result for all existing methods.

Hierarchical Forecasting Forecast reconciliation 25

Page 79: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

General properties: variance

yn(h) = SPyn(h)

Let error variance of h-step base forecasts yn(h) be

Σh = Var[yn+h − yn(h) | y1, . . . , yn]

Then the error variance of the corresponding reconciledforecasts is

Var[yn+h − yn(h) | y1, . . . , yn] = SPΣhP′S′

This is a general result for all existing methods.

Hierarchical Forecasting Forecast reconciliation 25

Page 80: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

yn(h) = SPyn(h)

Theorem: MinT ReconciliationIf P satisfies SPS = S, then

minP = trace[SPΣhP′S′]has solution P = (S′Σ−1h S)−1S′Σ−1h .

Reconciled forecasts Base forecastsAssume thatΣh = khΣ1 to simplify computations.

Hierarchical Forecasting Forecast reconciliation 26

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 81: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

yn(h) = SPyn(h)

Theorem: MinT ReconciliationIf P satisfies SPS = S, then

minP = trace[SPΣhP′S′]has solution P = (S′Σ−1h S)−1S′Σ−1h .

Reconciled forecasts Base forecastsAssume thatΣh = khΣ1 to simplify computations.

Hierarchical Forecasting Forecast reconciliation 26

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 82: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

yn(h) = SPyn(h)

Theorem: MinT ReconciliationIf P satisfies SPS = S, then

minP = trace[SPΣhP′S′]has solution P = (S′Σ−1h S)−1S′Σ−1h .

Reconciled forecasts Base forecastsAssume thatΣh = khΣ1 to simplify computations.

Hierarchical Forecasting Forecast reconciliation 26

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 83: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

yn(h) = SPyn(h)

Theorem: MinT ReconciliationIf P satisfies SPS = S, then

minP = trace[SPΣhP′S′]has solution P = (S′Σ−1h S)−1S′Σ−1h .

Reconciled forecasts Base forecastsAssume thatΣh = khΣ1 to simplify computations.

Hierarchical Forecasting Forecast reconciliation 26

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 84: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 1: OLSAssumeΣ1 ≈ kI.

yn(h) = S(S′S)−1S′yn(h)

Reconciliation does not depend on dataWorks surprisingly well.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 27

yn(h) = S(S′Σ−11 S)−1S′Σ−11 yn(h)

Page 85: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 1: OLSAssumeΣ1 ≈ kI.

yn(h) = S(S′S)−1S′yn(h)

Reconciliation does not depend on dataWorks surprisingly well.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 27

yn(h) = S(S′Σ−11 S)−1S′Σ−11 yn(h)

Page 86: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 1: OLSAssumeΣ1 ≈ kI.

yn(h) = S(S′S)−1S′yn(h)

Reconciliation does not depend on dataWorks surprisingly well.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 27

yn(h) = S(S′Σ−11 S)−1S′Σ−11 yn(h)

Page 87: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 1: OLSAssumeΣ1 ≈ kI.

yn(h) = S(S′S)−1S′yn(h)

Reconciliation does not depend on dataWorks surprisingly well.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 27

yn(h) = S(S′Σ−11 S)−1S′Σ−11 yn(h)

Page 88: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 1: OLSAssumeΣ1 ≈ kI.

yn(h) = S(S′S)−1S′yn(h)

Reconciliation does not depend on dataWorks surprisingly well.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 27

yn(h) = S(S′Σ−11 S)−1S′Σ−11 yn(h)

Page 89: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 1: OLSAssumeΣ1 ≈ kI.

yn(h) = S(S′S)−1S′yn(h)

Reconciliation does not depend on dataWorks surprisingly well.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 27

yn(h) = S(S′Σ−11 S)−1S′Σ−11 yn(h)

Page 90: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 2: WLSApproximateΣ1 by its diagonal.Easy to estimate, and places weight where we havebest forecasts.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 28

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 91: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 2: WLSApproximateΣ1 by its diagonal.Easy to estimate, and places weight where we havebest forecasts.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 28

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 92: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 2: WLSApproximateΣ1 by its diagonal.Easy to estimate, and places weight where we havebest forecasts.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 28

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 93: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 2: WLSApproximateΣ1 by its diagonal.Easy to estimate, and places weight where we havebest forecasts.Still need to estimate covariance matrix to produceprediction intervals.

Hierarchical Forecasting Forecast reconciliation 28

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 94: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 3: GLSEstimateΣ1 using shrinkage to the diagonal.Allows for covariances.Difficult to compute for large numbers of timeseries.

Hierarchical Forecasting Forecast reconciliation 29

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 95: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 3: GLSEstimateΣ1 using shrinkage to the diagonal.Allows for covariances.Difficult to compute for large numbers of timeseries.

Hierarchical Forecasting Forecast reconciliation 29

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 96: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 3: GLSEstimateΣ1 using shrinkage to the diagonal.Allows for covariances.Difficult to compute for large numbers of timeseries.

Hierarchical Forecasting Forecast reconciliation 29

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 97: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Optimal forecast reconciliation

Reconciled forecasts Base forecasts

Solution 3: GLSEstimateΣ1 using shrinkage to the diagonal.Allows for covariances.Difficult to compute for large numbers of timeseries.

Hierarchical Forecasting Forecast reconciliation 29

yn(h) = S(S′Σ−1h S)−1S′Σ−1h yn(h)

Page 98: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Australian tourism

Hierarchical Forecasting Forecast reconciliation 30

Page 99: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Australian tourism

Hierarchical Forecasting Forecast reconciliation 30

Hierarchy:States (7)Zones (27)Regions (82)

Page 100: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Australian tourism

Hierarchical Forecasting Forecast reconciliation 30

Hierarchy:States (7)Zones (27)Regions (82)

Base forecastsETS (exponential smoothing)models

Page 101: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: Total

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

6000

065

000

7000

075

000

8000

085

000

Page 102: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: NSW

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

1800

022

000

2600

030

000

Page 103: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: VIC

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

1000

012

000

1400

016

000

1800

0

Page 104: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: Nth.Coast.NSW

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

5000

6000

7000

8000

9000

Page 105: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: Metro.QLD

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

8000

9000

1100

013

000

Page 106: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: Sth.WA

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

400

600

800

1000

1200

1400

Page 107: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: X201.Melbourne

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

4000

4500

5000

5500

6000

Page 108: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: X402.Murraylands

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

010

020

030

0

Page 109: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Base forecasts

Hierarchical Forecasting Forecast reconciliation 31

Domestic tourism forecasts: X809.Daly

Year

Vis

itor

nigh

ts

1998 2000 2002 2004 2006 2008

020

4060

8010

0

Page 110: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● time

Page 111: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 112: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 113: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 114: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 115: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 116: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 117: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 118: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 119: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 120: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 121: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 122: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 123: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 124: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 125: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 126: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 127: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 128: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 129: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 1● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 130: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 2● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 131: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 3● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 132: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 4● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 133: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 5● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 134: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

Training sets Test sets h = 6● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

time

Page 135: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Hierarchy: states, zones, regionsForecast horizon

RMSE h = 1 h = 2 h = 3 h = 4 h = 5 h = 6 Ave

AustraliaBase 1762.04 1770.29 1766.02 1818.82 1705.35 1721.17 1757.28Bottom 1736.92 1742.69 1722.79 1752.74 1666.73 1687.43 1718.22OLS 1747.60 1757.68 1751.77 1800.67 1686.00 1706.45 1741.69WLS 1705.21 1715.87 1703.75 1729.56 1627.79 1661.24 1690.57GLS 1704.64 1715.60 1705.31 1729.04 1626.36 1661.64 1690.43

StatesBase 399.77 404.16 401.92 407.26 395.38 401.17 401.61Bottom 404.29 406.95 404.96 409.02 399.80 401.55 404.43OLS 404.47 407.62 405.43 413.79 401.10 404.90 406.22WLS 398.84 402.12 400.71 405.03 394.76 398.23 399.95GLS 398.84 402.16 400.86 405.03 394.59 398.22 399.95

RegionsBase 93.15 93.38 93.45 93.79 93.50 93.56 93.47Bottom 93.15 93.38 93.45 93.79 93.50 93.56 93.47OLS 93.28 93.53 93.64 94.17 93.78 93.88 93.71WLS 93.02 93.32 93.38 93.72 93.39 93.53 93.39GLS 92.98 93.27 93.34 93.66 93.34 93.46 93.34

Hierarchical Forecasting Forecast reconciliation 33

Page 136: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Outline

1 Hierarchical and grouped time series

2 Forecast reconciliation

3 Fast computational tricks

Hierarchical Forecasting Fast computational tricks 34

Page 137: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchical dataTotal

A

AX AY AZ

B

BX BY BZ

C

CX CY CZ

yt =

ytyA,tyB,tyC,tyAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

=

1 1 1 1 1 1 1 1 11 1 1 0 0 0 0 0 00 0 0 1 1 1 0 0 00 0 0 0 0 0 1 1 11 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 00 0 1 0 0 0 0 0 00 0 0 1 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 1 0 0 00 0 0 0 0 0 1 0 00 0 0 0 0 0 0 1 00 0 0 0 0 0 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Fast computational tricks 35

yt = Sbt

Page 138: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchical dataTotal

A

AX AY AZ

B

BX BY BZ

C

CX CY CZ

yt =

ytyA,tyAX,tyAY,tyAZ,tyB,tyBX,tyBY,tyBZ,tyC,tyCX,tyCY,tyCZ,t

=

1 1 1 1 1 1 1 1 11 1 1 0 0 0 0 0 01 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 00 0 1 0 0 0 0 0 00 0 0 1 1 1 0 0 00 0 0 1 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 1 0 0 00 0 0 0 0 0 1 1 10 0 0 0 0 0 1 0 00 0 0 0 0 0 0 1 00 0 0 0 0 0 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Fast computational tricks 36

yt = Sbt

Page 139: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchical dataTotal

A

AX AY AZ

B

BX BY BZ

C

CX CY CZ

yt =

ytyA,tyAX,tyAY,tyAZ,tyB,tyBX,tyBY,tyBZ,tyC,tyCX,tyCY,tyCZ,t

=

1 1 1 1 1 1 1 1 11 1 1 0 0 0 0 0 01 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 00 0 1 0 0 0 0 0 00 0 0 1 1 1 0 0 00 0 0 1 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 1 0 0 00 0 0 0 0 0 1 1 10 0 0 0 0 0 1 0 00 0 0 0 0 0 0 1 00 0 0 0 0 0 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Fast computational tricks 36

yt = Sbt

Page 140: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchiesThink of the hierarchy as a tree of trees:

Total

T1 T2 . . . TK

Then the summing matrix contains k smaller summingmatrices:

S =

1′n1 1′n2 · · · 1′nKS1 0 · · · 00 S2 · · · 0... ... . . . ...0 0 · · · SK

where 1n is an n-vector of ones and tree Ti has ni terminalnodes.

Hierarchical Forecasting Fast computational tricks 37

Page 141: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchiesThink of the hierarchy as a tree of trees:

Total

T1 T2 . . . TK

Then the summing matrix contains k smaller summingmatrices:

S =

1′n1 1′n2 · · · 1′nKS1 0 · · · 00 S2 · · · 0... ... . . . ...0 0 · · · SK

where 1n is an n-vector of ones and tree Ti has ni terminalnodes.

Hierarchical Forecasting Fast computational tricks 37

Page 142: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchies

S′ΛS =

S′1Λ1S1 0 · · · 0

0 S′2Λ2S2 · · · 0... ... . . . ...0 0 · · · S′KΛKSK

+ λ0 Jn

λ0 is the top left element ofΛ;Λk is a block ofΛ, corresponding to tree Tk;Jn is a matrix of ones;n =

∑k nk.

Now apply the Sherman-Morrison formula . . .

Hierarchical Forecasting Fast computational tricks 38

Page 143: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchies

S′ΛS =

S′1Λ1S1 0 · · · 0

0 S′2Λ2S2 · · · 0... ... . . . ...0 0 · · · S′KΛKSK

+ λ0 Jn

λ0 is the top left element ofΛ;Λk is a block ofΛ, corresponding to tree Tk;Jn is a matrix of ones;n =

∑k nk.

Now apply the Sherman-Morrison formula . . .

Hierarchical Forecasting Fast computational tricks 38

Page 144: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchies

(S′ΛS)−1 =

(S′1Λ1S1)−1 0 · · · 0

0 (S′2Λ2S2)−1 · · · 0... ... . . . ...0 0 · · · (S′KΛKSK)−1

− cS0

S0 can be partitioned into K2 blocks, with the (k, `) block(of dimension nk × n`) being

(S′kΛkSk)−1Jnk,n`(S′`Λ`S`)−1

Jnk,n` is a nk × n` matrix of ones.c−1 = λ−10 +

∑k

1′nk(S′kΛkSk)−11nk .

Each S′kΛkSk can be inverted similarly.S′Λy can also be computed recursively.

Hierarchical Forecasting Fast computational tricks 39

Page 145: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: hierarchies

(S′ΛS)−1 =

(S′1Λ1S1)−1 0 · · · 0

0 (S′2Λ2S2)−1 · · · 0... ... . . . ...0 0 · · · (S′KΛKSK)−1

− cS0

S0 can be partitioned into K2 blocks, with the (k, `) block(of dimension nk × n`) being

(S′kΛkSk)−1Jnk,n`(S′`Λ`S`)−1

Jnk,n` is a nk × n` matrix of ones.c−1 = λ−10 +

∑k

1′nk(S′kΛkSk)−11nk .

Each S′kΛkSk can be inverted similarly.S′Λy can also be computed recursively.

Hierarchical Forecasting Fast computational tricks 39

The recursive calculations can be donein such a way that we never store any ofthe large matrices involved.

Page 146: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: grouped dataAX AY AZ ABX BY BZ BCX CY CZ CX Y Z Total

yt =

ytyA,tyB,tyC,tyX,tyY,tyZ,tyAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

=

1 1 1 1 1 1 1 1 11 1 1 0 0 0 0 0 00 0 0 1 1 1 0 0 00 0 0 0 0 0 1 1 11 0 0 1 0 0 1 0 00 1 0 0 1 0 0 1 00 0 1 0 0 1 0 0 11 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 00 0 1 0 0 0 0 0 00 0 0 1 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 1 0 0 00 0 0 0 0 0 1 0 00 0 0 0 0 0 0 1 00 0 0 0 0 0 0 0 1

︸ ︷︷ ︸

S

yAX,tyAY,tyAZ,tyBX,tyBY,tyBZ,tyCX,tyCY,tyCZ,t

︸ ︷︷ ︸

bt

Hierarchical Forecasting Fast computational tricks 40

yt = Sbt

Page 147: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: grouped data

S =

1′m ⊗ 1′n1′m ⊗ InIm ⊗ 1′nIm ⊗ In

S′ΛS = λ00 Jmn + (ΛR ⊗ Jn) + (Jm ⊗ΛC) +ΛU

ΛR,ΛC andΛU are diagonal matrices correspondingto rows, columns and unaggregated series;λ00 corresponds to aggregate.

Hierarchical Forecasting Fast computational tricks 41

m = number of rowsn = number of columns

Page 148: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: grouped data

S =

1′m ⊗ 1′n1′m ⊗ InIm ⊗ 1′nIm ⊗ In

S′ΛS = λ00 Jmn + (ΛR ⊗ Jn) + (Jm ⊗ΛC) +ΛU

ΛR,ΛC andΛU are diagonal matrices correspondingto rows, columns and unaggregated series;λ00 corresponds to aggregate.

Hierarchical Forecasting Fast computational tricks 41

m = number of rowsn = number of columns

Page 149: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: grouped data

(SΛS)−1 = A− A1mn1′mnA1/λ00 + 1′mnA1mn

A = Λ−1U −Λ−1U (Jm ⊗ D)Λ−1U − EM−1E′.D is diagonal with elements dj = λ0j/(1+ λ0j

∑i λ−1ij ).

E hasm×m blocks where eij has kth element

(eij)k =

{λ1/2i0 λ

−1ik − λ

1/2i0 λ

−2ik dk, i = j,

−λ1/2j0 λ−1ik λ

−1jk dk, i 6= j.

M ism×m with (i, j) element

(M)ij =

{1+ λi0

∑k λ−1ik − λi0

∑k λ−2ik dk, i = j,

−λ1/2i0 λ1/2j0

∑k λ−1ik λ

−1jk dk, i 6= j.

Hierarchical Forecasting Fast computational tricks 42

Page 150: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

Fast computation: grouped data

(SΛS)−1 = A− A1mn1′mnA1/λ00 + 1′mnA1mn

A = Λ−1U −Λ−1U (Jm ⊗ D)Λ−1U − EM−1E′.D is diagonal with elements dj = λ0j/(1+ λ0j

∑i λ−1ij ).

E hasm×m blocks where eij has kth element

(eij)k =

{λ1/2i0 λ

−1ik − λ

1/2i0 λ

−2ik dk, i = j,

−λ1/2j0 λ−1ik λ

−1jk dk, i 6= j.

M ism×m with (i, j) element

(M)ij =

{1+ λi0

∑k λ−1ik − λi0

∑k λ−2ik dk, i = j,

−λ1/2i0 λ1/2j0

∑k λ−1ik λ

−1jk dk, i 6= j.

Hierarchical Forecasting Fast computational tricks 42

Again, the calculations can be done insuch a way that we never store any ofthe large matrices involved.

Page 151: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

References

RJ Hyndman, RA Ahmed, G Athanasopoulos and HL Shang (2011). Optimalcombination forecasts for hierarchical time series. Computational Statistics& Data Analysis 55(9), 2579–2589.

RJ Hyndman, A Lee and E Wang (2016). Fast computation of reconciledforecasts for hierarchical and grouped time series. Computational Statistics& Data Analysis 97, 16–32

SL Wickramasuriya, G Athanasopoulos and RJ Hyndman (2015). Forecastinghierarchical and grouped time series through trace minimization. Workingpaper. Dept Econometrics & Business Statistics, Monash University

RJ Hyndman and G Athanasopoulos (2018). Forecasting: principles andpractice. 2nd ed. Melbourne, Australia: OTexts. OTexts.org/fpp2/.

Hierarchical Forecasting Fast computational tricks 43

Page 152: 2017 Beijing Workshop on Forecasting Hierarchical Forecasting · Spectacle sales Hierarchical Forecasting Hierarchical and grouped time series 8 Monthly UK sales data from 2000 –

R packages

Hierarchical Forecasting Fast computational tricks 44

https://github.com/earowang/tsibble

http://pkg.earo.me/sugrrants

https://github.com/mitchelloharawild/fasster

http://pkg.robjhyndman.com/forecast

http://pkg.earo.me/hts