1 Lecture Plan 15 45 -17 00 : Statistical trading models for energy futures.: Stochastic Processes and Market Efficiency Trading Models Long/Short one.

Slides:



Advertisements
Similar presentations
Cointegration and Error Correction Models
Advertisements

Dynamic panels and unit roots
Time-series analysis.
Copyright(© MTS-2002GG): You are free to use and modify these slides for educational purposes, but please if you improve this material send us your new.
Dates for term tests Friday, February 07 Friday, March 07
Nonstationary Time Series Data and Cointegration
Long run models in economics Professor Bill Mitchell Director, Centre of Full Employment and Equity School of Economics University of Newcastle Australia.
Economics 20 - Prof. Anderson1 Stationary Stochastic Process A stochastic process is stationary if for every collection of time indices 1 ≤ t 1 < …< t.
Using SAS for Time Series Data
Use of Business Tendency Survey Results for Forecasting Industry Production in Slovakia Use of Business Tendency Survey Results for Forecasting Industry.
STATIONARY AND NONSTATIONARY TIME SERIES
Nonstationary Time Series Data and Cointegration Prepared by Vera Tabakova, East Carolina University.
Nonstationary Time Series Data and Cointegration ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes.
Non-stationary data series
COINTEGRATION 1 The next topic is cointegration. Suppose that you have two nonstationary series X and Y and you hypothesize that Y is a linear function.
Economics 20 - Prof. Anderson1 Testing for Unit Roots Consider an AR(1): y t =  +  y t-1 + e t Let H 0 :  = 1, (assume there is a unit root) Define.
Advanced Time Series PS 791C. Advanced Time Series Techniques A number of topics come under the general heading of “state-of-the-art” time series –Unit.
Economics 20 - Prof. Anderson1 Time Series Data y t =  0 +  1 x t  k x tk + u t 2. Further Issues.
1 MF-852 Financial Econometrics Lecture 11 Distributed Lags and Unit Roots Roy J. Epstein Fall 2003.
Financial Econometrics
Unit Roots & Forecasting
Regression with Time-Series Data: Nonstationary Variables
Time Series Building 1. Model Identification
10 Further Time Series OLS Issues Chapter 10 covered OLS properties for finite (small) sample time series data -If our Chapter 10 assumptions fail, we.
STAT 497 APPLIED TIME SERIES ANALYSIS
Stationary Stochastic Process
1Prof. Dr. Rainer Stachuletz Testing for Unit Roots Consider an AR(1): y t =  +  y t-1 + e t Let H 0 :  = 1, (assume there is a unit root) Define 
ARIMA Forecasting Lecture 7 and 8 - March 14-16, 2011
Economics 20 - Prof. Anderson
Unit Root and Cointegration
12 Autocorrelation Serial Correlation exists when errors are correlated across periods -One source of serial correlation is misspecification of the model.
Various topics Petter Mostad Overview Epidemiology Study types / data types Econometrics Time series data More about sampling –Estimation.
Centre of Full Employment and Equity Slide 2 Short-run models and Error Correction Mechanisms Professor Bill Mitchell Director, Centre of Full Employment.
Cointegration in Single Equations: Lecture 6 Statistical Tests for Cointegration Thomas 15.2 Testing for cointegration between two variables Cointegration.
The Properties of Time Series: Lecture 4 Previously introduced AR(1) model X t = φX t-1 + u t (1) (a) White Noise (stationary/no unit root) X t = u t i.e.
K. Ensor, STAT Spring 2004 Memory characterization of a process How would the ACF behave for a process with no memory? What is a short memory series?
How do we identify non-stationary processes? (A) Informal methods Thomas 14.1 Plot time series Correlogram (B) Formal Methods Statistical test for stationarity.
Time Series Analysis Lecture 11
Estimation Method of Moments (MM) Methods of Moment estimation is a general method where equations for estimating parameters are found by equating population.
Dynamic Models, Autocorrelation and Forecasting ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes.
EC208 – Introductory Econometrics. Topic: Spurious/Nonsense Regressions (as part of chapter on Dynamic Models)
Chap 9 Regression with Time Series Data: Stationary Variables
Previously Definition of a stationary process (A) Constant mean (B) Constant variance (C) Constant covariance White Noise Process:Example of Stationary.
TESTING FOR NONSTATIONARITY 1 This sequence will describe two methods for detecting nonstationarity, a graphical method involving correlograms and a more.
Cointegration in Single Equations: Lecture 5
TESTING FOR NONSTATIONARITY 1 This sequence will describe two methods for detecting nonstationarity, a graphical method involving correlograms and a more.
Time Series Analysis PART II. Econometric Forecasting Forecasting is an important part of econometric analysis, for some people probably the most important.
1 Lecture Plan : Modelling volatility and correlation in energy markets Time Varying Volatility and Correlation in Energy Markets Models for.
Econometric methods of analysis and forecasting of financial markets Lecture 4. Cointegration.
Lecture 5 Stephen G. Hall COINTEGRATION. WE HAVE SEEN THE POTENTIAL PROBLEMS OF USING NON-STATIONARY DATA, BUT THERE ARE ALSO GREAT ADVANTAGES. CONSIDER.
© 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
1 VaR Models VaR Models for Energy Commodities Parametric VaR Historical Simulation VaR Monte Carlo VaR VaR based on Volatility Adjusted.
Review of Unit Root Testing D. A. Dickey North Carolina State University (Previously presented at Purdue Econ Dept.)
Financial Econometrics Lecture Notes 4
Nonstationary Time Series Data and Cointegration
Financial Econometrics Lecture Notes 2
Further Issues Using OLS with Time Series Data
Applied Econometric Time-Series Data Analysis
Further Issues in Using OLS with Time Series Data
Regression with Autocorrelated Errors
STATIONARY AND NONSTATIONARY TIME SERIES
Unit Roots 31/12/2018.
Unit Root & Augmented Dickey-Fuller (ADF) Test
Introduction to Time Series
Further Issues Using OLS with Time Series Data
Stationary Stochastic Process
Presentation transcript:

