Modelling, Forecasting and Trading of Commodity Spreads
Total Page:16
File Type:pdf, Size:1020Kb
Modelling, Forecasting and Trading of Commodity Spreads Thesis submitted in accordance with the requirements of the University of Liverpool for the degree of Doctor in Philosophy. by Peter William Middleton March 2014 1 Table of Contents CHAPTER 1: Introduction ................................................................................................................... 9 1.1 Introduction ................................................................................................................................ 9 1.2 Motivation and Contribution to Knowledge ............................................................................ 12 1.3 Structure of Thesis ................................................................................................................... 12 CHAPTER 2: Models ........................................................................................................................ 15 2.1 Naive Trading Strategy ............................................................................................................ 15 2.2 Buy and Hold Strategy ............................................................................................................. 15 2.3 MACD Model .......................................................................................................................... 16 2.4 ARMA Model .......................................................................................................................... 17 2.5 Cointegration Model ................................................................................................................ 17 2.6 Neural Networks ...................................................................................................................... 18 2.6.1 The Multi-layer Perceptron Model .................................................................................. 19 Figure 1. A single output, inter-connected MLP model (2 neurons / nodes) .......................................... 20 2.6.2 The Recurrent Network .................................................................................................. 21 Figure 2. Elman recurrent neural network architecture with two neurons / nodes for the hidden layer. ................................................................................................................................................................. 22 2.6.3 The Higher Order Neural Network ................................................................................. 23 Figure 3. Second order HONN with three inputs (1 neuron / node). ...................................................... 24 2.6.4 The PSO Radial Basis Function Neural Network Model ............................................... 25 Figure 4. Radial basis function neural network (with two hidden nodes) .............................................. 27 3.0 Genetic Programming Algorithm (GPA) ........................................................................ 30 Figure 5. Generic tree structure .............................................................................................................. 32 Figure 6. Mutation of a tree structure .................................................................................................... 34 Figure 7. Crossover family tree-like structure ......................................................................................... 35 CHAPTER 3: Modelling and Trading the Corn/Ethanol Crush Spread with Neural Networks ........ 37 1.0 Introduction .............................................................................................................................. 38 2.0 Literature Review ..................................................................................................................... 40 2.1 Spread Trading Agricultural Futures .................................................................................. 41 2.2 Seasonality of Agricultural Futures .................................................................................... 43 Table 1. Typical corn cycle - seasonal sub-periods .................................................................................. 43 2.3 Application of Neural Network Architectures ......................................................................... 44 3.0 Descriptive Statistics and Data ................................................................................................. 45 3.1 Statistical Behaviour of Commodity Prices ....................................................................... 46 Figure 8. The corn-ethanol crush CBOT daily closing prices (23/03/2005 – 31/12/2009) ..................... 47 3.2 Descriptive Statistics .......................................................................................................... 48 Figure 9. Histogram of corn/ethanol spread return series ...................................................................... 48 Table 2. Explanatory variables ................................................................................................................. 49 Table 3. Data segregation for the full sample period .............................................................................. 50 3.3 Rolling Forward Procedure ................................................................................................ 50 3.4 Discounting the Existence of Seasonality .......................................................................... 51 2 4.0 Methodology ............................................................................................................................ 52 4.1 Benchmark Models ............................................................................................................. 52 4.2 MACD Model ..................................................................................................................... 52 4.3 ARMA Model ..................................................................................................................... 53 5.0 Empirical Results ..................................................................................................................... 53 5.1 Statistical Performance ....................................................................................................... 53 Table 4. Out-of-sample statistical performance ...................................................................................... 53 5.2 Trading Performance .......................................................................................................... 54 Table 5. Out of sample trading performance results (unfiltered) ........................................................... 54 Table 6. Out of sample trading performance results (filtered) ............................................................... 54 6.0 Concluding Remarks ................................................................................................................ 56 CHAPTER 4: Trading and Hedging the Corn/Ethanol Crush Spread using Time Varying Leverage and Nonlinear Models ........................................................................................................................ 58 1.0 Introduction .............................................................................................................................. 59 2.0 Literature Review ..................................................................................................................... 61 3.0 Desscriptive Statistics and Related Financial Data .................................................................. 62 3.1 Statistical Behaviour of the Crush ...................................................................................... 64 Figure 10. The corn-ethanol crush CBOT daily closing prices (23/03/2005 – 31/12/2010) ................... 65 3.2 Descriptive Statistics and Explanatory Variables ............................................................... 66 Figure 11. Histogram of corn/ethanol spread return series.................................................................... 66 Table 7. Explanatory variables for the neural networks ......................................................................... 67 Table 8. Data segregation for the full sample period .............................................................................. 67 3.3 Rolling Forward Procedure ................................................................................................ 67 4.0 Methodology ............................................................................................................................ 68 4.1 Benchmark Models ............................................................................................................. 68 4.2 MACD Model ..................................................................................................................... 69 4.3 ARMA Model ..................................................................................................................... 69 5.0 Empirical Results ..................................................................................................................... 70 5.1 Statistical Performance ....................................................................................................... 70 Table 9. In-sample statistical performance ............................................................................................. 70 Table 10. Out-of- sample statistical performance ..................................................................................