some problems of periodic time series - artax

43
Dissertation summary Holt-Winters method with general seasonality Supervised theses, teaching References, contacts Some problems of periodic time series Dissertation progress report Tom´ s Hanz´ ak seminar Stochastic modeling in economics and finance February 28, 2011 Tom´ s Hanz´ ak Some problems of periodic time series

Upload: others

Post on 11-Feb-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

Some problems of periodic time seriesDissertation progress report

Tomas Hanzak

seminarStochastic modeling in economics and finance

February 28, 2011

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

Content

1 Dissertation summaryMy dissertation topicExpected content of the thesisPublications

2 Holt-Winters method with general seasonalityIntroductionGeneral seasonalityUseful special casesNumerical results

3 Supervised theses, teaching

4 References, contacts

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Basic information

Student’s name: Tomas Hanzak

Doctoral student since: October 2007

Study branch: m-5 Econometrics and operational research

Dissertation title: Some problems of periodic time series

Supervisor: prof. RNDr. Tomas Cipra, DrSc.

Supervising department: Dept. of Probability and Mathematical Statistics

Annotation:

The doctoral student will familiarize with some time series analysis methodswhich are modified to be applicable for time series with irregular observations.The stress will be put on modeling periodicity (seasonality) in these time series.The suggested methods will be transposed into the software form.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Looking back...

Topics of my previous presentations here:

1 2008, May 19: Improved Holt method for irregular time series

2 2009, March 16: Holt-Winters method with general seasonality

3 2010, March 22: Exponential smoothing for time series with outliers

4 2011, February 28: Summary, Holt-Winters method reminded

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Improved Holt method for irregular time series (1)

Wright (1986) suggested an extension of Holt method for irregular time series:

Stn+1 = (1− αtn+1) · [Stn + (tn+1 − tn) · Ttn ] + αtn+1 · ytn+1 ,

Ttn+1 = (1− γtn+1) · Ttn + γtn+1 ·Stn+1 − Stn

tn+1 − tn,

αtn+1 =αtn

αtn + (1− α)tn+1−tnand γtn+1 =

γtn

γtn + (1− γ)tn+1−tn.

The division by tn+1 − tn makes Ttn+1 very sensitive in the case thattn+1 − tn ≈ 0 ⇒ danger of slope estimate Ttn+1 destruction.

Suggested modification consists in a modified smoothing coefficient γtn+1 :

γtn+1 =γtn

γtn +tn−tn−1

tn+1−tn(1− γ)tn+1−tn

.

The modified method outperformed the original one in a simulation study.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Improved Holt method for irregular time series (2)

Visual illustration:

Forecasts and smoothed values obtained by the original and modified method(both with fixed α = 0.3 and γ = 0.1).

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Holt-Winters method with general seasonality

The paper suggests a generalization of widely used Holt-Winters smoothingand forecasting method for seasonal time series.

The general concept of seasonality modeling is introduced bothfor the additive and multiplicative case.

Several special cases are discussed, including a linear interpolation of seasonalindices and a usage of trigonometric functions.

Both methods are fully applicable for time series with irregularly observeddata (just the special case of missing observations was covered up to now).

Moreover, they sometimes outperform the classical Holt-Winters method evenfor regular time series.

A simulation study and real data examples compare the suggested methodswith the classical one.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Robust exponential smoothing

Occurrence of outliers in times series were discussed and conceptual approachesto this problem were listed.

Several particular methods were mentioned and described: Exponentialsmoothing in L1 norm, discounted M-estimation using IRLS and robustKalman filter for state space models.

Practically the robust Kalman filter can lead to error truncation:One-step-ahead forecasting error is truncated before entering intothe error-correction formulas of the method.

Forecasting errors scale estimator is needed to calibrate the truncation.E.g. GARCH(1, 1) approach can be used.

Error truncation methods were compared with M-estimation in a largesimulation study.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Irregularly observed ARIMA/SARIMA processes

Classical exponential smoothing methods (simple exponential smoothing,Holt method, Holt-Winters method) are MSE-optimal for certainARIMA/SARIMA models.

