SlideShare a Scribd company logo
1 of 29
Download to read offline
Autoregressive model
in financial time series
Mines ParisTech
Xiangnan YUE
Introduction
• Data visualization: the historical HS300 index from
2017.9 to 2017.11
Introduction
• In a case where no correlation is presented, it’s
called the white noise. (w(t)..)
Introduction
• Moving-average and autoregression are two ways
to introduce correlation and smoothness
• use 1/20 for [w(t-9),..,w(t),..,w(t +10)]
• autoregression
• x(t) = x(t-1) - 0.9x(t-2) + w(t)
Introduction
• Before using autoregression, the auto-correlation
and cross-correlation have to be checked.
• Auto-correlation is the relation between x(t+k) and
x(t), which is of the same time series.
• ACF(k) = cov(X(t+k), X(t)) / cov(X(t), X(t))
• cross-correlation is the relation between two time
series {x(n)} and {y(n)}
Introduction
• sometimes we see also the PACF, which is used to
remove the influence of intermedia variables.
• for example phi(h) is defined as
• If we remember that E[X(h)|X(h-1)] can be seen as the
projection of X(h) to the X(h-1) plane, this PACF(h) can be
explained in the following graph
• MA(1)
• AR(1)
• PACF • ACF
Introduction
• Yet with only one realization at each time t, to check
cov(x(t), x(t-k)) becomes feasible if we have the
weak stationary assumption.
• Weak stationary demands that
• the mean function E[X(t)]
• the auto-covariance function Cov(X(t+k), X(t))
• stay the same for different t.
Introduction
• Under classical linear model, Y = AX, independent
variables cannot be strongly correlated (otherwise,
it poses the problem of multi-linearity).
• This is not our case in time series (as shown by
ACF, variables at different time lags are strongly
correlated), where we introduce the ARIMA.
MA and AR process
• MA(q), which can be written as
• X(t) = W(t) + a1 * W(t-1) + … + ak * W(t-q), where
{W(t)} are white noises.
• AR(p), which can be written as
Fitting ARIMA to time series (R)
• The process of fitting ARIMA is referred to Box-
Jenkins method
• three orders (p, d, q) have to be decided for model.
• p: AR(p), number of lags used in the model.
• d: I(d), the order of differencing
• q: MA(q) combination of previous error terms.
0.Get Data
• SHA300 Index
• data source
• http://quote.eastmoney.com/zs000300.html
1.Observation
• observation of the trade volume per 5 minutes
• observation of end value per 5 minutes
• It’s more conventional to model the averaged data than the original ones.
2. Decomposition
• One important thing is to discover the seasonality,
trend. In our 5-minute data, no special seasonality
has been found.
• For the trend and stationarity test, we pass directly
to the check of stationarity.
3. Stationarity
• Fitting ARIMA requires time series to be stationary,
or weak stationary. (which is, the first and second
moment stay constant for the same time interval)
• Checking stationarity can be done by The
Augmented Dickey-Fuller (ADF) test. Null
assumption is the time series are not stationary.
• Before the test, it is clear from the graph that there is
some trend, so we have a reasonable guess that the
time series are not stable (a trend with time t exits)
3. Stationarity - cont.
• the result of ADF test is as below, a large p-value (or
a less negative Dicky-Fuller value) cannot reject the
assumption, and we conclude that the time series
contain some trend.
3. Stationarity - cont.
• to remove the trend effect of our time series, we take
the one-order difference between X(t) and X(t-1)
• this time, results show that we can reject the H0
assumption that stationarity doesn't exists.
• so we have reason to believe difference order d = 1
4. Find orders of ARIMA
• Define z(t) = X(t) - X(t-1)
• Use ACF and PACF graph
• Focus on the spike of the ACF and PACF
• In this graph, we found
that the z(t) is auto-
correlated at lag 1 and 40
• PACF shows a significant
spike at lag 1 and 40
• so try p=q=1, 40, 48
4. Find orders of ARIMA - cont.
• Other methods exist and needs to compare between
the models
• Criteria:
• Akaike Information Criteria (AIC)
• Baysian Information Criteria (BIC)
• Comparison: Minimise the AIC and BIC (lost infos.)
• Instead of trying models ourselves, R offers a
function auto.arima() to do this from scratch, yet this
does not always return a best forecast
• It’s often required to select from by experience.
• an experience table for choosing order p and q.
4. Find orders of ARIMA - cont.
• auto.arima function suggests:
• X(t) - X(t-1) = 0.1950 + 0.0753*X(t-1) + e(t)
• yet ACF shows that some correlation between the residuals with
interval = 40 and 48 is not reflected
4. Find orders of ARIMA - cont.
• try ARIMA(48, 1, 0) and ARIMA(1,1,48) … and look
at the correlation graph of ACF and PACF
• forecast by back-test
• the HS300 may behave more like random walking…
• yet our ARIMA(48, 1, 0) is only good for predicting about 50 * 5min,
• the further prediction is based on our previous predictions and is less exact.
5. what to do next — the art
• Some time series are easier to predict as they contain regular
patterns. An example is the volume of trade
• yet the rule for adjusting the order of ARIMA is quite complicate,
and demand experiences, refer to literatures.
• http://people.duke.edu/~rnau/411arim3.htm#plots
• the ACF and PACF graphs
• at the beginning, it indicates a seasonal model.
• https://www.esat.kuleuven.be/sista/lssvmlab/
tutorial/node23.html
• https://onlinecourses.science.psu.edu/stat510/
node/67
• https://people.duke.edu/~rnau/seasarim.htm
• https://www.datascience.com/blog/introduction-to-
forecasting-with-arima-in-r-learn-data-science-
tutorials
To go further
• Stochastic models (Black-Scholes)
• ANN, Bayesian Learning …
• Reinforcement Learning, Recurrent Neural
Network…

