37
Constant process Separate signal & noise Smooth the data: Backward smoother: At any give T, replace the observation yt by a combination of observations at & before T Simple smoother : replace the current observation with the best estimate for How to obtain it? Use the least squares criterion Smoothing t t y T t t E y SS 1 2 T t t y T 1 1 ˆ

Constant process

  • Upload
    lyle

  • View
    44

  • Download
    0

Embed Size (px)

DESCRIPTION

Smoothing . Constant process. Separate signal & noise. Smooth the data: . Backward smoother: At any give T, replace the observation yt by a combination of observations at & before T. Simple smoother : replace the current observation with the best estimate for . - PowerPoint PPT Presentation

Citation preview

Page 1: Constant process

Constant process tty

Separate signal & noise

Smooth the data:

Backward smoother: At any give T, replace the observation yt by a combination of observations at & before T

Simple smoother : replace the current observation with the best estimate for

How to obtain it? Use the least squares criterion

T

ttE ySS

1

2

T

ttyT 1

1

Smoothing

Page 2: Constant process

Not Constant process

T

ttyT 1

1Can we use ?

this smoother accumulates more and more data points and gains some sort of inertia

So it cannot react to the change

Obviously, if the process change, earlier data do not carry the information about the it

Use a smoother that disregards the old values and reacts faster to the change

Simple moving average

Page 3: Constant process

N

NTtt

NTTTT y

NNyyyM

1

11 1

Simple moving average

Choice of span N: -If N small :reacts faster to the change- large N:constant process

NMVar T

2

)(

The moving averages will be autocorrelated since 2 successive moving averages contain the same N-1 observations

NkNk

Nkk

,1

,0

Page 4: Constant process

First order exponential smoothing

Idea: give geometrically decreasing weights to the past observations

Obtain a smoother that reacts faster to the change

11

22

1

1

01 yyyyy T

TTT

T

tT

t

However,

111

0

TT

t

t

Adjust the smoother , by multiplying T

1)1(

112

21

1

0

1

1~

yyyy

yy

TTTT

T

ttT

tT

Simple or first order exponential smoother

Page 5: Constant process

1

12

21

11

22

1

~1

11

111~

TT

TTTT

TTTTTTT

yy

yyyy

yyyyyy

First-order exponential smoothing: linear combination of the current observation & the smoothed observation at the previous time unit

1

1

~)1(~

~1~

TTt

TTt

yyy

yyy

Discount factor : weight on the last observation : weight on the smoothed value of the previous observations

)1(

Page 6: Constant process

The initial value

Page 7: Constant process

The initial value 0~y

2 commonly used estimates of 0~y

10~ yy

yy 0~

If the changes in the process are expected to occur early & fast

If the process at the beginning is constant

Page 8: Constant process

The value of

As gets closer to 1, & more emphasis is given in the last observations : the smoothed values follow the original values more closely

0~~:0 yyT

TT yy ~:1

The smoothed values equal to a constant

The least smoothed version of the original time series

4.01.0 Values recommended

Choice of the smoothing constant:1 Subjective: depending of willingness to have fast adaptivity or more rigidity.2 Choice advocated by Brown (inventor of the method): λ = 0.73 Objective: constant chosen to minimize the sum of squared forecast errors

Page 9: Constant process

Use exponential smoothers for model estimation

tt tfy ;

tty 0

General class of models

e.g. constant process

T

ttE ySS

1

2

If not all observations have equal influence on the sum : introduce weights that geometrically decrease in time

1

0

20

*T

ttT

TE ySS

Take the derivative 0ˆ21

00

0

*

T

ttT

TE yddSS

The solution

1

00 1

1ˆT

ttT

tT y

For large T T

T

ttT

t yy ~)1(ˆ1

00

Page 10: Constant process

Second order exponential smoothingtt ty 10

t Uncorrelated with mean 0 & constant variance 2

Use single exponential smoothing: underestimate the actual values

Linear trend model

0

0

)(1

1~

ttT

t

ttT

tT

yE

yEyE

Given tyE t 10

0 0110

010

11

)(1~

t t

tt

t

tT

tT

tTyE

1

110

1

1~

T

T

yE

TyESimple exponential smoother:biased estimate for the linear trend model

Why?

bias

Page 11: Constant process

Solutions:

a) Use a large value

01:1

Smoothed values very close to the observed: fails to

satisfactorily smooth the data

b) Use a method based on adaptive updating of the discount factor

c) Use second order exponential smoothing