These models can be taken as a basis for model based approachto construction of extensions of these methods for time series with missingobservations.

Aldrin and Damsleth (1989) derived optimal smoothing coefficients for a caseof a single gap in observations for simple exponential smoothing(ARIMA(0, 1, 1)) and Holt method (ARIMA(0, 2, 2)).

Ratinger (1996) studied optimal smoothing coefficients for a case of a singlegap in observations for Holt-Winters method with additive seasonality(SARIMA model).

I derived optimal smoothing coefficients for a general time series withmissing observations for a simple exponential smoothing.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Expected content of the thesis

1 Introduction

2 Topic overview

2.1 Periodicity in time series2.2 Time series irregularities2.3 Overview of approaches

3 Exponential smoothing for irregular time series

3.1 Methods overview3.2 Improved Holt method for irregular time series3.3 Holt-Winters method with general seasonality

4 Irregularly observed ARIMA/SARIMA processes

5 Robust methods

5.1 Methods overview5.2 Error truncation

6 Summary

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Publications

P. Mach, T. Hanzak: Razebne ve spojitem case. Politicka ekonomie, 4,2004, 531–536.

T. Cipra, T. Hanzak: Exponential smoothing for irregular time series.Kybernetika 44 (2008), 385–399.

T. Hanzak: Improved Holt method for irregular time series. WDS’08Proceedings of Contributed Papers, Part I, 62–67, 2008.

T. Cipra, T. Hanzak : Exponential smoothing for time series with outliers.Accepted in Kybernetika.

T. Hanzak : Holt-Winters method with general seasonality.Accepted in Kybernetika.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

My dissertation topicExpected content of the thesisPublications

Observations, comments...

My paper about Holt-Winters method was rejected by three journals andthen finally accepted on the 4th try ⇒ optimism is needed!

I had a bad luck and faced the same reviewer (not excited about mypaper) twice. Misunderstanding by a reviewer will lead to rejectionof the paper ⇒ be explanatory, give references etc. Try to cite potentialreviewers and editors in your paper.

Reply from Appl. Math.: ”...clanek nebude publikovan v casopise Appl.Math; stylove totiz nezapada do AM v tom smyslu, ze publikujeme clankyrozclenene do tvrzeni a jejich dukazu, lemmat, definic, atd.”

One Mathematics student from Chile found my previous seminarpresentation and asked me for consultancy to his problem (make forecastsin a hourly time series of passenger demand for interurban bus line).

For me, it is very refreshing to face problems from practice. Unfortunately,”practice” often does not respect the topic of my dissertation...

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Seasonal time series

Seasonality = tendency of a certain pattern to repeat over a fixed timeinterval called season length or period.

Most of time series in practice are seasonal, containing e.g. annual, weeklyor daily seasonality:

Annual seasonality is caused by alternation of seasons, annual festivalsand holidays or legislation.

Weekly seasonality naturally comes from alternating of working days andweekends.

Daily seasonality is caused by a regular switch between day and nighttime, regular working or opening hours etc.

The exact period is known in most cases (as above). Sometimes one time serieshas multiple seasonal components with different periods.

We distinguish basically between additive and multiplicative seasonalitydepending on in which manner the seasonal component is composedwith the trend.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Seasonal indices vs. trigonometric functions

Special methods are used to detect seasonality and to model, smooth andforecast seasonal time series. In general, two basic ideas are used in all thesesituations:

Seasonal indices

XEasy to implement and interpret, any seasonal pattern (even a very non-smooth,with sharp peaks etc.) can be modeled.

x Large number of parameters needed (danger of overparametrization, sometimeslow statistical significance), worse performance in case that the seasonal pattern isof a certain special form (this information is not used), problems with out of gridobservations.

Trigonometric functions

XStill sufficiently rich class of seasonal patterns can be created using a lower numberof parameters (better statistical significance). Obtained seasonal pattern is continuousby its nature (ideal for irregular time series).

x More difficult to implement and interpret. Problems with modeling non-smoothseasonal patterns with sharp peaks.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Insertion: Fisher’s test for periodicity