More Related Content

What's hot

Linear Transformations, Matrix Algebra
Linear Transformations, Matrix AlgebraLinear Transformations, Matrix Algebra
Linear Transformations, Matrix AlgebraPrasanth George
 
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet Mahana
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet MahanaArima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet Mahana
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet MahanaAmrinder Arora
 
StrataGEM: A Generic Petri Net Verification Framework
StrataGEM: A Generic Petri Net Verification FrameworkStrataGEM: A Generic Petri Net Verification Framework
StrataGEM: A Generic Petri Net Verification FrameworkEdmundo López Bóbeda
 
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...Amrinder Arora
 
Matrix of linear transformation
Matrix of linear transformationMatrix of linear transformation
Matrix of linear transformationbeenishbeenish
 
Time series modelling arima-arch
Time series modelling  arima-archTime series modelling  arima-arch
Time series modelling arima-archjeevan solaskar
 
Convex Hull Algorithm Analysis
Convex Hull Algorithm AnalysisConvex Hull Algorithm Analysis
Convex Hull Algorithm AnalysisRex Yuan
 
Intro to Forecasting in R - Part 4
Intro to Forecasting in R - Part 4Intro to Forecasting in R - Part 4
Intro to Forecasting in R - Part 4egoodwintx
 
Time Series Analysis with R
Time Series Analysis with RTime Series Analysis with R
Time Series Analysis with RARCHIT GUPTA
 
On the Numerical Solution of Differential Equations
On the Numerical Solution of Differential EquationsOn the Numerical Solution of Differential Equations
On the Numerical Solution of Differential EquationsKyle Poe
 

What's hot (19)

Convex hull
Convex hullConvex hull
Convex hull
 
Linear Transformations, Matrix Algebra
Linear Transformations, Matrix AlgebraLinear Transformations, Matrix Algebra
Linear Transformations, Matrix Algebra
 
Lecture24
Lecture24Lecture24
Lecture24
 
Digital Signal Processing Assignment Help
Digital Signal Processing Assignment HelpDigital Signal Processing Assignment Help
Digital Signal Processing Assignment Help
 
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet Mahana
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet MahanaArima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet Mahana
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet Mahana
 