1 Lecture Plan : Statistical trading models for energy futures.: Stochastic Processes and Market Efficiency Trading Models Long/Short one Futures Contract based on Trend/Moving Average Co-integration and Error Correction Models for Spread Trading Calendar Spread Commodity Spread Excel Case: Electricity Futures One Position Trading Strategy Spread Trading Calendar Spread Trading Cross Commodity

2 Stochastic processes for prices and returns In order to establish trading models for energy commodities we must understand the stochastic properties of prices and returns

3 Start out with stochastic processes for prices and returns Random Walk (RW) White Noice (WN) Auto Regressive (AR) Moving Average (MA)

4 Stochastic processes for prices and returns –RW is a non-stationary process (mean and volatility will change over time). –The other processes are stationary (mean and volatility reverts to a long term level) –RW and WN has “no memory” and if prices respectively returns follow such processes, no statistical trading rule can be established –AR and MA processes on the other hand indicate that there are time- serial dependencies in the data and statistical trading rules might be profitable

5 Random Walk Start out with this process for y t. y t =  +  y t-1 + u t  = 1 Random Walk In such a process, mean and volatility changes over time. Volatility goes here to infinity when time increases.

6 Simulation of Random Walk

7 White Noice Start out with this process for y t. y t =  +  y t-1 + u t y t =  + u t  = 0 White Noice In such a process, mean and volatility do not changes over time.

8 Simulation of White Noice

9 Auto Regressive Process AR(1) Start out with this process for y t. y t =  +  y t-1 + u t  < 1 Auto Regressive Process In such a process, mean and volatility do not changes over time.

10 Simulation of AR(1) Process (Phi=0.6)

11 Moving Average MA(1) Think of an AR(∞) model where todays values are dependent on all previous/lag values y t =  +  1 y t-1 +  2 y t-1 +….+  n y t-n+ u t Such an process can be represented by a MA(1) process: y t =  + θu t-1 + u t –This process is also stationary