Testing a null hypothesis that the analyzed time series {yt} of length N isa gaussian white noise against the alternative that it has a deterministicperiodic component (of unknown length).

The test statistic is

g =maxj=1,...,m I (ωj)Pm

j=1 I (ωj),

where I (ωj) is periodogram of {yt} evaluated at frequency ωj = 2πjN

and m isa lower integer part of (N − 1)/2.

It considers just the periods of lengths N/j for j = 1, 2, . . .. When N is notan integer multiple the of actual period, the test has a very limited power.

Adding one more observation to the current series ⇒ N changes to N + 1 ⇒all the considered ωj ’s are changed ⇒ we can get totaly different test result.

Usually we suspect certain period lengths (e.g. the integer ones) which wewould like {yt} to be tested against.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Classical Holt-Winters method

Let {yt , t ∈ Z} be a regular time series with locally linear trend and additiveseasonality of period p ≥ 2. We consider its level Lt , slope Tt and seasonalindex St at time t.

The forecast yt+τ (t) of yt+τ , τ > 0 from time t is of the logical form

yt+τ (t) = Lt + τ · Tt + St⊕τ ,

where t ⊕ τ = t + 1− p + [(τ − 1) mod p].

After a new observation yt+1 becomes available, the level, slope and seasonalindex are updated using the recurrent formulas (in their error-correction form)

Lt+1 = Lt + Tt + α · et+1 ,

Tt+1 = Tt + α · γ · et+1 ,

St+1 = St−p + (1− α) · δ · et+1 ,

where et+1 = yt+1 − yt+1(t) is the one-step-ahead forecasting error at timet + 1 and α, γ, δ ∈ (0, 1) are the smoothing constants.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

H-W method and irregular time series

Holt-Winters method uses seasonal indices to deal with seasonality, i.e. itworks with p different indices to form the actual seasonal pattern.

As a consequence, Holt-Winters method gains all the advantages and alsosuffers all the troubles connected with using seasonal indices.

One important fact on which the usage of seasonal indices relies, is that eachobservation can be assigned to exactly one of p calendar units formingthe complete season.

This is still possible in a time series with missing observations, seeCipra et al. (1995) for such an extension of Holt-Winters method. Butthe calendar assignment is not possible in general irregular time series.

We can use an interpolation of seasonal indices to treat the inter-calendarobservations. The other possibility is to use trigonometric functions which canprevent us also from another disadvantages of seasonal indices.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

General seasonality modeling

Seasonality can be generally modeled using K ≥ 1 different real-valuedfunctions f1, f2, . . . , fK , all defined on the whole real line R. Each fk is supposedto be periodic with a specific period pk ∈ (0, +∞).

The seasonal pattern is formed as a linear combination of fk :

St =KX

k=1

Ak · fk(t) ,

where t ∈ R is time and Ak ∈ R are appropriate amplitudes.

In the case of an additive seasonality, this St is then added to the time serieslevel to create the smoothed values and forecasts:

yt = Lt + St .

To get a multiplicative seasonality, we put yt = Lt · exp[St ].

We suppose fk just to be bounded. One can take functions fk centered to 0in a certain sense. It is also reasonable (but not necessary) for fk to be linearlyindependent.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

H-W method with general seasonality modeling

Let {ytn , n ∈ Z}, tn+1 > tn, be an irregular seasonal time series with locallinear trend and additive seasonality. We consider its level Ltn , slope Ttn andseasonal component

Stn (t) =KX

k=1

Aktn · fk(t)

at time tn. Here Aktn are adaptive amplitudes at time tn.

The forecast ytn+τ (tn) of ytn+τ , τ > 0 from time tn:

ytn+τ (tn) = Ltn + τ · Ttn + Stn (tn + τ)

After a new observation ytn+1 becomes available, L, T and Ak are updated:

Ltn+1 = Ltn + (tn+1 − tn)Ttn + αtn+1etn+1 ,

Ttn+1 = Ttn + αtn+1γtn+1etn+1/(tn+1 − tn) ,

Aktn+1