StrataGEM: A Generic Petri Net Verification Framework
StrataGEM: A Generic Petri Net Verification FrameworkStrataGEM: A Generic Petri Net Verification Framework
StrataGEM: A Generic Petri Net Verification Framework
 
convex hull
convex hullconvex hull
convex hull
 
Convex hulls & Chan's algorithm
Convex hulls & Chan's algorithmConvex hulls & Chan's algorithm
Convex hulls & Chan's algorithm
 
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
 
Matrix of linear transformation
Matrix of linear transformationMatrix of linear transformation
Matrix of linear transformation
 
Time series modelling arima-arch
Time series modelling  arima-archTime series modelling  arima-arch
Time series modelling arima-arch
 
Convex Hull Algorithm Analysis
Convex Hull Algorithm AnalysisConvex Hull Algorithm Analysis
Convex Hull Algorithm Analysis
 
Intro to Forecasting in R - Part 4
Intro to Forecasting in R - Part 4Intro to Forecasting in R - Part 4
Intro to Forecasting in R - Part 4
 
Isomorphism
IsomorphismIsomorphism
Isomorphism
 
convex hull
convex hullconvex hull
convex hull
 
Time Series Analysis with R
Time Series Analysis with RTime Series Analysis with R
Time Series Analysis with R
 
Ameer 14208
Ameer 14208Ameer 14208
Ameer 14208
 
Presentation
PresentationPresentation
Presentation
 
On the Numerical Solution of Differential Equations
On the Numerical Solution of Differential EquationsOn the Numerical Solution of Differential Equations
On the Numerical Solution of Differential Equations
 

Similar to a brief introduction to Arima

ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptxASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptxsunitha1792
 
Arima model
Arima modelArima model
Arima modelJassika
 
arimamodel-170204090012.pdf
arimamodel-170204090012.pdfarimamodel-170204090012.pdf
arimamodel-170204090012.pdfssuserdca880
 
5 parametric equations, tangents and curve lengths in polar coordinates
5 parametric equations, tangents and curve lengths in polar coordinates5 parametric equations, tangents and curve lengths in polar coordinates
5 parametric equations, tangents and curve lengths in polar coordinatesmath267
 
StringMatching-Rabikarp algorithmddd.pdf
StringMatching-Rabikarp algorithmddd.pdfStringMatching-Rabikarp algorithmddd.pdf
StringMatching-Rabikarp algorithmddd.pdfbhagabatijenadukura
 
basics of stochastic and queueing theory
basics of stochastic and queueing theorybasics of stochastic and queueing theory
basics of stochastic and queueing theoryjyoti daddarwal
 
DAA - chapter 1.pdf
DAA - chapter 1.pdfDAA - chapter 1.pdf
DAA - chapter 1.pdfASMAALWADEE2
 
LeastSquaresParameterEstimation.ppt
LeastSquaresParameterEstimation.pptLeastSquaresParameterEstimation.ppt
LeastSquaresParameterEstimation.pptStavrovDule2
 
Brock Butlett Time Series-Great Lakes
Brock Butlett Time Series-Great Lakes Brock Butlett Time Series-Great Lakes
Brock Butlett Time Series-Great Lakes Brock Butlett
 
DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..KarthikeyaLanka1
 
Arima model (time series)
Arima model (time series)Arima model (time series)
Arima model (time series)Kumar P
 
Business Analytics Foundation with R tool - Part 5
Business Analytics Foundation with R tool - Part 5Business Analytics Foundation with R tool - Part 5
Business Analytics Foundation with R tool - Part 5Beamsync
 
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920Karl Rudeen
 
Auto correlation and cross-correlation
Auto correlation and cross-correlationAuto correlation and cross-correlation
Auto correlation and cross-correlationMrinmoy Majumder
 

Similar to a brief introduction to Arima (20)

ME-314- Control Engineering - Week 02
ME-314- Control Engineering - Week 02ME-314- Control Engineering - Week 02
ME-314- Control Engineering - Week 02
 
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptxASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
 
Arima model
Arima modelArima model
Arima model
 
arimamodel-170204090012.pdf
arimamodel-170204090012.pdfarimamodel-170204090012.pdf
arimamodel-170204090012.pdf
 