12 Simulation of Moving Average MA(1) Theta=0.4

13 Auto Regressive AR(1) Moving Average MA(1) – ARMA(1,1) model y t =  +  y t-1 + θu t-1 + u t –This process is also stationary. Simulation of this model is performed by combining AR(1) and MA(1) simulation models

14 Simulation of an ARMA (1,1) model with Phi=Theta=0.6

15 Estimation of AR and MA models –AR models are linear and can be estimated by ordinary least square (OLS) –MA models are non-linear and must be estimated with non-linear least square (NLS) or maximum likelihood (MLE) –The NLS function for a MA models is given by: Y t = u + θε t-1 +ε t ε t assumed to normal, uncorrelated and identically distrubuted N(0,σ 2 ε ) Min ∑(Y t - u - θε t-1 ) 2

16 Estimation of AR(1) model Monthly Base Front EEX y t =  +  y t-1 + u t

17 Estimation of MA model Monthly Base Front EEX

18 Efficient Markets and Trading Models based on MA rules If there are no signs of auto-correlation in the data, there are no “memory” or “persistence” and hence establishment of trading rules (when to buy or sell a future) will not be possible. This is in accordance to market efficiency which claims that on average, such rules will not be profitable If there are signs of auto-correlation in the data, there are “memory” or “persistence” and hence we could establish trading rules (when to buy or sell a future). This is not in accordance to market efficiency.

19 Efficient Markets and Trading Models based on MA rules A particular popular family of technical trading are moving average (MA) rules. MA rules involve calculating 2 moving averages with different time periods N s and N l where s the short period and l is the long period.

20 Efficient Markets and Trading Models based on MA rules The rule is to buy if MA s > MA l and sell if if MA s < MA l Combination of s and l are chosen by the analysts, e.g. MA(5,20), MA(10,100),……

21 Efficient Markets and Trading Models based on MA rules

22 Efficient Markets and Trading Models based on MA rules

23 Excel Exercise Establish a trading models for all the energy commodities using 5/10/30 and 30/60/90 days short and long Moving Average When will you win/loose from this strategy?

24 Stationarity Cointegration and Error Correction Models (ECM)

25 Stationarity, Cointegration and Error Correction Models (ECM)

26 Stationarity and Unit Root Testing Why do we need to test for Non-Stationarity? The stationarity can strongly influence its behaviour and properties - e.g. persistence of shocks will be infinite for nonstationary series Spurious regressions. If two variables are trending over time, a regression of one on the other could have a high R 2 even if the two are totally unrelated If the variables in the regression model are not stationary, then it can be proved that the standard assumptions for asymptotic analysis will not be valid. In other words, the usual “t-ratios” and “F-ratios” will not follow a t-distribution / F-distribution, so we cannot validly undertake hypothesis tests about the regression parameters.

27 Stochastic Non-Stationarity Start out with this process for y t. y t =  +  y t-1 + u t Cases: –  > 1 Explosive process –  = 1 Random Walk –  < 1 Stationary Process / Mean Reversion process. –  = 0 White noice.

28 How do we test for a stationarity? The early and pioneering work on testing for a unit root in time series was done by Dickey and Fuller (Dickey and Fuller 1979, Fuller 1976). The basic objective of the test is to test the null hypothesis that  =1 in: y t =  y t-1 + u t against the one-sided alternative  <1. So we have H 0 : series contains a unit root vs. H 1 : series is stationary. We usually use the regression:  y t =  y t-1 + u t so that a test of  =1 is equivalent to a test of  =0 (since  -1=  ).

29 Different forms for the DF Test Regressions Dickey Fuller tests are also known as  tests: ,  ,  . The null (H 0 ) and alternative (H 1 ) models in each case are i)H 0 : y t = y t-1 +u t H 1 : y t =  y t-1 +u t,  <1 This is a test for a random walk against a stationary autoregressive process of order one (AR(1)) ii)H 0 : y t = y t-1 +u t H 1 : y t =  y t-1 +  +u t,  <1 This is a test for a random walk against a stationary AR(1) with a constant. iii)H 0 : y t = y t-1 +u t H 1 : y t =  y t-1 +  + t+u t,  <1 This is a test for a random walk against a stationary AR(1) with constant and a time trend.