= Aktn + (1− αtn+1)δ

ktn+1

etn+1/fk(tn+1) , k = 1, . . . , K .

where etn+1 = ytn+1 − ytn+τ (tn). The smoothing coefficients αtn+1 , γtn+1 andδktn+1

will be defined on the next slide.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Smoothing coefficients αtn and γtn

Variable smoothing coefficient αtn for level is updated in a recurrent wayexactly as in Wright (1896) or Cipra et al. (1995):

αtn+1 =αtn

αtn + (1− α)tn+1−tn,

where α ∈ (0, 1) is the smoothing constant for level.

For the smoothing coefficient γtn for slope, we will use a modified updatingformula robust to time close observations problem:

γtn+1 =γtn

γtn +tn−tn−1

tn+1−tn(1− γ)tn+1−tn

,

where γ ∈ (0, 1) is the smoothing constant for slope.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Smoothing coefficients δktn

I

Variable smoothing coefficients δktn for the seasonal amplitudes are also

updated in a recurrent way.

We consider K different smoothing constants δk ∈ (0, 1) belonging to eachof the functions fk and their amplitudes Ak

tn .

For k = 1, . . . , K let us denote

W ktn =

+∞Xj=0

�1− δk

�tn−tn−jhf k(tn−j)

i2.

Obviously W ktn can be easily updated recurrently:

W ktn+1

=�1− δk

�tn+1−tn·W k

tn +hf k(tn+1)

i2.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Smoothing coefficients δktn

II

For k = 1, . . . , K , let us further denote the dimensionless quantities

∆ktn+1

≡ f 2k (tn+1) / W k

tn+1∈ [0, 1] .

Further let us denote

∆tn+1 ≡ 1−YK

k=1

�1−∆k

tn+1

�∈ [0, 1] ,

Dtn+1 ≡XK

k=1∆k

tn+1≥ 0 .

Finally take the values of the needed smoothing coefficients as

δktn+1

≡∆tn+1

Dtn+1

·∆ktn+1

∈ [0, 1] , k = 1, . . . , K .

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Smoothing coefficients δktn

III

Smoothing coefficients δktn+1

as defined above have reasonable properties:

By Aktn+1

update we move from ytn+1(tn) closer to ytn+1 . Summing the kmovements, we come to Stn+1(tn+1) = Stn (tn+1) + (1− αtn+1)∆tn+1etn+1 .So the total portion of etn+1 absorbed by seasonals is(1− αtn+1)∆tn+1 ∈ [0, 1].

The error etn+1 is absorbed more to fk with higher δk (i.e. it has reallythe meaning of a smoothing constant) and with f 2

k (tn+1) largercompared to its recent values.

If fk(tn+1) → 0 then (ceteris paribus) δktn+1

/fk(tn+1) → 0. This means thatwe do not need to worry about values of fk near to 0.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Inspiration from DLS linear regression

Let us consider a discounted least squares (DLS) estimation of parametersin the linear regression model yt =

PKk=1 Ak fk(t) (without an absolute term)

with discount factor 1− δ ∈ (0, 1).

Denote Aktn the estimates based on data for t = . . . , tn−2, tn−1, tn. Further

denote ytn+1(tn) =PK

k=1 Aktn fk(tn+1) the forecast of ytn+1 and

etn+1 = ytn+1 − ytn+1(tn) the forecasting error.

Let Aktn+1

be the estimates of Ak based on the extended data set up to time

tn+1. Denote ytn+1 =PK

k=1 Aktn+1

fk(tn+1). We can write

Aktn+1

= Aktn + ∆k

tn+1etn+1/fk(tn+1)

for some ∆ktn+1

∈ R.

Given that the left side matrix of the normal system for DLS estimation usingdata up to tn+1 is diagonal (i.e. the regressors are orthogonal), we get

∆ktn+1

= f 2k (tn+1) / W k

tn+1

with W ktn+1

defined as before. But this is our formula for ∆ktn+1

.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Multiplicative seasonality

Up to now we have considered only additive seasonality. To getthe multiplicative seasonality, one just has to replace the prediction formulawith

