Nicholas Bucheleres & Matthew Binder
Nicholas Bucheleres & Matthew Binder
Nicholas Bucheleres & Matthew Binder
Table
of
Contents
Project
Goals...03
Foreword...03
Project
Abstract.04
Introductory
$GLD
&
$GVZ
Charts06
Test
Case
#1.11
Test
Case
#1
Summary..17
Test
Case
#2..18
Test
Case
#2
Summary...24
Project
Summary25
2
In todays business world of financial regulation, fraud, and investor uncertainty, international asset markets have become very unsure of themselves. Traditional risk-management and forecasting techniques are no longer relevant, and man is becoming increasingly less relevant compared to the machine. These are all trends that have become apparent to us, especially to Nick at his time at Bank of New York/Mellon over the summer. We had many conversations about the inefficiency of the manual traders at BNY, and that sparked our interest in the field of quantitative/automated trading. We had a general idea of what we wanted to accomplish, but both of us were admittedly quite ignorant about the secretive field of quantitative trading. So, we grabbed a couple books, and dove right in. This is what we found. We started off the semester experimenting with quantbench.coms statistical analysis platform. After spending a couple of weeks with QuantBench, we decided that it was not compatible with our goals for the semester and did not offer the flexibility and freedom that we needed. Next we worked with GeniusTrader, an open source and high-power technical analysis and trading simulation platform written in perl. While GeniusTrader had the potential to allow us to do our research, it was not a practical tool for our purposes because it was poorly documented, unsupported, and nearly impossible to modify without breaking. Finally after several false starts, we found an open source trading platform called TradeLink that was written in C# and appeared to suit all of our needs. TradeLink is an enterprise grade software project that was graciously distributed to the public domain by its original author. TradeLink has several components that allow it to server as a complete automated trading system and connect to and place automatic trades with several of the major online brokerages. We were mainly interested in TradeLink because it was open source and had a modular design that made it easy to implement custom algorithms and strategies. Unlike GeniusTrader, TradeLink is very thoroughly documented and is still a live project with dozens of programmers releasing updates on a regular basis. We started the substantive part of our research after deciding that TradeLink suited our needs. Nick designed three simple types of algorithms for us to test: mean reversion, moving averages, and 3
exponentially weighted moving averages. Nick worked closely with Matt, who programmed these algorithms into TradeLink. Then Nick chose three series: decreasing volatility, neutral volatility, and increasing volatility for the gold ETF $GLD. Nick downloaded the price series data for $GLD for the time periods that he chose from Wharton Research Data Services. Next Matt wrote a conversion program that converted the comma separated price data into the .tik format that TradeLinks simulation software required to run. We then worked together to run simulations for all three of our algorithms on all three of the time periods of $GLD. We documented the results for mean reversion and simple moving averages in this document. Finally, we analyzed the results and looked for possible correlations. Coming into this project, we had a clear view of what we needed to execute (project abstract above), but we had no idea how cumbersome each step of the process would be. We had planned to dive right in and begin creating and coding robust trading strategies, but every step of our path to achieving that seemed to present us with a nearly insurmountable challenge. After we gained access to the Wharton Research Data Services, we also had to research and trial multiple trading platforms, as aforementioned. With each trial, we set up data input, coded a rudimentary strategy, and tested the platforms back testing, charting, and customization ability. Though this seemed like a hassle in the time, it proved in retrospect to glean us an enormous amount of insight into the technical particulars of the world of quantitative trading. Above learning from our challenges, we also gained hands on experience with the types of theory/thesis creation that finance professionals conjure up daily. It was insightful for us come up with a theory about what we saw or wanted to test, and then plan that theory into testing. We learned what is possible, what is practical, and what is potentially dangerous. 4
Abstract:
At
the
beginning
of
the
semester
our
goal
was
set
to
execute
the
following
approach
in
order
to
answer
our
fundamental
question:
We
will
parse
our
time
series
into
two
pieces.
Given
the
first
piece,
we
will
develop
each
strategy
to
optimize
historical
returns
for
the
past
period,
remaining
conscious
of
prevailing
volatility
effects
that
we
notice
for
each
time
series
on
the
performance
of
our
algorithms.
Once
we
have
optimized
each
strategy
over
time
[-1,0),
we
will
then
treat
t=0
as
the
present,
and
act
as
if
(0,1]
is
one
year
into
the
future.
We
want
to
avoid
pure
back
testing
because
our
results
will
simply
reflect
our
ability
to
fit
strategies
to
historical
data
and
will
not
necessarily
have
any
predictive
capability.
Although some false-starts were encountered, we have managed to fully realize the research value of our initial goal: to analyze various automated trading strategies of one price series given a scope of decreasing volatility, net zero volatility, and increasing volatility. We found SPDRs gold ETF$GLDan enticing fit for multiple reasons: it almost exactly (in most cases, exactly) follows the spot price of gold; it (gold) is a highly liquid asset that is sensitive to changes in volatility, and, among other less intuitive reasons, gold prices are not subject to the largely unpredictable, news-driven price gaps that traditional equities face. Our first step was to download three, three month time series of $GLD intra-day trade data. These data were chosen from, as aforementioned, one period of constantly decreasing volatility, one period of net zero change volatility, and one period of constantly increasing volatility. As a benchmark for gold volatility we used the CBOEs $GVZ gold volatility index. The most marked period of recent, constantly decreasing gold volatility was 11/25/2008 through 2/25/2009; the most marked period of net zero volatility was 9/15/2009 through 12/15/2009; and the most marked period of increasing volatility was 6/30/2011 through 9/30/2011. Our first test strategy is a simple moving average (SMA) indicator, which generates signals when $GLD interferes with our SMA distinctions. Following that, we implemented a mean reversion 5
strategy. For the mean reversion strategy, we used a moving average indicator, similar to the SMA, but instead of playing momentum and buying up-trends and selling downward violations, we postulated that when $GLD moves above the moving average (mean) that it would return back to its mean. The test results are as follows:
Gold prices as reflected through one of the most liquid ETFs $GLD.
Period #1: Decreasing period of gold volatility from 11/25/2008 through 2/25/2009.
10
Case #1Simple Moving Average Operation Parameters2.5 hour Simple (Unweighted) Moving Average Profit target=$20,000 Position size=$100 Interval Window=15 minutes Interval Window Multiplier=10 bars Decreasing Volatility
Left: Results from the Simple Moving Average (SMA) back-tested under decreasing volatility. Right: Tick data corresponding to back-tested decreasing volatility SMA.
11
Left: Indicating value of SMA at crossover points under net zero volatility conditions. Right: Descriptions of time of SMA crossover, position entry, direction, and exit.
12
Left: Positions taken during back-testing period. Right: Orders placed generated by SMA crossovers.
13
Left: Tick data corresponding to net zero volatility $GLD price series. Right: Strategy results from net zero volatility back-test.
14
15
Increasing Volatility
Left: Messages detailing signal generations from SMA crossovers. Right: Results from SMAs back-test performance under increasing volatility.
16
Test Case #1 Summary Under the three month decreasing volatility back-test, the SMA strategy produced a gross loss of $328; under the three month net zero volatility back-test, the SMA strategy produced a gross loss of $1043; and under the three month increasing volatility back-test, the SMA strategy produced a gross loss of $687. Based on our findings, we can conclude that the SMA strategy was not robust in the general sense. We find, though, that the net zero volatility conditions yielded the largest loss of the three strategies. We determine that a volatility condition marked by more drastic and more frequent reversals (zigzag pattern) lead to the failure of the SMA strategy under the net zero volatility conditions. Due to the specific execution parametersinterval, time, and sizethese findings may or may not be a general, stylized, objective trend. 17
Test Case #2Mean Reversion Operation Parameters2.5 hour Simple (Unweighted) Moving Average Profit target=$20,000 Position size=$100 Interval Window=15 minutes Interval Window Multiplier=10 bars Decreasing Volatility
Left: $GLD price series under decreasing volatility condition. Right: Orders filled during test simulation.
18
Left: Results from mean reversion back test with decreasing volatility. Right: Tick data of $GLD under decreasing volatility condition.
19
Left: Signals generated with mean reversion strategy under net zero volatility. Right: Results from mean reversion back test performance under net zero volatility.
20
21
Increasing Volatility
Left: Positions entered with mean reversion strategy under increasing volatility condition. Right: Results of mean reversion strategy performance with increasing volatility.
22
23
Test Case #2 Summary Under three, three-month periods of decreasing, net zero, and increasing volatility, we experienced three disparate results from the mean reversion strategy. Under decreasing volatility our mean reversion strategy profited $1,274; under net zero volatility our mean reversion strategy lost $364; and under increasing volatility our mean reversion strategy profited $384. These results nearly mirror the results from our SMA strategy. It seems that with the mean reversion strategy, and with the SMA strategy, the net zero volatility period produced the most significant loss. This is likely due to the same conjecture that was made above: periods in which volatility swings between up and down make it more difficult for the strategies to enter into tight and robust trades, and thus do not capture the intended profit portion of a given price movement. The mean reversion strategy proved to be profitable for the periods of decreasing and increasing volatility, whereas the SMA strategy did not prove to be profitable for any of the volatility periods. 24
Project Summary Given the results summarized in Test Case #1 Summary and Test Case #2 Summary, we do not find sufficient evidence to answer our thesis beyond a reasonable doubt, but our research has shed some light onto the topic. Although we have not reached a specific result, we are able to note specific outcomes of our experiment that enlighten readers from our perspective. As summarized above, we have noted disparate performances of both strategies under each of the three volatility conditions. We have been able to extrapolate that one of the effects that volatility has on the performance of automated strategies comes as a function of the persistence of said volatility. Our strategies performed the best under periods of net change (increasing or decreasing) volatility in which volatility tended to move linearly as opposed to the volatility undulation that we noted in the net zero volatility periods. We attribute the failure of the strategies under the net zero periods to the unpredictable, mean reverting nature of the volatility during those periods.
25