Page 12: Constant process

Apply simple exponential smoothing on Ty~

)2(1

)1()2( ~)1(~~ TTT yyy

)2()1( ~~2ˆ TTT yyy

Second order exponential smoothing

Unbiased estimate of yT

2 main issues: choice of initial values for the smoothers& the discount factors

Initial values

0,10,020

0,10,0)1(

0

ˆ12ˆ~

ˆ1ˆ~

y

y Estimate parameters through least squares

Page 13: Constant process

Holt’s Method

Lt =λyt +(1−α)(Lt−1+Tt−1)

Tt =β(Lt +Lt-1 )+(1−β)Tt-1

Ft+1=Lt+Tt

Divide time series into Level and Trend

yt = actual value in time t λ = constant-process smoothing constant β = trend-smoothing constant Lt = smoothed constant-process value for period t Tt = smoothed trend value for period tF = forecast value for period t + 1t = current time period

Page 14: Constant process

Use exponential smoothers for forecasting

At time T, we wish to forecast observation at time T+1, or at time

forecastaheadstepTyT ˆ

Constant Process

tty 0

0Can be estimated by the first-order exponential smoother

Forecast :TT yTy ~)(ˆ

TTT yyy ~1ˆ 11 At time T+1

)(ˆ1ˆ 11 Tyyy TTT

)1()1(ˆ

1ˆ)1(ˆ)(ˆ 11

TT

TTTT

eyyyyTy

)(ˆ)1( 11 Tyye TTT One-step-ahead forecast error

Page 15: Constant process

)1()1(ˆ

1ˆ)1(ˆ)(ˆ 11

TT

TTTT

eyyyyTy

Our forecast for the next observation is our previous forecast for the current observation plus a fraction of the forecast error we made in forecasting the current observation

Page 16: Constant process

Choice of

11

21

T

ttE eSS

Sum of the squared one-step-ahead forecast errors

Calculate for various values of

Pick the one that gives the smallest sum of squared forecast errors

Page 17: Constant process

Prediction Intervals

Constant process

eaT Zy ~2

Ty~ first-order exponential smoother

2aZ 100(1-a/2) percentile of the standard normal distribution

e Estimate of the standard deviation of the forecast errors

Page 18: Constant process

Linear Trend Process

forecastaheadstepTyT ˆ

TT

TTT

TTT

y

T

TTy

,1

,1,1,0

,1,0

ˆˆ

ˆˆˆ

ˆˆˆ

)2()1(

)2()1()2()1(

~1

1~1

2

~2~1

~~2ˆ

TT

TTTTT

yy

yyyyy

In terms of the exponential smoothers

Page 19: Constant process

Parameter Estimates

100(1-α/2) prediction intervals for any lead time τ

Page 20: Constant process

Estimation of the variance of the forecast errors, σe2

Assumptions: model correct & constant in time

Apply the model to the historic data & obtain the forecast errors

Update the variance of the forecast errors when have more data

Page 21: Constant process

Define mean absolute deviation Δ

Assuming that the model is correct

Page 22: Constant process

Model assessment

Check if the forecast errors are uncorrelated

Sample autocorrelation function of the forecast errors

Page 23: Constant process

Exponential Smoothing for Seasonal data

Seasonal Time Series

Lt: linear trend componentSt: seasonal adjustment s: the period of the length of cyclesεt: uncorrelated with mean zero & constant variance σε

2

Constraint:

Additive Seasonal Model

Page 24: Constant process

Forecasting

- Start from current observation yT

- Update the estimate LT

- Update the estimate of β1

- Update the estimate of St

- τ- step-ahead foreceast

Page 25: Constant process

Estimate the initial values of the smoother

Use least-squares

Page 26: Constant process

Exponential Smoothing for Seasonal data

Seasonal Time Series

Lt: linear trend componentSt: seasonal adjustment s: the period of the length of cyclesεt: uncorrelated with mean zero & constant variance σε

2

Constraint:

Multiplicative Seasonal Model

Page 27: Constant process

Forecasting

- Start from current observation yT

- Update the estimate LT

- Update the estimate of β1

- Update the estimate of St

- τ- step-ahead foreceast

Page 28: Constant process

Estimate the initial values of the smoother

From the historical data, obtain the initial values

Page 29: Constant process
Page 30: Constant process
Page 31: Constant process
Page 32: Constant process
Page 33: Constant process
Page 34: Constant process
Page 35: Constant process
Page 36: Constant process
Page 37: Constant process