30 Critical Values for the DF Test Note! It can be shown that the tau stat do not follow a t-statistics. Use critical values above. The null hypothesis of a unit root is rejected in favour of the stationary alternative if the tau statistic is more negative than the critical value.

31 The Augmented Dickey Fuller (ADF) Test The tests above are only valid if u t is white noise. In particular, u t will be autocorrelated if there was autocorrelation in the dependent variable of the regression (  y t ) which we have not modelled. The solution is to “augment” the test using p lags of the dependent variable. The alternative model in case (i) is now written: The same critical values from the DF tables are used as before. There is a debate on how many lags to include. Usually 2 lags is enough to secure no serial correlation in the data.

32 ADF example Nord Pool Quarter

33 ADF UK EL Spot

34 Cointegration and Equilibrium Even though two series are non-stationary, the difference between them (or a linear function of them) can be stationary. Examples of possible Cointegrating Relationships in finance: –spot and futures prices –ratio of relative prices and an exchange rate –equity prices and dividends –Gas and GasOil, Electricity and Gas, other commodity spreads Market forces arising from no arbitrage conditions should ensure an equilibrium relationship. No cointegration implies that series could wander apart without bound in the long run.

35 Testing for Cointegration in Regression Run the model: y t =  1 +  2 x t + u t u t should be stationary if Y t and x t are cointegrated. So what we want to test is the residuals of the equation to see if they are non-stationary or stationary. We can use the DF / ADF test on u t. So we have the regression with v t  iid. Again, we cannot use standard t-critical values, and there are specific critical values for psi.

36 Critical Values for Cointegration in Regression: Model1%5%01%

37 Specifying an ECM If (and only of) Yt and Xt are cointegrated, one can set up an ECM model:  y t =  1  x t +  2 (y t-1 -  x t-1 ) + u t y t-1 -  x t-1 is known as the error correction term or the long term equilibrium / mean reversion level.  1  x t is the short term dynamics / deviations from the equilibrium. We can estimate this ECM model using OLS.

38 ECM Model Quarter – Year Nord Pool Step 1: Estimate a regression with prices Quarter against Year Nord Pool. Collect residuals

39 ECM Model Quarter – Year Nord Pool Step 2: Estimate an ADF on the residuals and test for stationarity

40 ECM Model Quarter – Year Nord Pool Step 3: If residuals are stationary, then run an ECM regression

41 Trading strategies based on spreads (cross calendar) Calendar spreads refers to go long one future maturity and short another future maturity If a calendar spread is stationary, then you can short the spread when it is “too high” or go long the spread when it is “too low”. “Too high” and “too low” refers to the equilibrium level.

42 Trading models based on stationary spreads Q-Y Nord Pool

43 Trading strategies based on spreads (cross commodity) Commodity spreads refers to go long one commodity and short another commodity of the same maturity If a calendar spread is stationary, then you can short the spread when it is “too high” or go long the spread when it is “too low”. “Too high” and “too low” refers to the equilibrium level.

44 Trading models based on stationary spreads Gas Oil – Crude Oil ICE

45 Co-integration Analysis Energy Economics, 2011, 33,

46 Co-integration Analysis OPEC Energy Review, 2014, June,

47 Excel Exercise Use exercise data (ICE, EEX and Nasdaq contracts) For each series, test whether they are stationary Check if the series are co-integrated and in case establish an Error Correction Model. Test: –Calendar spreads month-quarter (e.g. EEX month against EEX quarter) –Cross spreads month (e.g. NP month against EEX month) –Cross spreads quarter (e.g. NP quarter against EEX quarter) If ECM can be established, how would you perform a trading strategy? Implement a spreadsheet with a given model and test its performance.