Top Banner
Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Week 5 Quantitative Analysis of Financial Markets Modeling and Forecasting Trend Christopher Ting Christopher Ting http://www.mysmu.edu/faculty/christophert/ k: [email protected] T: 6828 0364 : LKCSB 5036 November 1, 2017 Christopher Ting QF 603 November 1, 2017 1/21
21

Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

May 11, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Week 5Quantitative Analysis of Financial Markets

Modeling and Forecasting Trend

Christopher Ting

Christopher Ting

http://www.mysmu.edu/faculty/christophert/

k: [email protected]: 6828 0364

ÿ: LKCSB 5036

November 1, 2017

Christopher Ting QF 603 November 1, 2017 1/21

Page 2: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Table of Contents

1 Introduction

2 Modeling Trend

3 Estimating Trend Models

4 Forecasting Models

5 Akaike and Schwarz Criteria

6 Takeaways

Christopher Ting QF 603 November 1, 2017 2/21

Page 3: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

An Example of Trend

a Is it a linear, quadratic, or generally nonlinear trend?

a Can the trend be modeled? How?

a How can we use the model to forecast future value?

Christopher Ting QF 603 November 1, 2017 3/21

Page 4: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

QA-10 Modeling and Forecasting Trend

Chapter 5.Francis X. Diebold, Elements of Forecasting, 4th Edition (Mason, Ohio: CengageLearning, 2006).

a Describe linear and nonlinear trends.

a Describe trend models to estimate and forecast trends.

a Compare and evaluate model selection criteria, including meansquared error (MSE), s2 (unbiased variance of residuals), theAkaike information criterion (AIC), and the Schwarz informationcriterion (SIC).

a Explain the necessary conditions for a model selection criterion todemonstrate consistency.

Christopher Ting QF 603 November 1, 2017 4/21

Page 5: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Modeling with TIME

b Model 1: Trendt is a simple linear function of time

Trendt = β0 + β1TIMEt,

b The (deterministic) variable TIME is constructed artificially and iscalled a time trend or time dummy.

b TIMEt = t, where t = 1, 2, . . . , T .

b β0 is the regression intercept; it’s the value of the trend at t = 0.

b β1 is the regression slopepositive if the trend is increasingnegative if the trend is decreasing.

Christopher Ting QF 603 November 1, 2017 5/21

Page 6: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Quadratic

b Model 1: Trendt is a quadratic function of time

Trendt = β0 + β1TIMEt + β2TIME2t .

b β1 > 0 and β2 > 0: the trend is monotonically increasing.

b β1 < 0 and β2 < 0: the trend is monotonically decreasing.

b β1 < 0 and β2 > 0: the trend has a U shape.

b β1 > 0 and β2 < 0: the trend has an inverted U shape.

Christopher Ting QF 603 November 1, 2017 6/21

Page 7: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Trend of Constant Growth

b If trend is characterized by constant growth at rate, then we canwrite

Trendt = β0 eβ1TIMEt .

b The trend is a nonlinear (exponential) function of time in levels, butin logarithms we have

ln(Trendt

)= ln(β0) + β1TIMEt.

Thus, ln(Trendt

)is a linear function of time.

Christopher Ting QF 603 November 1, 2017 7/21

Page 8: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Estimation

g Least squares proceeds by finding the argument (in this case, thevalue of θ) that minimizes the sum of squared residuals.

g Thus, the least squares estimator is the “argmin” of the sum ofsquared residuals function.

θ = argminθ

T∑t=1

(yt − Trendt(θ)

)2,

where θ denotes the set of parameters to be estimated.

Christopher Ting QF 603 November 1, 2017 8/21

Page 9: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Estimation of Linear Trends

g Linear trend

(β0, β1

)= argmin

β0,β1

T∑t=1

(yt − β0 − β1TIMEt

)2.

g Quadratic trend

(β0, β1, β2

)= argmin

β0,β1,β2

T∑t=1

(yt − β0 − β1TIMEt − β2TIME2

t

)2.

g Log linear trend

(β0, β1

)= argmin

β0,β1

T∑t=1

(ln yt − lnβ0 − β1TIMEt

)2.

Christopher Ting QF 603 November 1, 2017 9/21

Page 10: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Forecast

d The linear trend model, which holds for any time t, is

yt = β0 + β1TIMEt + εt.

d At time T + h, the future time of interest, the forecast made at T is

yT+h = β0 + β1TIMET+h + εT+h.

d Key idea: TIMET+h is known at time T , because theartificially-constructed time variable is perfectly predictable;specifically,

TIMET+h = T + h.

d The point forecast is for time T + h and is made at time T .

yT+h,T = β0 + β1TIMET+h.

Christopher Ting QF 603 November 1, 2017 10/21

Page 11: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Forecast in Practice

d Replace unknown parameters with their least squares estimates,yielding the point estimate:

yT+h,T = β0 + β1TIMET+h.

d To form an interval forecast with 95% confidence, we useyT+h,T ± 1.96σ, where σ is the standard error of the trendregression.

d To form a density forecast, we again assume that the trendregression disturbance is normally distributed

N(yT+h,T , σ

2).

Christopher Ting QF 603 November 1, 2017 11/21

Page 12: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Motivating Questions and Problems

E How do we select among them when fitting a trend to a specificseries?

E What are the consequences, for example, of fitting a number oftrend models and selecting the model with highest R2?

E It turns out that model-selection strategies such as selecting themodel with highest R2 do not produce good out-of-sampleforecasting models.

E In-sample overfitting and data miningincluding more variables in a forecasting model won’t necessarilyimprove its out-of-sample forecasting performance

Christopher Ting QF 603 November 1, 2017 12/21

Page 13: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Mean Squared Error (MSE)

E Fitted Model 1yt := β0 + β1TIMEt.

E Erroret := yt − yt,

E Definition of MSE

MSE :=

T∑t=1

e2t

T,

where T is the sample size.

Christopher Ting QF 603 November 1, 2017 13/21

Page 14: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

R2 and Mean Squared Error

E MSE’s connection with R2

R2 = 1−

T∑t=1

e2t

T∑t=1

(yt − y

)2 .

E Mean squared error corrected for degrees of freedom

s2 =

T∑t=1

e2t

T − k,

where k is the number of degrees of freedom used in model fitting.

Christopher Ting QF 603 November 1, 2017 14/21

Page 15: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

R2 and R2

E s2 is just the usual unbiased estimate of the regressiondisturbance variance. That is, it is the square of the usualstandard error of the regression.

E Connection with adjusted R2

R2= 1−

T∑t=1

e2t

T − kT∑t=1

(yt − y

)2T − 1

= 1− s2

T∑t=1

(yt − y

)2T − 1

E Note that the denominator depends only on the data want to fit,not the particular model fit.

Christopher Ting QF 603 November 1, 2017 15/21

Page 16: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Penalizing Degrees of Freedom

E We need to correct somehow for degrees of freedom k whenestimating out-of-sample MSE on the basis of in-sample MSE.

E To highlight the degree-of-freedom penalty, let’s rewrite s2 as apenalty factor times the MSE,

s2 =

(T

T − k

) T∑t=1

e2t

T=

1

1− kT

T∑t=1

e2t

T=

1

1− kT

MSE.

E Two very important such criteria are the Akaike informationcriterion (AIC) and the Schwarz information criterion (SIC). Theirformulas are

AIC = e2kT MSE and SIC = T

kT MSE.

Christopher Ting QF 603 November 1, 2017 16/21

Page 17: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Comparison of Information Criteria

Christopher Ting QF 603 November 1, 2017 17/21

Page 18: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Definition of Consistency

E A model selection criterion is consistent if the following conditionsare met:

A when the true model—that is, the data-generating process(DGP)—is among the models considered, the probability ofselecting the true DGP approaches 1 as the sample size getslarge

B when the true model is not among those considered, so that it’simpossible to select the true DGP, the probability of selecting thebest approximation to the true DGP approaches 1 as the samplesize gets large.

Christopher Ting QF 603 November 1, 2017 18/21

Page 19: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

R2 Which Criterion Is Consistent?

E MSE is inconsistent, because it doesn’t penalize for degrees offreedom.

E As T increases, s2 becomes MSE, thus it is not consistent modelselection procedure.

E The AIC penalizes degrees of freedom more heavily than s2, but ittoo remains inconsistent.

E Even as the sample size gets large. The AIC selects models thatare too large (“overparameterized”).

E The SIC, which penalizes degrees of freedom most heavily, isconsistent.

Christopher Ting QF 603 November 1, 2017 19/21

Page 20: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Asymptotic Efficiency

E What if both the true DGP and the best approximation to it aremuch more complicated than any model we fit?

E DefinitionAn asymptotically efficient model selection criterion chooses asequence of models, as the sample size gets large, whose1-step-ahead forecast error variances approach the one thatwould be obtained using the true model with known parameters ata rate at least as fast as that of any other model selection criterion.

E The AIC, although inconsistent, is asymptotically efficient,whereas the SIC is not.

Christopher Ting QF 603 November 1, 2017 20/21

Page 21: Week 5 Quantitative Analysis of Financial Markets Modeling ...Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways Forecast

Introduction Modeling Trend Estimating Trend Models Forecasting Models Akaike and Schwarz Criteria Takeaways

Takeaways

R Trend as a function of time

R Forecast: point estimate, interval, density

R Model of in-sample fit: MSE, R2

R Model selection criteria: R2, s2, AIC, SIC

R Main desired property of a criterion: Consistency

Christopher Ting QF 603 November 1, 2017 21/21