5 parametric equations, tangents and curve lengths in polar coordinates
5 parametric equations, tangents and curve lengths in polar coordinates5 parametric equations, tangents and curve lengths in polar coordinates
5 parametric equations, tangents and curve lengths in polar coordinates
 
StringMatching-Rabikarp algorithmddd.pdf
StringMatching-Rabikarp algorithmddd.pdfStringMatching-Rabikarp algorithmddd.pdf
StringMatching-Rabikarp algorithmddd.pdf
 
basics of stochastic and queueing theory
basics of stochastic and queueing theorybasics of stochastic and queueing theory
basics of stochastic and queueing theory
 
DAA - chapter 1.pdf
DAA - chapter 1.pdfDAA - chapter 1.pdf
DAA - chapter 1.pdf
 
LeastSquaresParameterEstimation.ppt
LeastSquaresParameterEstimation.pptLeastSquaresParameterEstimation.ppt
LeastSquaresParameterEstimation.ppt
 
Brock Butlett Time Series-Great Lakes
Brock Butlett Time Series-Great Lakes Brock Butlett Time Series-Great Lakes
Brock Butlett Time Series-Great Lakes
 
DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..
 
Lecture set 6
Lecture set 6Lecture set 6
Lecture set 6
 
ACF.ppt
ACF.pptACF.ppt
ACF.ppt
 
Arima model (time series)
Arima model (time series)Arima model (time series)
Arima model (time series)
 
Av 738- Adaptive Filtering - Background Material
Av 738- Adaptive Filtering - Background MaterialAv 738- Adaptive Filtering - Background Material
Av 738- Adaptive Filtering - Background Material
 
Business Analytics Foundation with R tool - Part 5
Business Analytics Foundation with R tool - Part 5Business Analytics Foundation with R tool - Part 5
Business Analytics Foundation with R tool - Part 5
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
 
Project Paper
Project PaperProject Paper
Project Paper
 
Auto correlation and cross-correlation
Auto correlation and cross-correlationAuto correlation and cross-correlation
Auto correlation and cross-correlation
 

Recently uploaded

办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 

Recently uploaded (20)

办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 

