0% found this document useful (0 votes)
5 views

01__Time_Series_Modeling_II

Uploaded by

sherlockplus650b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

01__Time_Series_Modeling_II

Uploaded by

sherlockplus650b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Time Series Modeling II

Agenda
How does ARIMA compare to linear regression?

How you can get a variety of models from just a single series?

How to choose ARIMA parameters for your trading model?


Learning Objectives
● Understand how ARIMA differs from linear regression
● Learn how to apply a variety of models to just a single series
● Understand how to choose the parameters and features of your
ARIMA trading model
Concepts in Time Series
What is Stationary data?

“Stationary” means that the


statistical structure of the series is
independent of time.
ARIMA vs Linear Regression
Big Picture

Regression: Model y ~ x

Model y based on the distribution of x

ARIMA: y ~ previous values of y

Model y based on previous values of y


ARIMA vs Linear Regression
Big Picture

Regression: Model y ~ x

Model y based on the distribution of x

ARIMA: y ~ previous values of y

Model y based on previous values of y


ARIMA vs Linear Regression
What do they have in common?

Require stationarity
Linear

Correlation between response &


dependent variables
Methods to estimate coefficients
Statistical tests to assess the
quality
ARIMA vs Linear Regression
What do they have in common?

Require stationarity
Linear

Correlation between response &


dependent variables
Methods to estimate coefficients
Statistical tests to assess the
quality
ARIMA vs Linear Regression
What do they do differently?
● There is no natural ordering to the observations in linear regression
● Linear regression uses two different variables
● Linear regression emphasizes one variable depends on the other.
● There is sequential ordering to the observations in time series
● ARIMA uses the same variable, with lagged values of the response
● ARIMA does not need to make this choice
Agenda
How does ARIMA compare to
linear regression?

How you can get a variety of


models from just a single series?

How to choose ARIMA parameters


for your trading model?
ARIMA Model
AR I MA (p,d,q) Model
In an ARIMA model, there will be three parameters that will be needed.
ARIMA Model
AR I MA (p,d,q) Model
In an ARIMA model, there will be three parameters that will be needed.
ARIMA Model
AR I MA (p,d,q) Model
In an ARIMA model, there will be three parameters that will be needed.
ARIMA Model
AR I MA (p,d,q) Model
In an ARIMA model, there will be three parameters that will be needed.
Agenda
How does ARIMA compare to
linear regression?

How can you get a variety of


models from just a single series?

How to choose ARIMA parameters


for your trading model?
Time Series Terminology: Auto Correlation (ARIMA)
Choose:
● the data
● d
● p and q
● the form of ARIMA
● the estimation method
● the best model
Time Series Terminology: Auto Correlation (ARIMA)
Choose:
● the data
● d
● Most difficult step
● p and q ● Often have too much data
● the form of ARIMA rather than too little
● the estimation method ● Need to choose the frequency
● the best model of data that you need for your
model
Time Series Terminology: Auto Correlation (ARIMA)
Choose:
● the data
● If d = 0, you are working with
● d
levels
● p and q ○ Prices
● the form of ARIMA ○ Yields
● the estimation method ● If d =1, you are working with
differences
● the best model
○ Returns and log returns
○ Yield changes
Time Series Terminology: Auto Correlation (ARIMA)
Choose:
● the data
● d
● p and q
● These have to be integers!
● the form of ARIMA
● … but you can choose to set
● the estimation method
them to zero
● the best model
Time Series Terminology: Auto Correlation (ARIMA)
Choose:
● the data
● d
● p and q
● Variations
● the form of ARIMA
○ Fractional estimation
● the estimation method
○ Seasonality
● the best model
Time Series Terminology: Auto Correlation (ARIMA)
Choose:
● the data
● d
● p and q ● Maximum Likelihood
● the form of ARIMA ● Method of moments
● the estimation method ● Non-parametric methods
● the best model ● Simulation
Time Series Terminology: Auto Correlation (ARIMA)
Choose:
● the data
● d
● May run multiple form of
● p and q model with different
● the form of ARIMA estimation parameters
● the estimation method ● May use different software
● Choose model with best
● the best model
quality of fit
Time Series Terminology: Auto Correlation (ARIMA)
Choose:
● the data
● d
● p and q
● the form of ARIMA
● the estimation method
● the best model
Time Series Terminology: Autocorrelation (ARIMA)
Choose:
● the data
● d
● Most important
● p and q ● Tradeoff between timeliness
● the form of ARIMA and relevance
● the estimation method ● How to divide for training and
● the best model testing
● Relevance to prediction goal
Time Series Terminology: Autocorrelation (ARIMA)
Choose:
● the data
● d
● p and q }
● the form of ARIMA
● Software generally guides
this choice
● the estimation method ● Can run the model on
● the best model levels and differences
Time Series Terminology: Autocorrelation (ARIMA)
Choose:
● the data
● d
● p and q ● Traditional model may
● the form of ARIMA oversimplify the analysis
● the estimation method ● More complex model may
overcomplicate the analysis
● the best model
Time Series Terminology: Autocorrelation (ARIMA)
Choose:
● the data
● d
● p and q ● Maximum Likelihood
● the form of ARIMA ● Method of moments
● the estimation method ● Non-parametric methods
● the best model ● Simulation
Time Series Terminology: Autocorrelation (ARIMA)
Choose:
● the data
● d
● May run multiple form of
● p and q model with different
● the form of ARIMA estimation parameters
● the estimation method ● May use different software
● Choose model with best
● the best model
quality of fit
Sensitivity of Trading Strategy
● What is the mean?
● How far does it typically
deviate from the mean
and how long does it
take to get back?
● What is the impact of
your choice of p and q?
● How much explanatory
power is in the model?
Sensitivity of Trading Strategy
● What is the mean?
● How far does it typically
deviate from the mean
and how long does it
● Each of your 6 model decisions
take to get back?
can affect the mean
● What is the impact of ● Choice of data can shift mean
your choice of p and q? up or down
● How much explanatory
power is in the model?
Sensitivity of Trading Strategy
● What is the mean?
● How far does it typically
deviate from the mean
● Long-term average, standard
and how long does it
deviation and current value tell
take to get back?
you where you are in relative
● What is the impact of
terms and also...
your choice of p and q?
● Expected time to revert to
● How much explanatory mean
power is in the model?
Sensitivity of Trading Strategy
● What is the mean?
● How far does it typically
deviate from the mean
● p and q give the form of the
and how long does it
model
take to get back?
● High p means market has high
● What is the impact of memory
your choice of p and q? ● Low p means the past has a
● How much explanatory low impact on the future
power is in the model?
Sensitivity of Trading Strategy
● What is the mean?
● How far does it typically
deviate from the mean ● If p and q are zero your model
and how long does it is a random walk!
take to get back? ● If your model is best fit by
● What is the impact of AR(1) then there is structure
your choice of p and q? ● Trading strategy is sensitive to
model estimates which
● How much explanatory
depend on your choices.
power is in the model?
Lab
Forecasting a stock price
next few days
Lab Objectives
How to import data from GCS

How to setup a Time Series model

How to forecast future using


model

How to evaluate results

You might also like