Escolar Documentos
Profissional Documentos
Cultura Documentos
PAUL AMENYAWU
This dissertation is submitted in partial fulfilment of the requirement for the degree
September 2007
1
Declaration
“This is to certify that this dissertation is the result of an original investigation. The
material has not been used in the submission of any other qualification. Full
2
Modelling, Forecasting and Trading Power Futures Spread
By PAUL AMENYAWU
3
Acknowledgements
I would like to show an appreciation to my supervisor Dr. Andreas Nabor for his
The content of this dissertation was inspired from articles, journal and books; I
In addition I would like to thank Nord Pool for granting me the permission to use
Finally, I would like to thank all IBS staff in general and Melanie Jones in
particular; she was always there for us and for providing me with most of the
articles and books that I needed; especially for the literature review. She is great!
4
Table of Content
DECLARATION............................................................................................................................... 2
Acknowledgements .................................................................................................................... 4
ABSTRACT..................................................................................................................................... 12
5
TARCH Model with seasonal dummies............................................................................................. 39
SUMMARY ..................................................................................................................................... 40
SPREAD SERIES ............................................................................................................................. 40
DATA D ESCRIPTION ...................................................................................................................... 42
MEAN R EVERTING MODELS WITH JUMPS ...................................................................................... 43
P ARAMETER ESTIMATION .............................................................................................................. 46
MEAN R EVERTING MODELS WITH TIME VARYING MEAN ............................................................... 46
INTRODUCTION ............................................................................................................................. 47
MODELLING .................................................................................................................................. 49
MEAN R EVERSION PARAMETER ESTIMATION ................................................................................ 51
S IMULATION OF MEAN R EVERSION WITH JUMPS ........................................................................... 52
S INGLE F ACTOR MODEL WITH S EASONALITY ........................................................................... 54
INTRODUCTION ............................................................................................................................. 63
FORECASTING MEASURES ............................................................................................................. 63
6
SUMMARY ..................................................................................................................................... 68
INTRODUCTION ............................................................................................................................. 70
CHAPTER 5 CONCLUSION................................................................................................... 78
REFERENCES................................................................................................................................ 82
APPENDIX 1................................................................................................................................... 86
APPENDIX 2................................................................................................................................... 88
7
List of Tables
TABLE 5: SUMMARY OF RATIOS OF THE RESULT OF S&P500 TRADING STRATEGY WITH ARMA ....... 74
TABLE 6: SUMMARY RATIOS OF PAIRS TRADING STRATEGY ............................................................... 75
TABLE 7: SUMMARY OF THE RATIOS OF MACD TRADING STRATEGY APPLIED TO YEARLY SYSTEM
INDEX ....................................................................................................................................... 76
TABLE 8: SUMMARY OF THE RATIOS OF MACD TRADING STRATEGY APPLIED TO YEARLY S&P500
INDEX ....................................................................................................................................... 77
TABLE 9: SUMMARY RATIOS OF THE TRADING STRATEGY - AS APPLIED TO THREE DIFFERENT DATA
SET. .......................................................................................................................................... 78
8
List of Figures
FIGURE 6: EQUITY CURVE FOR A TRADING STRATEGY SHOWING FEW PAUSES. ............ 67
STRATEGY. ........................................................................................................... 68
FIGURE 10: A DATA COMPARISON OF SYSTEM AND HELSINKI DAILY PRICES ............... 89
9
FIGURE 20: A COMBINATIONS OF 30-DAY VOLATILITY AND LOGARITHMS RETURNS
FIGURE 22: RETURNS AND 9-DAY EMA AND 20-DAY MA SERIES ........................... 102
FIGURE 23: MAXIMUM DRAWDOWN FOR S&P500 WITH ARMA FORECAST .............. 103
FIGURE 24: DAILY PROFIT FOR S&P500 WITH ARMA FORECAST ............................. 103
FIGURE 25: DAILY CUMULATIVE PROFIT FOR S&P500 WITH ARMA FORECAST ........ 104
FIGURE 28: GRAPH OF MAXIMUM DRAWDOWN OF OLSQ APPLIED TO CDF ............. 106
MEAN SPEED OF 0.47 AND A LONG RUN MEAN OF 949.27 WITH A HALF-LIFE 1.46129
10
SQUARE ESTIMATION......................................................................................... 129
FIGURE 47: THE LOG SERIES OF THE S&P INDEX ........................................................ 135
11
Abstract
The main aim of this dissertation is to forecast short-term electricity price spread
and to apply a correlation filter to the forecasted returns with the aim of finding
initially the best forecasting tool. A MACD trading strategy is then applied to the
forecasted returns of the best tool, profitability and volatility ratios are then
calculated using Microsoft excel spread sheet set up. This set up consists of an
input data series-which can be varied with set of ratios generating different values.
The is an adaptation of Jason al et, (2002) spread sheet models. The applicability of
the models to trading is thus evaluated and conclusions drawn based on the values
It is concluded that forecasting tools can be used by traders in their daily trading
activities. Similarly market inefficacies do exist and trading strategies can generate
12
Chapter 1 Introduction
stock market trading. Williams (2003) investigated the above and come out with
EUR/USD returns…, and to add value as a forecasting and quantitative tool “. The
dissertation set out to verify this, but with different data, with different
The aim of the topic is to test the usefulness of academic forecasting tools, such as
ARMA to stock market traders. Market traders use two main tools: Fundamental
and Technical analysis. Fundamental analysis is based on their views of the market;
the trading decisions they make are based on for example; on the financial
Whilst technical analysis on the other hand uses day to day price movements as
Some of their tools include moving average, range trading- trading between low
price and high price; other indicators are used to reach some of these decisions.
Two different data sources will be used. These are Nord Pool electricity and US
S&P500 index prices. These markets are entirely different, one is power based,
which exhibits peculiar characteristics such as: seasonal cycles, price spikes and
high volatility, whilst the other mainly based on equities of 500 companies from
wide range of backgrounds. In this regard S&P500 will be used as proxy for the
perfect market. Firstly each of these will be forecasted, with the aim of using the
ratios to compare the forecasting ability of these tools. Secondly, a moving average
13
trading strategy will applied using the out-of-sample data to measure the risk and
profit of the forecasting tools. Finally the moving average strategy will be applied
directly to the prices of both markets as a means of testing whether traders can
profit without the use of the academic forecasting tools. An Excel spread sheet will
will be used in-sample for estimation of the various models; the rest will be used as
out-of-sample data mainly for forecasting and testing moving average strategy.
Four main forecasting tools will be use to forecast the Nord Pool and S&P 500
prices. The in-sample data will be used for estimation and optimization purposes,
whilst the out of sample data will be used for the forecasting. The various ratios
will be rank and compared with the aim of finding the best forecasting methods.
Secondly a moving average trading strategy will be tested using the forecasted data
values, with the various risk and profitability ratios computed. The result of the
strategy will be then compared to find out which of the forecasted tools provided is
the best. Dissertation is divided into five chapters. Chapter 2, Literature Review
examines previous articles, books and other works that have been studies by
several researches. Their approach and methodologies will examine with the aim of
improve on them.
methodologies, tools and ratios that are going to be used in the dissertation. Some
electricity prices will be examined with the aim of identifying, prices hikes,
14
volatility and any other characteristics. A review of the Nord Pool as well as
S&P500 markets will also be examined. Data analysis and dynamic of each of the
price data will be look at. Finally, in addition to comparing forecasting techniques
Forwards and CDF of Nord Pool will be examine using simulation techniques and
the basis of data analysis the usefulness and limitation of “academic” forecasting
tools to market participants. A general summary of the output of the results which
15
Chapter 2 Literature Review
Introduction
Futures sport price exhibit features such as: mean reversion, seasonal effects,
time varying volatility and volatility clustering, extreme values/spikes, time of the
day effects i.e. price variation during the day, week days, weekends and the
beginning of the week. Couple with the fact the electricity is non-storable in other
words cannot be use to arbitrage price. However, Clewlow al et, (2000), argued
that inputs such as coal, gas, nuclear fuels, are in fact storable, therefore cost
associated with transmission, purchases, storages, tolling and other charges, must
be taking into account in the arbitrage pricing model. This introduces complexities
of power data and modelling must be therefore be understood and embraced by the
There is therefore the need to obtain an accurate forecast of the electricity spot
prices and to take into account the feature listed above. The next section examines
some of the main research which has been done. In addition the various
performance of the spread trading models. They used a data which consist of daily
closing prices for the period 1995 till 2004 of WTI Light, sweet crude oil futures
contract and Brent Crude oil futures contract. Neural network Regression was used
Average, ARMA, Co-integrating ”fair value” model. The forecasted sample was
then exported to excel and both a standard and a correlation filter were applied.
Their findings suggested that ARMA model is the best. The ideas and concepts
from this paper inspired the dissertation. They concluded that “the correlation
16
filter can provide traders with a useful way of improving the performance of
conclusions were based on single market. In other words data from different market
such as electricity which has features like volatility clustering, jumps, seasonal and
regional variation are likely to give different results if theses are not taken into
consideration. Their research was from an academic view point which is usually
frowned upon by market traders. In addition part of their research was based on
volatility, peaks and trough within a certain range. This also includes protective
stops which minimises unlimited losses. I would therefore like to extend this
research by making this relevant to market by using tools used by traders on a daily
basis. The other aspect of Evans et, al; that is of interest is the extension of Holmes
et, al (2003) “Fair Value” approach. In their conclusion they stated that the fair
the spread contracts are “efficiently priced”. Based on this they tested the predicted
value of the spread using Technical analysis models. The data on which their
research was based is oil futures which are considered as a commodity and whose
price follows a random walk. The general acceptance of their conclusion could be
stronger if they had used data from other sources or markets. Their approach will
Hadsel (2006) uses TARCH to examine the returns in electricity futures volatility.
to a new equilibrium”.
17
Weber et, al (2007) extended ARMA models by using it to forecast day-ahead in
similar to the ARMA models. They concluded that GARCH approach captures the
fat tail in the price distribution. In other words “high volatility coincides with
tool for trading and investment. Neural network (NNR) was used as a bench mark
added tool for quantitative trading”. The literature above assumes deterministic
therefore appropriate for the modeller to use models which incorporate loads,
weather and plant variables. In other words, cyclical patterns that dominate electric
spot markets must be considered. This includes the so-called: hour-of the-day
models by the use of dummy variables. The various models used by previous
section. Both linear and non-linear series will be considered. Each of these will be
derived and discussed. In addition the suitability of the model to the data will also
be looked at.
The dissertation will also examine and apply a paper by Bachelor, et, al, 2007.
They examine sport and forward rates in freight rate assuming shipping is a non-
storable service; using the Forward Freight Agreement (FFA) market using
VAR. They found out that the ARIMA or VAR provided a better forecast of spot
rate. The test was based on the following assumptions: firstly the FFA market is
18
small and new; secondly they regarded the forward rate as a services which is not
storable, suggesting that there is no arbitrage between the spot and futures rates –
non existence of cost and arbitrage relationship; finally, the FFA market is made up
of hedges rather than speculators – as speculation often leads to biased with regard
to forecasting. They concluded that the spot and forward rate do not cointegrate
Directional Movement Index (DMI) trading rule. Their aim was to test DMI trading
strategy to Hang Seng, KOSPI, Nikkei 255 and TWSE then compare this with the
UK and US stock market. Their result concluded that the strategy performed well
with the Asian market with the DMI. In addition they found that buy-and-hold
strategy did provide more positive returns for the Asian, UK and US data. In effect
their research was to test market efficiency; they found out that the US/UK markets
are more efficient than the Asian markets. If that is the case then one will be forced
to conclude that, technical analysis does not have any predictable ability. However,
model electricity price German data. Their conclusion was that the “extended
model” did actually capture the characteristics often exhibited by power data, and
ARMA in particular.
forex markets. Their results confirmed the forecasting ability of these tools;
however their study did not test the suitability of these tools to different markets or
data.
19
Burgess (2003) used daily closing price of the STOXX 50 index to examine the
relationship, which included an error correcting (ECT). This error term can be
ECT can used in statistical arbitrage trading strategy in general and pairs trading in
particular. Since the ECT model is an equilibrium model; which tend to revert to its
long term mean; it is this property which enables it to be used for hedging and
trading purposes. The result from his study provided a further proof of the
Chaun et al. 2001 applied two technical trading rules- moving average (MA) and
Channel rules (CR). They applied this to 13 Latin American currencies. In addition,
the use of their research is to find out whether theses markets are efficient. They
found out that four of the currencies showed positive returns for MA and only three
for CR. The four countries include: Brazil, Mexico, Peru and Venezuela and the
remaining three, Brazil, Mexico and Venezuela. Their result suggested that the
difference in the returns of the trading rules was due to statistical properties
Bracj et al. 92, tested technical rules namely moving average (MA) and Trading
range break (TRB), using Dow Jones Industrial index data from 1897 to 1980.
Their result proved highly positive returns from these technical rules. However the
returns from “academic” tools such as AR(1), GARCH-M, random walk and
Exponential GARCH models, were not consistent with the trading rules. Their
studies focused on simple trading rules we the hope that it can be further extended.
Their result proved that technical analysis does have predictable ability over the
20
academic ones. In addition the found out that technical analysis do account for the
patterns include returns for long signals are larger than that for short.
profitability of trading system. They used CRSP stock from 1976 to 2003. Their
funding suggested that the system did not provide consistence returns. Previous
researcher however used small samples which provided consistent returns. Thus in
their final conclusion they suggested that profitability of any trading system
Burgess (1990) in his thesis examines the Statistical Arbitrage (StatArb) model as a
simpler form is pairs trading; which involve buying one share and selling the other,
unlike pairs trading, StatArb exploits the mispricing of more than two shares in a
portfolio, by buying one set and selling the other. Neil Burgess used Cointegration
as the main statistical tool for his thesis. He selected series of cointegrated stocks
and then modelled the mispricing using the Error Correction model concept, with
the aim of capturing the mispricing of the stock in the portfolio. Finally he used a
risk minimizing techniques to select the best stock for the portfolio. The closing
prices of the FTSE 100 index and other indices were the main source of data. He
Furthermore the model ensured profitability with or without transaction cost under
certain risk limits. However in his views the result was inconclusive, since the data
used were historical, which did not take into consideration, real data in a trading
21
do in his own words, ”demonstrate significant potential”, hence calls for further
research.The next section gives a brief description of the models that are widely
used by researchers.
The ARMA model assumes a set of data with an error term that normally
p q
distributed. The general model is of the form: Yt = iYt i i
t i
~.
t
i
1 i0
p
components, autoregressive (AR): Y = iYti
~ and moving average
t
i1
q
(MA): Y = it i . The observations are usually calculated based on previous
i0
d Yt 0 1 ...
1 Yt
d
p Yt p
d
t 1t1 ... q t q
Where: Yt Yt Yt 1 . The parameters are estimated by applying the maximum
r p
t2 it2r d ti it2i . The parameters of this model are usually
i0 i0
estimated using the maximum likelihood principles. The error terms are assumed to
be random and follow a normal distribution. There are different types of GARCH
22
models; which are distinguished by their parameters and most are suitable for
electricity price modelling; as they tend to capture the extreme volatilities. The
model.
Naïve methodology
random error. Random walk is not mean-reverting, in other words the price does
not return to the mean of the prices. Its trend cannot therefore be predictable. The
Naïve model is simple and enables us compare actual values with forecasted ones.
It does not take into considerations factors such as trends, seasons and in addition
model: Yt o X t 1 (Yt1 X t1 ) t or three variable
version: Yt o X t 1 t 3 (Yt1 0 X t 1 1 t 1 ) t , were Yt1 X t1 is
the error correction term (ECT). Furthermore provided that Yt and X t are co-
though the constituents are I (1). ECT is a short term deviation from the long-run
speculative profit. Burgess (2003) examined this technique in his thesis. Similarly
Law et al (2004) used the above techniques to test for market efficiency of futures
23
Y=a +bX +e
According to them for the requirement of market efficiency the following four
iii. B the slope equation must be equal to 1, with the constant a=0
In other words for a short term efficiency, ECT must exist. They held the view
shared by other researchers, by stating that for inefficient market traders can take
advantage of this to make profits. Their final conclusion stated that a fair amount of
profit and losses could be made by using trading strategies. This conclusion will be
tested using different trading strategies and data. The trading strategy will be tested
The recent growth of energy exchange such as Nord Pool has generated a lot of
interest in modelling and pricing electric futures. The next section gives an
24
European Electricity markets: an Overview
Nord Pool power markets embraces Finland, Sweden, Denmark and Norway,
emerge as a result of deregulation that is sweeping throughout Europe and the rest
paving the way for private sector participating in the sector thereby increasing
making it an important tool in a free market economy. This has made Nord Pool a
multi billion market which is rapidly evolving and developing. Risk management
practices which are common with financial assets such as stokes and bonds in the
new market. The Nord Pool sports market is called Espot Market. It is an auction
based for trading in physical power, which uses bid for buying and selling. There
three types of bids: hourly, block and flexible. Market participants after submitting
their bids a spot price usually called system Price is calculated by using aggregate
supply and demand curves. The intersection of these two curves forms the system
Price. The system price is a reference price for all contracts traded in the derivate
prices, seasonal variation, reservoir levels and other bottlenecks that affect the four
Nord Pool members. To be able to model power prices effectively there is the need
researchers about the unique features exhibited by electric prices. These views
bottlenecks. Nord Pool specific reasons for power prices various are not so much
different. Their annual report of 2006 provided reasons for theses price fluctuations
25
excerpts of which follows:
Economic Factors
The main economic factors which influences prices was identified in the report
capacity. Increasing generating capacity brings into its wake increase in supply
with its attendant low prices, depending of other relating cost. Business cycles with
Europe and the rest of the world affects power generating inputs such as coal, any
fluctuation in prices of any of theses do affect power prices in the Nord Pool
generating area. Most of the raw materials used in power generation are priced
using the US dollar which is subjected to fluctuations. Nord Pool benefits if the
Nord pool electricity is generated from sources such as hydro, nuclear and coal;
any factor the affect theses source is likely to affect the supply and consequently
the prices. Similarly, rain, snow tends to raises the level of the rivers that feed the
high precipitation leads to high supply and lower prices; while a low precipitation
Finally temperature trends within the year do affect prices. For instance colder
temperatures in winter month’s results I high demand for electric and consequently
high prices.
Electricity transmission bottle necks affect prices in two ways; firstly limited
capacity in the networks tends to affect supply and demand. If the demand exceeds
supply in such areas, prices would tend to rise. Secondly, other non-Nordic markets
26
trade with Nord Pool with recorded inflows and outflows, power supply and
Commodity Prices
The cost of commodities such as coal, raw which serves as inputs or raw
stations in European rely on identical inputs - these two markets compete for this
essential commodity, thus pressures due to supply and demand have an enormous
Inputs such as coal, gas do emit carbon dioxide, thus generating stations are
required to buy EUA and the cost is therefore incorporated in pricing of power.
Nuclear power stations account for 30% of the power supply, any factor the affects
Thus the key factor listed above explains, seasonality, cyclical pattern and
explains the System Price path. These unique features of power markets present a
challenge and thus call for new models development and study.
The Nord pool ASA is one of the third arms of the Nord Group; this financial
Market is made up power producers, retailers and stock brokers. The aim of theses
participants is to use the contracts traded in this market to manager their risks.
Contracts traded includes: base load futures, forwards, options and contracts for
difference (CFD).The futures contracts consist of: day contracts base load for the
period of 24 hours; weekly contracts; base load for a period of 7 days. The
27
Contracts period ranges from eight to twelve months. The future settlement uses a
between final closing prices and the System Price. Daily gains and losses are
reflected in the mark-to-market settlement. The Forward on the other hand consist
profit and loss is accumulated and realised at the end of the trading period.
Option Contracts
Options contracts are one of the derivatives traded at Nord Pool ASA which offers
exercisable only at the exercise date. Most of the contracts consist of quarterly and
yearly forward contracts. New contracts are listed at the expiration of the old ones.
Exercise day is usually the third Thursday of the month before delivery. Strike are
normally set buy the pool, with a price which is usually quoted in EUR/MWH and
a tick size of 0.01 EUR. Well know option strategies such as straddles; strangle
which combines calls and puts are used by traders wanting to make profit.
An alternative to futures and forwards contract is the CFD, which is the difference
between and area price ant Nord Pool System Price. CFD is considered to be a
forward contract that is used to exploit prices differential in the System price.
Growth
According to the 2006 Account Statement, Nord Pool is the largest Power
Exchange in Europe with volume of trade amounting to 2220 with market value of
Euro 79.2 billion traded in the Financial (OTC) trades alone- an increase of 3% and
51.35% in the previous year. Similarly contracts in the financial market in 2006
28
amounted at a value of 766Twh with a corresponding value of Euro 36.3 billion
and a total transaction of 89147 and increase of -2.55%, 52.57% and 16.81%
respective love the previous years. Thus the market has seen a phenomenon growth
S&P500 Index
The S&P 500 index is made up of 500 leading companies in the US, with about
companies include world renowned ones such as: Microsoft, Cisco Systems,
General Electric, AT&T, just to mention a few. Thus the S&P500 can be used as
proxy of a perfect market; it also has an added advantage of reflecting the common
29
A few researchers has research into mainly modelling and pricing of electric
futures; but little in terms of modelling and forecasting an important product such
other exchanges. The aim of this dissertation is to apply the methodologies and
tools enumerated in the literature review, to power price data. Common statistical
and forecasting tools which are available to most researchers will be used to model
and forecast the price data with the aim of finding out any predictability power and
Technical analysis is a method used to analyse past data with the intention taking
investment and trading decision. Techniques have been developed to determine for
example: trends, cycles commonly found in market data. Market traders generate
profits by following the market trend which can be an uptrend, downtrend or range
bound. Chapter 3 introduces some of theses trend measures and the signals they
often generate and finally the main strategies often associated with them. The
indicators are constructed by using a formula to transform a price data series into
another. Theses indicators are of graphical nature usually plotted on the price data
30
Figure 2: Graph showing moving average on the price data; Volume and MACD
indicators at the bottom, traders use these indicators for short term forecasting.
31
Chapter 3 Methodology & Methods
Introduction
This chapter examines the forecasting models in detail, their properties, method of
constructing, evaluating and comparison. The final section briefly examines models
of some of the technical indicators and a list of trading rules often used in
conjunction with them. The remainder of the section provides a list of some of the
Box Jenkins classical methods are one of the best econometric forecasting tools. It
Jenkins methods unlike random walk model are mean reverting and stationary.
They have other properties such as, trending, deterministic, which makes them
The autoregressive (AR) model is a class of time series denoted by AR (p) and of
the form: ~
Yt 1Yt 1 ... p Ytp t =1, 2… T. 3. 1
t
p
= i Yt i
~
t 3. 2
i1
32
Similarly the Moving average (MA) model is of the form:
q
= i ti
i0
(AR) process. It is unvaried in nature and therefore suitable for modelling spread
provided an appropriate values for p and q are chosen, it also has the capability of
models are traditional method of modelling electricity prices. The ARMA (p, q)
p q
Yt = i Yt i i ~
t i t 3. 4
i1 i 0
ARIMA (p, d, q)
ARIMA (p, d, and p) model is and extension of ARIMA (p, q) model with an
d Yt 0 d
1 ...
1 Yt p Yt p
d
t 1t1 ... q t q 3. 5
33
Vector error correction model (VECM) & Vector Auto regression
(VAR) methodology
VAR can be used to forecast electricity prices since it does not need any theoretical
justification for its use. It is capable of explaining the random disturbances that
influences the spreads, since it treats the two arms of the spread as endogenous
variable. In addition is also enables the impact of demand and supply as well as
into the model. The model for Spot(S) and Forward (F) are:
VAR (p);
p p
S t o i S t i i Ft j t . 3. 6
i
1 j1
p p
Ft o i S t i i Ft j t 3. 7
i
1 j1
VECM (p)
p p
S t o i S t i i Ft j 1 ( St 1 0 1 Ft 1 ) t 3. 8
i
1 j1
p p
Ft o i S t i
i Ft j
2 ( S t1
0
1 Ft
1 ) t 3. 9
i
1 j1
34
General VECEM (p)
Pt o 1 Pt1 2 Ft 1 3 Gtl ( Pt 1 0 Ft1
1 G t1 )
ˆt ; 3. 10
The error correction term defines the long term relationship between variables
Cointegration method
If variables are co-integrated then the spread deviation will not depart from the
long equilibrium position in the long-run. Trading strategies can then be set up if
the variable co-integrated otherwise the spread will deviate without bounds thereby
level with the same order of integration. A stationary series has the additional
are going to test for co-integration using Johansen approach. Let consider the
following equation:
Yt Yt 1 t 3. 12
If 1 , equation (1) is said to be integrated of order 1- I(1) and non-stationary and
of unit root. A unit root can be tested by using augmented Dickey Fuller (ADF) and
35
n 3. 13
Y t 0 1 Y t 1 i 2 Y t 1 i
i 3
Where, Y indicates the various prices and Yt Yt Y t 1 with n the number of
lags. The test will examine whether the coefficient 1 is < 0, an indication of
alternative of: H 1 : 0 . A rejection of the null hypothesis indicates the presence
of a unit root. If the first difference of the series is stationary, ADF and Phillip-
test. If the test suggests the presence of autocorrelation, further test should be done
The first difference rejected the null hypothesis of a unit root at levels, 1%, 5% and
10% respectively. This is an indication that System and Helsinki spread series are
The next section introduces pairs trading; an application of ECT concept; which is
a Statistical Arbitrage method in its simplest form. The System and Helsinki prices
will be used to model a portfolio which will be tested later using a moving average
strategy.
the two variables in the spread. If, it indeed exits, then there must be a temporary
widening of the spread in either direction and in addition the two arms of the
spread must be capable of reverting to the long term mean. This will enable traders
to short (buy) the spread. This amounts to testing for statistical arbitrage. Johansson
36
co-integration test is use to find a long-term spread equilibrium. Firstly an in-
“The fair value of the spread is then calculated”, based on the above relation
If PP t < S t , then go long the spread until fail value is gained, similarly
Evans & Laws (2004), the standard and correlation filters are then applied. The
result of the Cointegration test of the System and Helsinki prices proved that they
possible to form a portfolio, V of the two asserts of the form: V (t) =100S t -
1.9635H t .The trading strategy is: buy if V>0(mean), sell otherwise. The mean in
this regard can be the moving average of the portfolio values. If transaction cost k
is included; the new trading rule becomes: Buy if V MV K , sell otherwise;
1 m 1
with the moving average, MV= V m i .
m i 0
The next section examines the two main volatility models which are going to be
37
Volatility Model methodology
Introduction
On examination of the System price reveal that they are very high during winter
and summer months. Other period tended to be relatively stable but price spikes
appear to be evenly distributed throughout the period under study. This behaviour
commodities prices such as crude oil, interest rates and equities. The best model
(ARCH), they have been shown to model leptokurtic distribution effectively. Some
The Schwartz single factor model can be used to simulate the System Price:
GARCH (1, 1) is one of the stochastic volatility models. It models data with
varying volatility it is of the form: r t = c + t with, t2 w0 w1t21 w2 t21 .
Where; t2 is the conditional variance of the returns and t21 ; the squared random
St
error component, r t is the logarithm of the returns, define as: r t =log ( ) ; and
S t1
38
TARCH Model with seasonal dummies
seasonal patterns. There is therefore the need to use a model which captures
conditioned on the past errors is the most is the best in this situation. TARCH or
rt t t
q r p
t2 j t2j i t2r d t i i t2i Di . 3. 15
j
1 i 0 i0
“Good news means t i 0, and bad news t i0 , have differential effects on
the conditional variance; good news has impact on i , while bad news has
impact of
i i . If i 0, bad news increases volatility, and we say that there is a
leverage effect for the i-th order. If i 0 , the news impact is asymmetric”
TARCH (1, 1) model is of the form: t2 t21 t2l d t 1 t21 Seasonal
2 3. 16
1 0.5
39
The GARCH-M volatility model has been found to incorporate the mean equation,
and therefore provides a good forecast, thus it will be used as the main forecasting
Summary
We have examined the properties of the main forecasting tools, which include
Random walk, Box Jenkins and GARH volatility models. The strength and
limitation and the context under which they can be applied was also explained.
Finally the concept of Cointegration was also examined. In the next section the
actual series will be model, examine, with an additional aim of finding properties
such as: stationarity and mean-reverting. The existence of these properties will lead
Spread Series
This section will examine the suitability of the mean-reversion model as applied to
electricity futures prices, using test for normality and mean reversion. The
quintile plots, kurtosis and skewness. If the statistics indicate a small negative
skewness and high kurtosis the jump diffusion process is appropriate for modelling
the future price. Finally, a clear understanding of sport futures price dynamics will
be explored in this section. The data to be used consist of closing prices of the
following futures: System Price (SP), Helsinki Price (HP). The period of the data
is from 29/12/03 to 31/12/04, with all data coming from Nord Pool (NP).
40
The following formula show how the spread series R t - CFD is defined as:
HP HPt1
SP SPt 1
“R t = t - t 3. 17
HPt SPt 1
Where:
41
Data Description
Daily closing settlement price from the Nord Pool Power Exchange, with data
split into two samples. The first is in-sample and the second is out-of-sample. The
in-sample is used for initial test and modelling. The in-sample will consist of the
first 250 sample. Whilst the out-of-sample is going to be use to evaluate the
forecasting accuracy and testing the trading strategies, the last 150 prices will be
used as the out-of the sample data. On the examination of CDF daily prices, it was
frequent prices spikes”. They attributed this short term fluctuations to non-
storability of electricity which leads to peak supply and demand not being able to
normal nature of the data, this was confirmed by the Jarque-Bera statistics. The
data is highly skewed with very high kurtosis which also suggests non-stationarity.
Theses evidences calls for the data to be transformed to make it stationary. A log
difference of the CDF series also showed the spiky nature of the series. The
stock market prices. Swider (2006) and others viewed this characteristic as fat
tails, hence call for a new form of modelling which incorporates conditional
presence of heteroscedasticity.
20596.20 which lead to the rejection of the normality of the price distribution. The
42
data was transformed by taking the logarithms of each of the prices. A log
stationarity using Dickey Fuller (ADF) test and Philips-Peron test statistics rejected
unit root at significant level of 1%, 5% and 10% respectively. Thus the log-returns
are stationary. The summary for the log-returns showed a very large kurtosis and
skewed data. The Jarque-Bera statistics rejected the normality of the returns. It
financial data. A close examination of the Quantile-Quantile plots proved that the
log-returns is not normal, as there were some data at the extreme ends of the
reference line- a clear departure from normality. Thus the log returns is leptokurtic
Merton (1970) initiated the idea of jumps in financial models and subsequently a
lot of researches followed suite. However, the approach used in this section is
based on the one developed by Lumberton et, al (1995). They argued that Black-
Scholes model assumes complete market scenarios; rare events such as earthquakes
model that in their view captures this jumps as they called it. Thus financial data
with jumps can be modelled by extending the Black-Scholes model to cater for
random variables, the random variable N t is said to follow a Poisson process with
(t ) x
P( N t x ) e t x=0, 1 …n
x!
43
With the following properties:
E (N t ) = t, Var (N t ) = t
Let begin the derivation of the jump process by using a risk less asset define by S
(t) =e rt
Where, r is the interest rate and t the time. Let define the proportion of jumps by
consideration the following random variables: 1 , 2 ...k ... at the within jumps
times’ define by: 1 ,2 ,....k .. and assuming each of the jumps follows a Poisson
process.
Let assume the variables: w1 , w2 ,... for t>0 follows a Brownian motion. Finally let
assume the price of the asset is X t for t> 0. According to D. Lumberton, B Lapeyre
X k X k X k X k U k ,
Thus X j =X (1 U k )
k
X t X o e ( / 2 ) t wt
2
X 1 X o e ( / 2 )t w1
2
44
( 2 / 2)( t 1 )
X t X 1 e ( wt1 wt1 )
0
With the convention 1 j 0
t N f
long term level. Theses are models base on Ornstein-Uhlenbeck process and are of
the form:
dP t =
ln Pt
Pt dt Pt dWt (2)
The model can be amended by adding another term with takes care of jump
diffusion or spikes. This model is the Clewlow & Strickland (2000) jump-diffusion
mean-reversion SDE
dP t =
K ln Pt
Pt dt Pt dWt +P t dQt (14)
Where, Q t is a Poisson process with intensity k, and jump size that is distributed
normally with mean j and standard deviation j . The forecast model is:
Clewland & Strickland (2000) estimated these parameters using a Recursive Filter
Which caters for autocorrelation, where, Pt is the price at time t, the long term
45
Integrating the equation gives:
t
P t = e t S o (1 e t )
e ( st )dWs
t0
(3)
Pt =c + Pt 1 t
(4)
(5)
12
R t =Dt AR (1) t
t 1
(6)
Seasonal dummies are included in the model to capture the effect of weather
Parameter estimation
The parameters that are going to be estimated include: Mean reversion rate, jump
rate, standard deviation of jumps, and average number of jumps. Finally diagnostic
tests will be conducted on all the equations for parameter breaks, outliers and
ARCH effects.
dP t =
t ln Pt
Pt dt Pt dWt (7)
46
Where:
Pt = t + t Pt 1 t . (9)
This is an ARMA (1, 0) model with dummy exogenous variable which takes
Introduction
Monte Carlo method is going to be used to simulate future price using its historic
parameters, since the simulated returns are realistic and closer to the market data.
The parameters to be estimated from the actual market data includes: mean,
deviation, mean reversion rate, jump rates. This is an aid to choosing the right
model. Figure 3.0 shows the logarithms returns of the system price. Theses returns
do fluctuates around zero, which must be due to supply and demand, weather and
47
30-Day Volatility
0.080
0.070
0.060
volatilty
0.050
0.040
0.030
0.020
0.010
0.000
0 50 100 150 200 250 300 350 400
time
Figure 1 shows the system price volatility using a 30-day rolling returns. The
Figure 3.15 show a comparison of the logarithm of the system prices and 30-day
rolling standard deviation. An inspection of these two paths show that prices are
much higher in summers and winter as shown by the peaks or spikes. Theses peaks
48
30-day volatility & skew
6.00
5.00
4.00
3.00
Returns
2.00
1.00
0.00
-1.00 1 39 77 115 153 191 229 267 305
-2.00 30-day skew
-3.00
30-day volatility
Time
System price
Figure 3.3 shows a plot of 30-day volatility and skew. There appears to be a
relationship between skew and volatility, if the volatility is positive skew tends to
be the same, however if the volatility decreases the skew decreases and sometimes
with a negative value. In other words there is a correlation between volatility and
Modelling
dX = (
ˆX ) dt dz
3.2
2
With
ˆ
2
3.3
49
The speed of adjustment a non-negative constant , which measures the rate at
dX = (
X ) dt dz 3.4
Where:
mean reversion, which takes into consideration the convergence of the spot prices
to its long term mean, thus balancing the supply and demand fluctuations. S is the
spot prices, ̂ is the mean and the volatility and dz is a Wiener process; is the
mean reversion rate, which is always positive. The long term mean of the spot price
ln( 2)
The half-life is this measures the time taken for the series to revert to its long
term position.
t
e
t t z
X t xe e dW z 3.6
0
1 e 2 t
Var(X t ) =E ((X t -[E ( X t )] 2 ) =2 3.8
2
50
For the purpose of simulation a discretised form of equation (3.1)
X i = X i 1 + (
ˆX i1 )t
i t With S (t) =exp(X i ) 3.9
The various parameters of the mean reversion model can be estimated using a
linear regression. Clewlow & Strickland (2000), method is simple yet robust means
of estimating the parameters of the model, we are therefore going to employed it.
be from historical price change Yt ; using Excel function STDEV and annualised
assuming a 252 trading days, with the annualised standard deviation taking the
form: 252 .
Similarly excel function STEYX - returns the standard error of the predicted y-
value for each x in the regression, was also calculated. The remaining parameters
= speed =- slope
Half-life =ln2/speed
The path is simulated using Monte Carlo method in combination with variance
negatively correlated with the first one; one additional equation will be needed:
51
X j =X j 1 + (
ˆX j1 ) t (j ) t 3.3
The average of the two paths is then calculated using the following relation:
ˆ0.04,
ˆ447.054,
ˆ0.0024 . The following equation was used to simulate
t is defined as T/N where T is the time and N the number of intervals. The path is
1600.00
1400.00
1200.00
1000.00
simulate values
800.00
Original values
600.00
400.00
200.00
0.00
1 36 71 106 141 176 211 246 281 316 351
Figure 3.0 shows the simulated path and the original, clearly this are similar, thus
The model to be used in simulation of the jumps is the Merton diffusion Model:
52
X i X i 1
ˆ(
ˆk X i 1 )t i t (
j )( i t )
Where:
Jump Diffusion
1600.00
1400.00
1200.00
System Price
1000.00
Jump_dif fusion
800.00
Non_jump path
600.00
400.00
200.00
0.00
1 46 91 136 181 226 271 316 361
Tim e
two models; with the first following Geometric Brownian Motion (GBM):
and the second is the instantaneous convenience yield model which is mean
53
where: dz 1 and dz 2 following a Browning Motion and correlated with correlation
coefficient .
1
dX ( 12 )dt 1 dz1 (3)
2
Where: is the dividend rate with risk adjustment factor r- , thus the electricity
price, this factor incorporate the storability of assert. Both equations can be
expressed as:
With dz 1 *dz2
dt
1 2
X i1 X i (r i ) t 1 t
2
dX t
ˆ(
ˆX t ) dt t dz
ˆ
X t X t 1 (X t 1 )t t t t
The time varying volatility is estimated using a 30-day standard deviation with the
54
sole aim of including the seasonal cycles.
and diving the result by n. SMA always lags behind the market, however it is
SMA can be used to indicate a buy or a sell signal. For example if the market price
falls below the SMA at time t gives a sell signal and the reversal indicates a sell
signal.
Trading Rules:
n
SMA n Pi / n ; where P t is the stock price at time t.
i1
developed out of the short comings of the ordinary moving average (MA). EMA
incorporates older data often discarded by MA. The deletion of earliest trading data
on recent prices is often ignored. Thus EMA was developed to address these by
55
For example a 26-day EMA, the weight: w 26 =2/26+1 =7.4%
Similarly the formula for calculating the EMA for a particular t is:
Mullory in 1994. Fot Staff applied this in the December (2007) of Futures &
which aims at reducing lag which is commonly found in all moving average
constant or factor which provides an advantage of adding weight to the price. Thus
DEMA=2*EMA(x)-EMA(EMA(x) ).
“The DEMA calculates the difference between two components: a doubling of the
basic EMA value and “double smoothing” of the EMA value-an EMA smoothed by
a second EMA”
Fot Staff computed DEMA and EMA using two MACD systems. The main
difference between the two was the components. The first system used DEMA and
the second EMA, was used as the standard. A summary of the result of the two
56
systems is shown below:
The net profit for the DEMA system appeared to be much better than the standard.
This trading system can be improved by an addition of Bollinger Bands with the
uses initially a 12-day and 26-day EMA; however it can be adjusted for short or
longer periods. The 26-day EMA is subtracted from the 12-day EMA:
In addition to the MACD line there is another line often referred to as the signal
line, which is a nine-period EMA. MCAD oscillates about zero; if it is above the
signal line (SL) then a buy signal is generated; similarly if it is below zero a sell
signal is generated. In other words a buy signal is generated if the MACD line
crosses the signal line from below. Similarly a buy signal is generated if the
MACD crosses the signal line from above. However downward signals are not
57
always reliable therefore other measures such as RSI are used in conjunction with
In addition to MACD line, there is one other line which represents the signal line- a
9-day period EMA. This is also plotted on the same chart. The difference between
these two lines is often depicted below the main charts. The histogram trend is
In situations where the MACD is above zero or below zero for the entire period;
an upward trend with buy signals should be followed. Buy signals are located
where the upward trend starts and the intersection of the EM 9 signal line-buy
signals are above this line. Downward trend in this situation are not profitable
therefore ignored.
Finally, the peaks and troughs as illustrated in the histogram can provide bits and
A Bollinger is made up of two lines one above and one below a moving average
Line. Each line is calculated based upon a certain number of standard deviation
Traders use 20-period simple moving average. Two standard deviation added to
plot the upper band similarly two standard deviation are subtracted to plot the
58
lower band. The bands are adjusted automatically with regard to the price changes
or volatility.
Trading Rules:
RSI measures the strength of the market by removing erratic price movements.
Furthermore, it has the advantage of detecting market reversal. RSI scale range
from 0% to 100%.If 30 %< RSI< 70% indicates a warning signal. If RSI > 70%
30% indicate an oversold. A RSI value of 80% and 20% are preferred by market
a buy signal is generated. In other words RSI compares “up days” to “down days”
RS=Up/Down
100
RSI =100-( ); with 0<RSI<100. Traders normally use a 14-day period.
1 RS
Introduction
ADX system was created by Wells Wilder Jr. It can be used as a stand alone
filter or in conjunction with a trend following system like moving average. The
59
Directional Movement Index (DMI) indicates trend and in addition measures it.
DMI is on a scale of 0-100, the higher the better for a potential tread.
ADX is used together with +DI and –DI. A signal is generated when +DI and
ADX Algorithm
denotes today’s high and low values respectively. Using these values +DM and
TR=max (|T h –T l |, | T h - Y c |, |T l -Y c |)
DM i
it N 1
+DI (N) t = t
TR
it N 1
i
60
t
DM i
it N 1
-DI (N) t = t
TR i
itN
1
DI ( N ) t (DI ( N ) t )
DX (N) t = * 100
DI ( N ) t ( DI ( N ) t )
at a time t as follows:
DX (N )
itN
1
i
ADX (N) t =
N
Trading rules
exponential (EMA) and a standard (MA) will be used to identify the trend and to
reduce lag thereby providing a robust trading system. Both of the moving average
has the advantage of smoothing out data with EMA being the more aggressive and
hence tracking price effectively, however both of them lag the data.
61
Moving Average
91.40
91.20
91.00 sell buy Prices
90.80
10-Day MA
90.60
90.40 10-Day EMa
90.20
90.00
0 5 10 15 20 25 30
Time
The system will be traded on the buy side only. A buy signal is generated if the
EMA cross the MA-the signal line and above the price curve. All other buy signals
are ignored until an exit signal is triggered; this is when the EMA line crosses
below the signal line. However, traders usually wait for confirmation from the
price movement and other indicators such as stochastic, relative index, before
entering the trade. This is a simplest trading strategy that can be executed by any
62
Review of Performance measures
Introduction
In this section we list some of the performances measures statistics and the
information they captures. We are going to look at three main groups of measures:
Forecasting Measures
There are three main ratios which are use in practice to compare the forecasting
abilities of the various models. The ratio measures the difference of the forecasted
1 N
RMSE=
N t 1
( y t yˆ
t)
2
1 N
MAE= ( y t yˆt ) 2 .
N t 1
RMSE and MAE according to E-views 5 TM are used to compare the “forecast for
the same series across different models; the smaller the error, the better the
N t
1
MAPE=
N
y t y t / t
t N 1
63
Theil Inequality Coefficient (TIC)
1
yˆt y t 2 / h
N
TIC=
yˆ/ h yˆ / h
2
t t
MAPE and TIC are similarly, according to E-views 5; “lies between zero and one,
where zero indicates a perfect fit”. There three other ratio statistics: Bias
Profit Measures
Profit statistics are used to indicate the profitability of a strategy. Any rule based
strategy are meant to generate profit, therefore an appropriate rule must be put in
place to ensure profitability, which must stand the test of time. The following
statistics are used to measure the profitability of a strategy. The ratios will be used
Total Pr ofit
Profit Factor (PF) =
TotalLoss
AverageTrade
3. Payoff ratio (PR) = . A PR greater the 5 is
AverageLos sin gTrade
preferable.
64
Netprofit
4. Efficiency Factor = a value between 38% and 69% is
Grossprofit
preferable.
Risk Measures
Risk is usually inherent in any trading strategy. Therefore any rule put in
place must be able to account for risk. This section looks at some of theses
measures.
risk.
Netprofit
2. Net profit drawdown ratio = .
max imumDrawndown
n
Where Maximum drawn down = min [ Rt Max(rt ) ]
t
1
This ratio is also referred to as a recovery ratio and a value greater than two is
preferable.
Re turns
3. Sharp ratio=
SandardDeviation
added advantage over Sharpe ratio which measures both downward and
upside volatility.
Where gross profit is the profit from profitable trades and gross loss is the
65
6. Percentage winning trades= Average of winning trade.
The aim of this method is to separate dynamic spread from static spread based on
66
Trading Rules:
Equity Curve
The Equity curve is a plot of cumulative profit over time. It provides a visual
representation of profit and losses over the testing period. A perfect equity line is a
straight line through the origin. Any deviation from this is usually due to
Equity Curve
50.00%
Account Balance
40.00%
30.00%
Account
20.00%
10.00%
0.00%
1 40 79 118 157 196 235 274 313 352
Time
67
Under Water Curve
Drawdowns
0%
-20%
-40%
% Drawdowns
-60%
-80%
Drawdown
-100%
-120%
-140%
-160%
-180%
Time
Figure 9: The diagram shows the drawdown of the output of a trading strategy.
representation of the draw downs over time. The percentage draw downs measure
the maximum percentage of decline of equity from the highest value. The smaller
the ratio, the better the system or strategy. A value less than 20% is effective in
minimizing risk. The output of a trading strategy show on the diagram gives a
summary of the draw downs, which shows several draw downs greater 20% with
Summary
Kirkpatrick, CD and others [2006] sums up what a good trading system is:
“In his book, Beyond Technical Analysis, Tushar Chande discusses the
Small number of robust trading rules-Less than ten each is best for
68
Able to trade in multiple markets- Can use baskets fro determining
drawdown should not be mores than 20% and should not last more
system”.
The next section discusses results of the application of the out-of-sample prices to
the moving average trading strategy. The S&P500 price index will be compared
with Nord pool electricity prices. Since these indexes are similarly influenced by
factors such as demand and supply, changes in prices of commodities such as gas,
69
Chapter 4 Findings
Introduction
This section summary the results of the forecasting tools, and the application to the
moving average strategy. On the examination of the electricity prices, it was observed
that they do indeed exhibit volatility clustering. This was confirmed by Jarque-Bera
few outliers, a further confirmation of the departures from normality. Thus the data
fat tailed which called for a model which would incorporate this property. Finally, the
results of the GARCH test showed that all the terms including the asymmetric ones
proved significant. The coefficient of the asymmetric terms was negative, thus
pointing to a high variance in the following period. In addition the sum of the
coefficients was less that one, which provided the evidence of the persistence of the
conditional variance.
Each of the forecasting tools was tested with regard to their forecasting ability using
RMSE. The one with the least RMSE was then chosen. The moving average trading
strategy is then applied using the out-of-sample from the best forecasting tool. The
period, the reason being that market participants use a day–ahead forecast which
consist of 24 hour auctions, where orders are bid until demand are met. Out-of–
Ordinary least square forecast was found to have the least RMSE with Naïve method
the worse; Table 4.1 shows a summary of the results. Hence it was made the model of
choices for the trading strategy. Table 4.2 similarly shows the ratios of the trading
strategy.
Naïve 45.0633 6
GARCH-M(dynamic) 4.854295 3
Box-Jenkins 7.971633 4
VECM(dynamic) 20.418411 5
VECM(static) 4.631233 2
OLSQ 2.5788 1
Ratios
71
A summary of modelling process of ARMA time series
A graph of the time series of the S&P500 suggested the presence of cycles and
some trends. This was however transformed into a stationary one using logarithms
and first differences. ADF test on the data confirmed stationarity. Similarly, the
model. Model estimation was carried out, with the result indicating significance of
the model parameters. An ARMA (6, 6) model was then used to produce an out-of-
sample forecast. The mean square error of forecast indicated that, the static forecast
was better than the dynamic forecast, since it provided the smallest MSE. In the
next section the forecasted out-of-sample data will be used as an input for the
The trading strategy was applied to the S&P500 index; without the use of any
forecasting tool. These section summaries this result with the aim of using this to
compare the output from other data where academic tools have been applied to,
different data from different environment. The equity curve shows some losses
initially but was increase in a passage of time with a steady trend. There was
however reversal which was due to drawdown’s. The trade system had a low
since it is far greater the 13%-the standard. There were a lot of drawdowns which
was lower than -20% recommended for a robust system. In particular there were
drawdown reported by the system was about -2.5% which is less than 20%
recommended. From the statistical ratios the trading system befitted from both
direction, however the system could minimize loss due to potential reversals if
forecasting tool)
Ratios
73
Table 5: Summary of ratios of the result of S&P500 trading strategy with ARMA
Ratios
74
Summary of Trading Strategy Analysis of Pairs trading
Ratios
75
System price and MACD
Table 7: Summary of the ratios of MACD trading strategy applied to yearly System
index
Ratios
76
Table 8: Summary of the ratios of MACD trading strategy applied to yearly
S&P500 index
Ratios
77
Chapter 5 Conclusion
In this dissertation the forecasting ability of a series of forecasting tools was tested
with the aim of finding their use in a trading environment. The returns from
strategy (MACD) the various forecasting, profitability and other ratios was then
generated. The CDF series was modelled using ordinary least square, the out of
sample forecast was then simulated by the MACD strategy. Similarly S&P500
prices were modelled by ARMA and the out–of-sample was simulated using the
MACD. The trading strategy was simulated using S&P500 price without the use of
any tool. Finally, the usefulness of pairs trading concepts was tested using MACD.
A summary of the ratios generated by trading strategy is shown in the Table 5.1
below.
data set.
Number of Up Periods 35 33 37
78
Number of Down Periods 35 36 34
Number of Transactions 23 8 19
before the strategy starts making profit. For the purpose of comparison we assume a
maximum drawdown of 20% or less, any other ratio represents a risk to the trader.
The table suggest all the drawdown ratios are reasonable, since they are all less than
20% the limit. However the best drawdown has a value of -0.17%; this was from
the OLSQ technique. The worse was from the trading pair’s strategy which gave a
value of -65.5% The best maximum daily profit was 29%, which was from the pairs
trading strategy, followed by 20.7% when the MACD was applied to the System
price. The two ratios were more than the minimum of 16% suggested by analyst.
The OLSQ ratio was 8.4%, with the rest generating lesser ratios. Thus this result
suggested that the more risky a strategy is, the better the returns.
The Correct Direction Index (CDI) is an additional tool used in conjunction with
79
RMSE to measure the direction ability of the forecasted variable; a positive CDI
indicates an increase price value. All the types produce positive values, with OLSQ
generating the biggest ratio of 0.24; the pairs trading strategy produce a least value
of 0.1186.
We conclude based on the above a ratio that OLSQ is the best forecasting tool for
electricity prices and can be used in all markets. However the ratios used were
calculated from past data, with different sample size. The applicability of these
ratios in a trading environment cannot be relied on, since it did not take into
transactions cost was not taken into consideration. The losses generated by the
strategies were very huge, thus any future research in this area should take into
Thus in spite of the above weakness, “academic tools” are relevant in any trading
environment and this cannot be over emphasised. This conclusion seems to agree
with the finding of Jason et, al (2004). The simulation of the CDF process using
process in the modelling and pricing of CDF similarity which, which suggest its
Future Research
This dissertation was meant to point out some of the weakness of previous studies;
however there were some limitations which future research could consider. For
example the, both the short side and the long of the trades can be considered in
The usefulness of this study can be more relevant if the number of portfolios is
80
increased, this is in regard to the pairs trading strategy, which is very relevant to
today’s live trading environment. Similarly the period for the moving average can
be varied and adapted to different trading styles, such as weighted moving average.
Data from other major exchanges in the rest of Europe, Japan could also be
considered in the future, since the price data behaviours varies for instance,
currencies data behaves differently from commodities such as oil and gas.
The reliability of the conclusions drawn could question on the basis of the one year
data which was used. It is a well known fact that long term data captures all kinds of
important information such as interest rate cuts, business cycles which is relevant to
81
References
ANSIL, M. ISLAM, SYED & AHMED M (1999): The Purchasing Power Parity
114
Rules and the Stochastic Properties of Stock Returns. The Journal of Finance, Vol.
on the lead-lag relationship between the spot index and futures contract for the
10(2001)135-156
82
Insurance and Finance. Springer-Verlag Italia
DERK, JS & CHRITOP W (2007): Extended ARMA models for estimating price
Advanced Time Series methods for modelling and trading 10-year Government
Advanced Time Series methods for modelling and trading 10-year Government
83
technical trading system profitable? Global Finance Journal 17 (2006) 271–281.
Education Inc.
LAWS, J & THOMSON J (2004): The efficiency of financial futures markets: Tests
Evidence From European Energy Exchange. The Journal of Futures Markets, Vol.
84
SIBHES, CB & TIEN L (2004): Short-term electric load forecasting an artificial
http://www.newenergyassoc.com/documents/forecasting_wp.pdf
85
APPENDIX 1
(ECM) that links all the variables. In other words if there is a long term relationship
theses variable in a vector representation format. Engle and Grange [1987] method
is often applied but by far the most superior is the method used by Johansen [1988]
(2)
2
X i i X t i t
i1
(3)
The tow variables are chosen because of the two spread variables. According to
which is stationary. As a result of this, equation (1) can be transformed into its
86
EMT by using the L operator defined by: 1 L
k1
ΔXt Γi ΔXt i Xt k μεt (4)
i1
Where: Γi
(1 Π1 ... Πi ), I=1... K-1,
Φ
(I Π1 .. Πk ) i=1 ... k-1 (5)
Both X t and ik tends to zero in the long run according to Johansson.
'
Παβ̂, with both αand β̂ representing a p x r matrices with αrepresenting
the speed of adjustment of the coefficients. If the variables are co-integrated then
rank determines the number of co-integrating equations. A rank of two suggests that
H o (r) : Πα
βˆ
The estimates of βis found by equating the determinant of the Eigen value to zero:
87
S kk Sko S 1 Si0 | =0
|λ
Johansson normalised this equation and applied the maximum likelihood principle
p
trace 2 ln(Q) T ln(1
ˆ
i)
i r 1
ˆ
With T, the sample size and ˆ ˆ
1 ,2 ,..., p representing the Eigen values.
the number of variables and r the rank of the matrix Π. The null hypothesis of at
Similarly the maximum likelihood Eigen value for the null hypothesis with exactly r
ˆ
max T ln(1 ˆ
r 1 ) , with
ˆ
1 ...
r p
APPENDIX 2
90
80
70
60
50
40
30
20
10
0
50 100 150 200 250 300 350 400
CDF
88
350
300
250
200
150
100
50
50 100 150 200 250 300 350 400
SYSTEM HELSINKI
100
Series: CDF
Sample 1 400
80 Observati ons 370
Mean 13.42475
60 Median 11.46933
Maximum 86.13453
Minimum 3.334269
40 Std. Dev. 7.355829
Skewness 3.535252
Kurtosis 28.96757
20
Jarque-Bera 11166.39
Probability 0.000000
0
12.5 25.0 37.5 50.0 62.5 75.0 87.5
60
40
20
-20
-40
-60
-80
50 100 150 200 250 300 350 400
DCDF
89
Figure 13: A log transformation of the range series.
160
Series: DCDF
140 Sample 1 400
Observations 369
120
Mean -0.005930
100 Median 0.032009
80 Maximum 55.67898
Minimum -68.52856
60 Std. Dev. 6.925025
Skewness -1.331122
40 Kurtosis 39.50347
20 Jarque-Bera 20596.20
Probability 0.000000
0
-60 -40 -20 0 20 40 60
Exogenous: Constant
t-Statistic Prob.*
5% level -2.869351
10%
level -2.570999
90
Augmented Dickey-Fuller Test Equation
Coefficie
9.89547
7.58449
5.99664
4.39986
2.87512
1.65367
0.68970
91
0.21152
0.01435
0.89302 0.02534
6.44679 6.58972
14587.9 6.68687
1177.15 366.273
2.02061 0.00000
Exogenous: Constant
92
Bandwidth: 132 (Newey-West using Bartlett kernel)
5% level -2.869176
10%
level -2.570905
44.2693
1.14383
93
nt
1.27629
0.00092
0.63819 0.01560
6.67167 6.63903
16291.1 6.66027
1219.58 645.591
2.16825 0.00000
94
Table 12: A Correlogram of CDF series
Sample: 1 400
Partial Q-
- -
- -
95
- -
- -
- -
- -
- -
- -
- -
96
- -
- -
- -
- -
- -
97
-
- -
4
Normal Quantile
-4
-8
-12
-80 -60 -40 -20 0 20 40 60
DCDF
98
Figure 15: Quantile-Quantile plot of the log-returns
1.2
0.8
0.4
0.0
-0.4
-0.8
-1.2
25 50 75 100 125 150 175 200 225 250
LHELSINKI
.4
.3
.2
.1
.0
-.1
-.2
-.3
-.4
-.5
25 50 75 100 125 150 175 200 225 250
LSYSTEM
99
1240
1200
1160
1120
1080
1040
25 50 75 100 125 150 175 200 225 250
CL OSE
LOG RETURNS
0.40
0.30
0.20
0.10
logs
0.00
-0.10 0 50 100 150 200 250 300 350 400
-0.20
-0.30
time
100
Jumps
0.40
0.30
0.20
R e tru n s
0.10
Jumps
0.00
-0.10 0 50 100 150 200 250 300 350 400
-0.20
-0.30
Time
0.40
0.30
0.20
R e tu rn s
0.10
0.00
0 100 200 300 400
-0.10
-0.20
System price
APPENDIX 3
101
Maximum Drawdown
0%
-500%
-1000%
Drawdown
-1500%
Maximum Drawdown
-2000%
-2500%
-3000%
-3500%
Time
.015
.010
.005
.000
-.005
-.010
-.015
-.020
10 20 30 40 50 60 70
RETURNS
9-Day EMA
20-Day MA
102
.00
-.01
-.02
-.03
-.04
-.05
-.06
-.07
-.08
10 20 30 40 50 60 70
.02
.01
.00
-.01
-.02
-.03
10 20 30 40 50 60 70
103
.25
.20
.15
.10
.05
.00
-.05
10 20 30 40 50 60 70
Cummulative Profit
Figure 26: Daily cumulative profit for S&P500 with ARMA forecast
1240
1200
1160
1120
1080
1040
2004M04 2004M07 2004M10
104
Equity Cur ve (%)
50.0%
45.0%
40.0%
Account Balance
35.0%
30.0%
25.0%
20.0%
15.0%
10.0%
%
5.0%
0.0%
-5.0% 1 25 49 73 97 121 145 169 193 217
Tm e
(CDF)
15
Forecast:LSYSTEMF_OLSQ
10 Actual: LSYSTEM
Forecastsample: 290 400
5 Adjusted sample: 290 371
Included observations: 82
0
Root Mean Squared Error 2.204098
Mean Absolute Error 1.602345
-5
Mean Abs. Percent Error 270.1602
Theil Inequality Coefficient 0.355895
-10
Bias Proportion 0.000113
Variance Proportion 0.030467
-15
Covariance Proportion 0.969420
-20
290 300 310 320 330 340 350 360 370
LSYSTEMF_OLSQ
105
0
-4
-8
-12
-16
-20
10 20 30 40 50 60 70 80
Maximum Drawdown
40
30
20
10
-10
-20
-30
10 20 30 40 50 60 70 80
106
30-day volatily & returns
0.4
log returns
0.2
Returns
0 30-day
-0.2 0 100 200 300 400 volatility
-0.4
time
.000
-.001
-.002
-.003
-.004
-.005
-.006
2004M09 2004M10 2004M11 2004M12
Maximum D rawdown
107
Equity Curve
0.018%
0.016%
0.014%
0.012%
% P rofit
0.010%
Profit
0.008%
0.006%
0.004%
0.002%
0.000%
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65
Time
Dim i As Integer
Randomize
rnmut = X + a * (u - X) * t
For i = 0 To nsim
rands = Rnd + Rnd + Rnd + Rnd + Rnd + Rnd + Rnd + Rnd + Rnd + Rnd + Rnd +
Rnd - 6
108
S2 = rnmut - rands * sigt
Next i
End Function
APPENDIX 4
350
300
250
200
150
100
50
0
250 275 300 325 350 375 400
ERROR_S QUARE
109
Date: 03/06/08 Time: 11:17
Coefficie
0.42508
5.79763
0.57642
Adjusted R- 0.57471
4.48096
4959.51
725.771
1.24412
110
Figure A summary of output of ordinary least square estimation of the model
30
Forecast: LSYSTEMF
Actual: LSYSTEM
20 Forecast sample: 251 400
Adjusted sample: 251 371
Included observations: 121
10
Root Mean Squared Error 2.578828
Mean Absolute Error 1.789171
0 Mean Abs. Percent Error 235.8585
Theil Inequality Coefficient 0.324692
Bias Proportion 0.004656
-10 Variance Proportion 0.257563
Covariance Proportion 0.737781
-20
275 300 325 350
LSYSTEMF
40
30
30 20
20 10
10 0
-10
250 275 300 325 350
111
Figure 36:
Exogenous: Constant
t-Statistic Prob.*
5% level -2.873045
10%
level -2.572976
112
nt
0.51206
0.17651
0.00416
0.33247 0.00743
4.10712 5.67539
4115.91 5.71802
697.911 60.7658
1.98302 0.00000
113
Table 15: Summary of estimation of ARMA (10, 10)
Backcast: 3 12
Coefficie
0.03073
0.41715
0.52888
0.01336 0.01710
114
5 3
14716.0 7.03128
828.514 1.59106
2.55500 0.20589
-.74+.54i -.92
-.76+.55i -.94
115
40
Forecast: CDF F
Actual: CDF
30 Forecast sample: 251 400
Adjusted sample: 251 381
Included observations: 121
20
Root Mean Squared Error 7.971633
Mean Absolute Error 7.166969
10 Mean Abs. Percent Error 66.33961
Theil Inequality Coefficient 0.244146
Bias Proportion 0.579859
0 Variance Proportion 0.090201
Covariance Proportion 0.329940
-10
275 300 325 350 375
CDFF
Variance backcast: ON
Coefficie
116
9
14.1238
Variance Equation
21.5422
0.70764
0.08378
0.16536 13.7191
9.09116 6.60525
20166.4 6.67588
- 0.68483
117
4
Output from the parameter estimation of the model proved significant, and in
addition the coefficients of the sum of the Arch and Garch were closer to one, thus
120
Forecast: CDFF
Actual: CDF
80
Forecast sample: 251 400
Adjusted sam ple: 251 372
40 Included observations: 121
-120
275 300 325 350
CDFF
500
400
300
200
100
0
275 300 325 350
Forecast of Variance
118
Figure 38: A summary of result of a dynamic GARCH-M forecast
120
Forecas t: CDF F
Ac tual: CDF
80
Forec ast s ample: 251 400
Adjusted sample: 251 372
40 Included observations: 121
-120
275 300 325 350
CDFF
500
400
300
200
100
0
275 300 325 350
119
Vector Error Correction Model (VECM)
test
Hypothesize
d Trace 0.05
120
Hypothesize
d Max-Eigen 0.05
level
b’*S11*b=I):
D(LSYSTEM
) 4.445258 0.321946
D(LHELSIN
121
1 Cointegrating Log
parentheses)
(0.02035) (0.00111)
D(LSYSTE) -2.393623
(0.15612)
D(LHELSIKI) -3.514246
(0.23655)
ECT=LYSTEM+0.019635*LHELSINKI-0.000830*@TREND (2)
122
40
30
20
10
0
-10
-20
-30
-40
-50
50 100 150 200 250 300 350 400
ECT
Exogenous: Constant
t-Statistic Prob.*
5% level -2.869442
10%
level -2.571047
123
Augmented Dickey-Fuller Test Equation
Coefficie
14.9898
12.7483
11.4061
9.92615
8.29249
6.58639
124
9
3.68697
2.70349
1.81876
1.10958
0.61870
0.25985
0.01509
0.89702 0.02714
5.57011 6.31124
10610.9 6.46362
125
-
1109.40 229.175
2.04954 0.00000
Coefficie
0.08743
126
2
0.54004
0.59436 0.00795
6.74945 6.66887
11115.4 6.71149
820.605 178.765
2.03973 0.00000
127
150
Forecast: LSYSTEMF
100 Actual: LSYSTEM
Forecast sample: 251 400
50 Adjusted sample: 251 372
Included observations: 121
0
Root Mean Squared Error 20.41844
Mean Absolute Error 17.15579
-50
Mean Abs. Percent Error 2707.690
Theil Inequality Coefficient 0.818158
-100
Bias Proportion 0.698389
Variance Proportion 0.114911
-150
Covariance Proportion 0.186701
-200
275 300 325 350
LSYSTEMF
20
Foreca st: LSYSTEMFS
A ctual: LSYS TEM
Foreca st sample : 2 51 400
10 A djusted samp le: 251 37 2
Include d observatio ns: 121
-20
275 300 325 350
LSYSTEMFS
128
System & Simulated Price
900.00
800.00
700.00
600.00
500.00 System Price
T im e
Figure 43: A comparisons of a System Price and simulated price with a mean
speed of 0.47 and a long run mean of 949.27 with a half-life 1.46
deviation
Estimating parameters
800.00
700.00
600.00
Y -v al u e s
500.00
Series1
400.00
Linear (Series1)
300.00
200.00
100.00
y = -0.4743x + 450.24
0.00
R2 = 0.0189
-150.00 -100.00 -50.00 0.00 50.00 100.00 150.00 200.00
X-values
Square Estimation.
129
Comparing Returns
Log Returns of Sytem price
simulated returns
0.40
0.30
0.20
R e tu rn s
0.10
0.00
-0.10 0 50 100 150 200 250 300 350 400
-0.20
-0.30
Time
70
Series: Standardized Residuals
60 Sample 3 366
Observations 364
50
Mean -0.112784
40 Median -0.206567
Maximum 4.649894
Minimum -3.812500
30
Std. Dev. 0.995172
Skewness 0.793321
20
Kurtosis 6.304892
10
Jarque-Bera 203.8361
Probability 0.000000
0
-2.5 0.0 2.5
Figure 45: Summary statistics of returns series of GARCH (1, 1) estimation of the
system price
130
.4
.3
.2
.1
.0
-.1
-.2
-.3
50 100 150 200 250 300 350
.05
.04
.03
.02
.01
.00
50 100 150 200 250 300 350
GARCH_VA RIANCE
131
Series: LSYSTEM LHELSINKI
Hypothesize
d Trace 0.05
Hypothesize
d Max-Eigen 0.05
level
132
**MacKinnon-Haug-Michelis (1999) p-values
b’*S11*b=I):
LSYSTEM LHELSINKI
-57.72870 5.542096
80.05778 -62.11374
1 Cointegrating Log
parentheses)
LSYSTEM LHELSINKI
1.000000 -0.096002
(0.04145)
D(LSYSTE) -2.771889
133
(0.21814)
D(LHELSIKI) -3.880190
(0.45750)
1240
1200
1160
1120
1080
1040
2004M04 2004M07 2004M10
Adj Close
134
.020
.015
.010
.005
.000
-.005
-.010
-.015
-.020
2004M04 2004M07 2004M10
LSP
Exogenous: Constant
t-Statistic Prob.*
5% level -2.873240
10%
level -2.573080
135
Augmented Dickey-Fuller Test Equation
Coefficie
0.99310
0.35113
0.49633 0.01098
7.93928 6.98972
15190.7 7.01846
- 237.496
136
9
1.99814 0.00000
Partial Q-
- -
- -
- -
137
0.036 0.094
- -
- -
- -
138
Coefficie
-9.09E-
0.79603
0.93451
0.13417 4.24E-
0.00963 6.42751
0.01449 6.36960
513.987 12.0873
2.89384 0.00001
139
Inverted AR Roots .96 .48+.83i .48-.83i -.48+.83i
-.48-.83i -.96
-.49+.86i -.99
.04
Forecast: LSPF_STATIC_ARMA
.03 Actual: LSP
.02 Forecast sample: 9/01/2004 12/22/2004
Included observations: 79
.01
Root Mean Squared Error 0.008832
.00
Mean Absolute Error 0.007069
-.01 Mean Abs. Percent Error 449.4588
Theil Inequality Coefficient 0.663762
-.02 Bias Proportion 0.000372
Variance Proportion 0.000263
-.03
Covariance Proportion 0.999364
-.04
-.05
2004M09 2004M10 2004M11 2004M12
LSPF_STATIC_ARMA
.00018
.00016
.00014
.00012
.00010
.00008
.00006
2004M09 2004M10 2004M11 2004M12
Forecast of Variance
140
.12
Forecast: LSPF_DYNAMIC
Actual: LSP
.08
Forecast sample: 9/01/2004 12/22/2004
Included observations: 79
.04
Root Mean Squared Error 0.010026
Mean Absolute Error 0.008392
.00
Mean Abs. Percent Error 789.5745
Theil Inequality Coefficient 0.645704
-.04 Bias Proportion 0.553835
Variance Proportion 0.170345
-.08 Covariance Proportion 0.275819
-.12
2004M09 2004M10 2004M11 2004M12
LSPF_DYNAMIC
141
142
143
144