ytn+τ (tn) = [Ltn + τ · Ttn ] · exp [Stn (tn + τ)] .

The recurrent formula for the amplitudes update is now simply changed to

Aktn+1

= Aktn + (1− αtn+1)δ

ktn+1

[ln ytn+1 − ln ytn+1(tn)] /fk(tn+1) , k = 1, . . . , K .

So just the exponential and logarithm transformations must be placed correctlyinto two formulas of the method.

Of course we must be sure that both all the observations and forecasts arepositive.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Practical implementation

To apply successfully the above described smoothing and forecasting method,one must necessarily deal with the following tasks:

To choose suitable seasonality modeling functions fk , specially theirnumber K , depending on the nature of the seasonal pattern. Generallywith higher K we are able to model more precisely even complicatedpatterns but we must beware of over-fitting.

To choose the values of K + 2 smoothing constants α, γ and δk ,k = 1, . . . , K . It seems reasonable to reduce the number of parametersby taking δk ≡ δ. The three constants α, γ and δ can be searchednumerically over the unit cube (0, 1]3.

To set up the initial values L0, T0, α0, δ0, Ak0 and W k

0 before runningthe recursive computation. We recommend using the general approachof backcasting (backward forecasting).

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Classical Holt-Winters method

To get the classical Holt-Winters method (for regular time series) withseasonal indices and period p ≥ 2 we simply take K = p and

fk(t) =

�1 if (t mod p) = k ,0 otherwise .

So f k are the indicators of individual calendar units and it is pk = p for allk = 1, . . . , K . Finally take δk = δ for k = 1, . . . , K .

We get the smoothing coefficients for the seasonal indices in a trivial form:

δkt =

�1− (1− δ)p if (t mod p) = k ,0 otherwise .

So only one amplitude Ak (belonging to the actual calendar unit of t) isupdated in one time step.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

H-W method with missing observations

By taking the functions f k and the smoothing constants δk exactly the sameas in the classical Holt-Winters method and just allowing the analyzedtime series y to have missing observations, we come to the same formulasas Cipra et al. (1995).

Only one amplitude Ak (belonging to the actual calendar unit of t) is updatedin one time step. But now the non-zero smoothing coefficient vary stepby step. Its value is determined by the value of the corresponding W k statistic,containing the information about the time structure of the series whenthe current calendar unit is concerned.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Interpolated seasonal indices

To treat time series with general time irregularity, we must extendthe seasonal indices to cover also the inter-calendar observations.

This can be done by a linear interpolation of the neighboring indices:

fk(t) =

�1−min

j∈Z

����K · (t − o)

p− (j · K + k)

�����+

.

Classical method: K = p and o = 0. It is an extension of the methodfor missing observations from Cipra et al. (1995).

Shifted seasonal indices: K = p and o = 0.5. All the observations areshifted by 0.5 so they are all treated as inter-calendar. Always the twosurrounding indices are composed (by their simple arithmetic average)to form the corresponding seasonal component.

Sparse seasonal indices: K = p/2 together with o = 0 or o = 1. This issuitable for large p and relatively smooth seasonal pattern.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Trigonometric functions

The seasonal pattern will be composed from several harmonic curvesof different periods. We will always involve sine and cosine function of the sameperiod. The periods will be taken as p, p

2, p

3, p

4, . . .

For example, when K = 4 (only even values of K are used), we define

f1(t) = sin2πt

p, f2(t) = cos

2πt

p, f3(t) = sin

4πt

p, f4(t) = cos

4πt

p.

The user just have to specify the value of h = K/2, i.e. how many fullharmonic to use.

Sometimes even h = 1 can give good results. The values h = 2 or 3 areapplicable in most cases while with h = 4 even quite complicated seasonalpattern can be managed (of course the reasonable values for h are limited fromabove).

Let us notice that the trigonometric functions fk are centered to 0, linearlyindependent and approximately orthogonal.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Further possibilities

Chatfield and Yar (1988) mention the possibility to normalizethe seasonal indices in Holt-Winters method to ensure that they alwayssum up to 0. We can employ such a normalizing in our general seasonalityconcept.