a brief introduction to Arima

  • 1. Autoregressive model in financial time series Mines ParisTech Xiangnan YUE
  • 2. Introduction • Data visualization: the historical HS300 index from 2017.9 to 2017.11
  • 3. Introduction • In a case where no correlation is presented, it’s called the white noise. (w(t)..)
  • 4. Introduction • Moving-average and autoregression are two ways to introduce correlation and smoothness • use 1/20 for [w(t-9),..,w(t),..,w(t +10)]
  • 5. • autoregression • x(t) = x(t-1) - 0.9x(t-2) + w(t)
  • 6. Introduction • Before using autoregression, the auto-correlation and cross-correlation have to be checked. • Auto-correlation is the relation between x(t+k) and x(t), which is of the same time series. • ACF(k) = cov(X(t+k), X(t)) / cov(X(t), X(t)) • cross-correlation is the relation between two time series {x(n)} and {y(n)}
  • 7. Introduction • sometimes we see also the PACF, which is used to remove the influence of intermedia variables. • for example phi(h) is defined as • If we remember that E[X(h)|X(h-1)] can be seen as the projection of X(h) to the X(h-1) plane, this PACF(h) can be explained in the following graph
  • 8. • MA(1) • AR(1) • PACF • ACF
  • 9. Introduction • Yet with only one realization at each time t, to check cov(x(t), x(t-k)) becomes feasible if we have the weak stationary assumption. • Weak stationary demands that • the mean function E[X(t)] • the auto-covariance function Cov(X(t+k), X(t)) • stay the same for different t.
  • 10. Introduction • Under classical linear model, Y = AX, independent variables cannot be strongly correlated (otherwise, it poses the problem of multi-linearity). • This is not our case in time series (as shown by ACF, variables at different time lags are strongly correlated), where we introduce the ARIMA.
  • 11. MA and AR process • MA(q), which can be written as • X(t) = W(t) + a1 * W(t-1) + … + ak * W(t-q), where {W(t)} are white noises. • AR(p), which can be written as
  • 12. Fitting ARIMA to time series (R) • The process of fitting ARIMA is referred to Box- Jenkins method • three orders (p, d, q) have to be decided for model. • p: AR(p), number of lags used in the model. • d: I(d), the order of differencing • q: MA(q) combination of previous error terms.
  • 13. 0.Get Data • SHA300 Index • data source • http://quote.eastmoney.com/zs000300.html
  • 14. 1.Observation • observation of the trade volume per 5 minutes • observation of end value per 5 minutes • It’s more conventional to model the averaged data than the original ones.
  • 15. 2. Decomposition • One important thing is to discover the seasonality, trend. In our 5-minute data, no special seasonality has been found. • For the trend and stationarity test, we pass directly to the check of stationarity.
  • 16. 3. Stationarity • Fitting ARIMA requires time series to be stationary, or weak stationary. (which is, the first and second moment stay constant for the same time interval) • Checking stationarity can be done by The Augmented Dickey-Fuller (ADF) test. Null assumption is the time series are not stationary. • Before the test, it is clear from the graph that there is some trend, so we have a reasonable guess that the time series are not stable (a trend with time t exits)
  • 17. 3. Stationarity - cont. • the result of ADF test is as below, a large p-value (or a less negative Dicky-Fuller value) cannot reject the assumption, and we conclude that the time series contain some trend.
  • 18. 3. Stationarity - cont. • to remove the trend effect of our time series, we take the one-order difference between X(t) and X(t-1) • this time, results show that we can reject the H0 assumption that stationarity doesn't exists. • so we have reason to believe difference order d = 1
  • 19. 4. Find orders of ARIMA • Define z(t) = X(t) - X(t-1) • Use ACF and PACF graph • Focus on the spike of the ACF and PACF • In this graph, we found that the z(t) is auto- correlated at lag 1 and 40 • PACF shows a significant spike at lag 1 and 40 • so try p=q=1, 40, 48
  • 20. 4. Find orders of ARIMA - cont. • Other methods exist and needs to compare between the models • Criteria: • Akaike Information Criteria (AIC) • Baysian Information Criteria (BIC) • Comparison: Minimise the AIC and BIC (lost infos.) • Instead of trying models ourselves, R offers a function auto.arima() to do this from scratch, yet this does not always return a best forecast • It’s often required to select from by experience.
  • 21. • an experience table for choosing order p and q.
  • 22. 4. Find orders of ARIMA - cont. • auto.arima function suggests: • X(t) - X(t-1) = 0.1950 + 0.0753*X(t-1) + e(t) • yet ACF shows that some correlation between the residuals with interval = 40 and 48 is not reflected
  • 23. 4. Find orders of ARIMA - cont. • try ARIMA(48, 1, 0) and ARIMA(1,1,48) … and look at the correlation graph of ACF and PACF • forecast by back-test
  • 24. • the HS300 may behave more like random walking… • yet our ARIMA(48, 1, 0) is only good for predicting about 50 * 5min, • the further prediction is based on our previous predictions and is less exact.
  • 25. 5. what to do next — the art • Some time series are easier to predict as they contain regular patterns. An example is the volume of trade • yet the rule for adjusting the order of ARIMA is quite complicate, and demand experiences, refer to literatures. • http://people.duke.edu/~rnau/411arim3.htm#plots
  • 26. • the ACF and PACF graphs
  • 27. • at the beginning, it indicates a seasonal model.
  • 28. • https://www.esat.kuleuven.be/sista/lssvmlab/ tutorial/node23.html • https://onlinecourses.science.psu.edu/stat510/ node/67 • https://people.duke.edu/~rnau/seasarim.htm • https://www.datascience.com/blog/introduction-to- forecasting-with-arima-in-r-learn-data-science- tutorials
  • 29. To go further • Stochastic models (Black-Scholes) • ANN, Bayesian Learning … • Reinforcement Learning, Recurrent Neural Network…