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

Post on 29-May-2020

7 views 0 download

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

Hierarchical Forecasting 1

2017 Beijing Workshop onForecasting

HierarchicalForecasting

Rob J Hyndman

robjhyndman.com/beijing2017

Outline

1 Hierarchical and grouped time series

2 Forecast reconciliation

3 Fast computational tricks

Hierarchical Forecasting Hierarchical and grouped time series 2

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

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

Australian tourism demand

Hierarchical Forecasting Hierarchical and grouped time series 4

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

3. PBS sales

Hierarchical Forecasting Hierarchical and grouped time series 5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

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.

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.

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.

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.

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.

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

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

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

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

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

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

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

Outline

1 Hierarchical and grouped time series

2 Forecast reconciliation

3 Fast computational tricks

Hierarchical Forecasting Forecast reconciliation 17

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

Australian tourism

Hierarchical Forecasting Forecast reconciliation 30

Australian tourism

Hierarchical Forecasting Forecast reconciliation 30

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

Australian tourism

Hierarchical Forecasting Forecast reconciliation 30

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

Base forecastsETS (exponential smoothing)models

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

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

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

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

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

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

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

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

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

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

Forecast evaluation

Hierarchical Forecasting Forecast reconciliation 32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

time

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

Outline

1 Hierarchical and grouped time series

2 Forecast reconciliation

3 Fast computational tricks

Hierarchical Forecasting Fast computational tricks 34

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

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

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

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

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

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

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

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

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.

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

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

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

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

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.

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

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