Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


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

1 1 Lecture Plan 15 45 -17 00 : 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 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 3 Start out with stochastic processes for prices and returns Random Walk (RW) White Noice (WN) Auto Regressive (AR) Moving Average (MA)

4 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 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 6 Simulation of Random Walk

7 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 8 Simulation of White Noice

9 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 10 Simulation of AR(1) Process (Phi=0.6)

11 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 12 Simulation of Moving Average MA(1) Theta=0.4

13 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 14 Simulation of an ARMA (1,1) model with Phi=Theta=0.6

15 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 16 Estimation of AR(1) model Monthly Base Front EEX y t =  +  y t-1 + u t

17 17 Estimation of MA model Monthly Base Front EEX

18 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 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 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 21 Efficient Markets and Trading Models based on MA rules

22 22 Efficient Markets and Trading Models based on MA rules

23 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 24 Stationarity Cointegration and Error Correction Models (ECM)

25 25 Stationarity, Cointegration and Error Correction Models (ECM)

26 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 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 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 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 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 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 32 ADF example Nord Pool Quarter

33 33 ADF UK EL Spot

34 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 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 36 Critical Values for Cointegration in Regression: Model1%5%01% -3.90-3.34-3.04

37 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 38 ECM Model Quarter – Year Nord Pool Step 1: Estimate a regression with prices Quarter against Year Nord Pool. Collect residuals

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

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

41 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 42 Trading models based on stationary spreads Q-Y Nord Pool

43 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 44 Trading models based on stationary spreads Gas Oil – Crude Oil ICE

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

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

47 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.


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

Similar presentations


Ads by Google