Often there are multiple seasonal components present in the series.Example: yearly, weekly and daily seasonality in hourly TV audience,electricity demand or SMS traffic series. This can also be representedin our general seasonality concept.

We can even consider non-periodic functions fk without any problems.E.g. all Sundays and public holidays can be marked as belonging to onecalendar unit in a weekly seasonality.

Exponentially decaying function f can be used to form an autocorrelatedcyclical component in any exponential smoothing method.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Real data examples - data and methods

We have downloaded five regular monthly time series (i.e. containing annualseasonality, p = 12):

1 AIR - Monthly international airline passengers, 1949-1960 (144 obs.);

2 TEMP - NY City monthly average temperatures, 1946-1959 (168 obs.);

3 GAS - Iowa monthly residential gas usage, 1971-1979 (106 obs.);

4 LEVEL - Lake Erie, monthly levels, 1921-1970 (600 obs.);

5 FLOW - Tree River, mean monthly flows, 1969-1976 (96 obs.).

For AIR, GAS and FLOW we use a multiplicative seasonality, for TEMP andLEVEL the additive seasonality is used in all four methods.

The smoothing constants α, γ and δ and (if needed) the number h of fullharmonics are optimized with respect to RMSE based on one-step-aheadforecasting errors through the whole series.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Real data examples - results

Achieved minimal in-sample RMSE, forecasting errors autocorrelation ρe andthe optimal value of h.

Classical H-W Shifted indices Sparse indices Trigonometric

Series RMSE ρe RMSE ρe RMSE ρe h RMSE ρe

AIR 10.69 .237 10.25 -.124 16.44 -.126 5 10.41 .203TEMP 0.740 .180 0.693 .114 0.799 -.181 1 0.713 -.121GAS 18.58 .385 16.99 .359 19.53 .168 3 16.92 .350

LEVEL 0.445 .333 0.424 .243 0.465 .100 2 0.440 .440FLOW 15.02 .453 13.31 .200 14.85 .155 3 13.39 .314

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Real data examples - AIR series

AIR series: multiplicative Holt-Winters method with 5 full harmonics.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Real data examples - FLOW series

FLOW series: multiplicative Holt-Winters method with 3 full harmonics.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Real data examples - TEMP series

TEMP series: additive Holt-Winters method with 1 full harmonic.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Simulation study - setup

yt = Lt + St + εt , εt ∼ iid N(0, 1) ,

Lt = Lt−1 + µt , µt ∼ iid N(0, 0.12) ,

St = (1− ν) · (St−1 + St−p − St−p−1)− ν ·Xt−1

j=t−p+1Sj + πt , πt ∼ iid N(0, 1)

with {πt}, {µt} and {εt} mutually independent. The parameter ν ∈ [0, 1] rulesthe normalization of S to sum up to 0 and the smoothness of the seasonalpattern (lower ν creates a smoother pattern).

For a given p ∈ {7, 12, 24}, we simulate time series of length 21p. The first10 periods are thrown away. The next 10 periods are used to optimizethe smoothing constants α and δ and h in order to minimize in-sample RMSEof one-step-ahead forecasting errors (we use γ = 0.05 fixed).

The last period is used to calculate out-of-sample RMSE from all the possiblep(p + 1)/2 forecasting errors.

For each p we use ν = 0.05, 0.1 and 0.2 and for each combination of p and νwe simulate 100 time series.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

IntroductionGeneral seasonalityUseful special casesNumerical results

Simulation study - results

Average out-of-sample RMSE and average ranking of the three methods tested.

Classical H-W Shifted indices Trigonometric

p ν RMSE ranking RMSE ranking RMSE ranking

7 0.05 2.910 1.88 2.786 1.94 2.932 2.177 0.1 2.761 1.91 2.624 1.85 2.785 2.247 0.2 2.195 2.01 2.185 2.17 2.119 1.82

12 0.05 3.626 2.11 3.347 1.77 3.579 2.1212 0.1 3.551 2.04 3.180 1.95 3.120 2.0112 0.2 2.291 1.86 2.243 1.80 2.361 2.34

