程序代写代做代考 go Economics 430

Economics 430
Lecture 3
Modeling and Forecasting Seasonality
1

Today’s Class
• Seasonality Characteristics • Modeling Seasonality
• Forecasting Seasonality
• Forecasting Performance
• Example: Forecasting Housing Starts • R Example
• White Noise
– White Noise Example
2

Time Series Components
• Additive:yt =St +Tt +Rt
– Good when the seasonal fluctuations do not vary
much with time.
– Seasonally adjusted Series: yadjusted = yt – St
• Multiplicative: yt = St × Tt × Rt
– Good when the seasonal fluctuations vary with
time.
– Seasonally adjusted Series: yadjusted = yt / St
3

Example: Number of New Orders of Electrical Equipment
4

5

6

Seasonality Characteristics 1 of 3
• Seasonal Pattern: Is a pattern that repeats itself every year.
• Deterministic Seasonality: When the annual repetition is exact.
• Stochastic Seasonality: When the annual repetition is approximate.
• Sources of Seasonality: links to the calendar, technologies, preferences, institutions, etc.
7

Seasonality Characteristics 2 of 3
US Census Bureau Data
Year
8
Monthly Retail Sales (billion $)

Seasonality Characteristics 3 of 3
• Seasonally Adjustment: Removal of seasonality.
• Nonseasonal Fluctuations: Fluctuations left in the seasonally adjusted time series.
9

Modeling Seasonality 1 of 3
• Preliminary Definitions:
– s: Number of observations on a series in each year (e.g.,
quarterly data (s=4), monthly (s=12), weekly (s=52),…,etc.).
– Seasonal Dummy Variables (Di): Indicate which season we are
in. For example, in the case of four seasons, we have 4
quarters:
D1 =(1,0,0,0,1,0,0,0,1,0,0,0,…) D2 =(0,1,0,0,0,1,0,0,0,1,0,0,…) D3 =(0,0,1,0,0,0,1,0,0,0,1,0,…) D4 =(0,0,0,1,0,0,0,1,0,0,0,1,…)
– Seasonal Factors ( γi): Summarize the seasonal pattern over the year. 10

Modeling Seasonality 2 of 3
• PureSeasonalDummyModel:
• SeasonalDummyModelincludingLinearTrend:
11

Modeling Seasonality 3 of 3
• Seasonal Dummy Model including Linear Trend and Holiday Variation: Holidays’ dates change over time.
=1 if the month contains e.g., Easter, and =0 otherwise.
• Seasonal Dummy Model including Linear Trend, Holiday Variation, and Trading-day Variation: Different months contain different numbers of trading days, or business days.
12

Forecasting Seasonality 1 of 2
• Example (Point Forecast): Initially at T, and want to use a seasonal model to forecast the h-step-ahead value.
• Assume a full seasonal model:
• At time T+h:
• Point Forecast: Project the right side of the equation on ΩT .
• Use Parameter Estimates
13

Forecasting Seasonality 2 of 2
• Example (Interval Forecast): Same idea as before. Assume the regression disturbance is normally distributed, then:
• Interval Forecast:
• In practice, use:
• Example (Density Forecast): Same idea, yet again!
• Density Forecast:
• In practice, use:
14

Forecasting Performance 1 of 2
Mean Forecast Error (MFE or Bias): Measures average deviation of forecast from actuals.
Mean Absolute Deviation (MAD): Measures average absolute deviation of forecast from actuals.
Mean Absolute Percentage Error (MAPE): Measures absolute error as a percentage of the forecast.
Standard Squared Error (MSE): Measures variance of forecast error.
15

Forecasting Housing Starts 1 of 3
16

Forecasting Housing Starts 2 of 3
(γi )
Trend
17

Forecasting Housing Starts 3 of 3
(γi )
Peak at May
Decline in Nov & Dec
Low seasonal effects in Feb
Residuals
18

White Noise 1 of 3
• Time Series Process: Let y denote the observed series of interest.
Where εt (“shock”) is uncorrelated over time. Therefore, yt and εt are serially uncorrelated.
• White Noise: Time series process with zero mean, constant variance, and no serial correlation.
and
19

White Noise 2 of 3
• GaussianWhiteNoise:Ifyisseriallyuncorrelated and normally distributed, and thus, serially independent .
Time
Displacement
20
Process
ACF

White Noise 3 of 3
• Given: E(yt)=0andvar(yt)=σ2 • However, recall that σ2 = γ(0)
σ2, k =0 0, k ≥ 1
and
1, k =0 0, k ≥ 1
γ(k) =
Autocovariance Function
ρ(k) = Autocorrelation Function
Note 1: Please solve problems 3 and 4 from Chapter 7b. ***Fanghua will go over them*** Note 2: Please review conditional means and conditional variances (see e.g., page 122b).
1, k =0 0, k ≥ 1
p(k) =
Partial Autocovariance Function
21

The Lag Operator (Review)
• Recall:Distributedlagofcurrentandpastshocks:
• Example:Useawhite-noiseprocesstoconstructa more complex time series:
,
22

White Noise Example (Moving Average)
• Example: Suppose you win $1 if a fair coin shows heads and loose $1 if it shows tails.
– Denote the outcome on toss t by εt (i.e., for toss t, εt is either +$1 or -$1).
– If you want to keep track of your ‘hot streaks’, you can e.g., calculate your average winnings on the last four tosses. For each coin toss 𝑡𝑡, your average payoff on the last four tosses is:
23

White Noise Example (Moving Average)
– Case 1: We can set e.g., βi = 1⁄4 for i≤3.
– Case 2: We can set e.g., β0 =1, β1=0.5, and all other βi
=0.
– For this case, although the {εt} sequence is a white- noise process, the constructed {xt} sequence will not be a white-noise process if two or more of the βi differ from 0.
– E[xt] = E[εt + 0.5εt-1] = 0 and
– var[xt] = var[εt + 0.5εt-1] = 1.25σ2
– cov(xt, xt-1) = 0.5σ2 ≠ 0 {xt} is not a white noise process!
White-noise conditions are satisfied.
Note: Case 2 is known as an ‘MA(1)’ Process
24

Estimation and Inference 2 of 3
• Q: How can we assess whether a series is reasonably approximated as white noise?
• A: If the series is white noise, then for large samples:
The sample autocorrelations are unbiased estimators of the true autocorrelations.
Square both sides
25