24 0.05 7.294 2.21 3.246 1.45 4.402 2.3424 0.1 4.023 2.12 2.870 1.46 3.788 2.4224 0.2 2.189 1.48 2.222 1.76 2.635 2.76

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

Supervised bachelor thesesSupervised diploma thesesTeaching

Supervised bachelor theses

Jakub Mikulka: Exponential smoothing. Assigned in November 2007,defended in September 2008.

David Curda: Some problems of exponential smoothing. Assignedin November 2008, defended in September 2010.

Magdalena Zvejskova: Statistical error in representative samples frompopulation. Assigned in November 2009, defended in June 2010.

Marketa Ondruskova: Estimation and goodness-of-fit criteria in logisticregression model. Assigned in November 2009, defence planned to June2011.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

Supervised bachelor thesesSupervised diploma thesesTeaching

Supervised diploma theses

Aleh Masaila: Regression trees

The development of computer technologies provides us many new methods forobtaining useful information from available data. One of such methods are so calledregression trees. The aim of the diploma thesis will be to describe this method as analternative to other techniques used for identification and estimation of the influence ofthe independent variables on the dependent variable (e.g. linear or logistic regression,discriminant analysis etc.). The focus will be put on identification of the weaknessesand strengths of different approaches and their comparison. A demonstration of thepractical application of regression trees on a selected data set will be part of the work.

Ivana Menhartova: Methods of dynamical analysis of portfolio composition

Diplomantka popıse problem dynamicke analyzy slozenı portfolia na zaklade jehopozorovanych vynosu. Predstavı existujıcı metody resenı tohoto problemu (rolujıcıregrese a Kalmanuv filtr), ktere otestuje na realnych, simulovanych ci umelevytvorenych datech. Vysledky bude podrobne analyzovat a interpretovat a poukazena slabe a silne stranky jednotlivych metod v ruznych situacıch. Cılem bude navrhnoutvhodne modifikace existujıcıch metod tak, aby bylo dosazeno co nejlepsıch vysledkuz hlediska porovnanı odhadovaneho a skutecneho vyvoje slozenı portfolia v case.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

Supervised bachelor thesesSupervised diploma thesesTeaching

Teaching

Winter term 2010/11: Probability and statistics (NMAI059).

One group of exercises for informatics students.

Summer term 2010/11: Time series - exercises (NSTP007).

One group of exercises (optional for attendants of the lecture).

Summer term 2010/11: Credit risk in banking (NFAP042).

Lecture shared with Milos Kopa.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

ReferencesContacts

References

M. Aldrin, E. Damsleth : Forecasting non-seasonal time serieswith missing observations. J. Forecasting 8 (1989), 97–116.

C. Chatfield, M. Yar : Holt-Winters Forecasting: Some Practical Issues.The Statistician, Vol. 37, No. 2 (1988), 129–140.

T. Cipra, J. Trujillo, A. Rubio : Holt-Winters method with missingobservations. Manag. Sci. 41 (1995), 174–8.

T. Ratinger : Seasonal time series with missing observations. Appl. Math.41 (1996), 41–55.

D.J. Wright : Forecasting data published at irregular time intervals usingextension of Holt’s method. Manag. Sci. 32 (1986), 499–510.

Tomas Hanzak Some problems of periodic time series

Dissertation summaryHolt-Winters method with general seasonality

Supervised theses, teachingReferences, contacts

ReferencesContacts

Contacts

Tomas Hanzak

mobile: 604 799 879e-mail: [email protected]: www.thanzak.sweb.cz

Department of Probability and Mathematical StatisticsFaculty of Mathematics and PhysicsCharles University in Prague

Sokolovska 83, 186 75 Praha 8.

e-mail: [email protected]: www.karlin.mff.cuni.cz/ kpms

MEDIARESEARCH, a.s.

Ceskobratrska 1, 130 00 Praha 3.

mobile: 725 535 535e-mail: [email protected]: www.mediaresearch.cz

Tomas Hanzak Some problems of periodic time series