SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 1	
	
	
	
	
	
Testing Mean Reversion:
Evaluation of a Statistical Arbitrage Strategy Over Time
Taweh Beysolow II
Advisor: Yusif Simaan
Fordham University
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 2	
I. Introduction
History of Statistical Arbitrage
From the 1980s forward, statistical arbitrage strategies yielded astounding returns
that were attractive to both fund managers and investors. This was generally the case
until the end of the 20th
century and beginning of the 21st
century, in which several
incidents of considerable magnitude caused strategies to perform less well at best and
terribly at worst. Statistical arbitrage funds failed catastrophically, investors withdrew
funds, and many places that did practice statistical arbitrage in part stopped completely.
While there has been resurgence of the discipline to some degree in the late 2000s and
early 2010s, it is still neither as largely practiced nor as profitable as it was in the 1980s.
While it is uncertain whether the profitability of this discipline in the future will ever
reach its former levels, the study of the discipline’s rise, fall, and how it can be improved
provides useful information for aspiring quantitative analysts, researchers, and traders.
What is arbitrage and how is it different from statistical arbitrage?
Arbitrage is defined as the act of taking advantage of inefficiencies in the price
discovery process to obtain a “risk-free” profit. Typically, this involves the trading of
stocks, options, or fixed income products. In traditional arbitrage, this involves trading
between two or more markets, with the objective of buying assets in one market and
selling them to make a profit, often requiring an instantaneous buy and sell. Traditional
arbitrage usually involves investing nothing, takes no risk, but is able to make money on
this discrepancy. In theory, asset prices adjust quickly and eliminate arbitrage
opportunities.
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 3	
Statistical arbitrage seeks to take advantage of temporary mispricing consistently
and yielding positive expected profit. As such, it is not the same as the traditional form of
arbitrage.
What is the market?
In statistical arbitrage, the market usually is described as an index, or benchmark
of some sort, and the equity would be considered a subset of the market. An example of
this would be the SPY and YHOO – the former is a proxy for the market, here being the
S&P 500, and the latter is a subset of the S&P 500.
II. Mechanics and Assumptions of Statistical Arbitrage
Trending vs. Reverting: What Causes Both
Stocks generally are described to move, broadly speaking, in two distinct patterns:
trending and reverting. Trending stock prices usually are caused by fundamental changes
in the stock or the market, such as positive/negative news, earnings calls, and or changes
in systemic factors within the market. These changes are typically considered to be long-
term, and as such won’t be the primary focus of the study. We would like to focus on the
short-term changes, which typically are classified as reversion.
In this experiment, we consider that stocks are priced relative to the market, and
therefore that they can be either in alignment with the market or be misaligned, either
positively or negatively. When systematic changes occur in the market, we should in
theory observe that all prices of stocks within the market move in a constant proportion
with the market. This is true regardless of whether the market rises or falls. However, if
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 4	
we observe a movement of a stock that is considerably large in either direction, and the
market did not move accordingly, we would consider this a temporary disequilibrium. As
such, we flag these instances and predict there will be a reversionary movement towards
the price that is closer towards its equilibrium price relative to the market.
To illustrate the concept, consider that we are looking at a mining stock. It is just
announced that there was major accounting fraud committed by the company, in which
they overstated earnings. Long-term downward price movements would be expected.
Contrastingly, imagine we are looking at the same mining stock but for some reason
today, it gained 20% when there was no outwardly visible reason that should have
happened. We do not expect this move to be permanent, and as such this would be
considered a temporary mispricing. In short, fundamental changes cause permanent
moves, where as temporary changes do not.
III. Experiment
In this experiment, we will download the open and close data for all stocks in the
S&P 500 from yahoo Finance using the quantmod package in Yahoo Finance. From here,
we will calculate returns as such:
𝐶𝑙𝑜𝑠𝑒𝑅'(
=
*+(,-
*+(
− 1	 (1)	
𝑂𝑝𝑒𝑛𝑅'(
=
*+(4-
*+(
− 1 (2)	
𝐴𝑣𝑔. 𝑅'(
=
9
:
𝛴:
	𝑅'(
− 1	 (3)
𝑊ℎ𝑒𝑟𝑒		 𝑥 = 𝑠𝑡𝑜𝑐𝑘	𝑥,				𝑦 = 𝑠𝑡𝑜𝑐𝑘	𝑦,				𝑡 = 𝑡𝑖𝑚𝑒	𝑝𝑒𝑟𝑖𝑜𝑑	 1,2, … 𝑛 ,
𝑛 = 𝑛𝑢𝑚𝑏𝑒𝑟	𝑜𝑓	𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑡𝑖𝑜𝑛𝑠, 𝑎𝑛𝑑	𝑃 𝑥 𝑡
= 𝑃𝑟𝑖𝑐𝑒	𝑜𝑓	𝑆𝑡𝑜𝑐𝑘	𝑥	𝑖𝑛	𝑝𝑒𝑟𝑖𝑜𝑑	𝑡
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 5	
Each ticker is a data frame (a generalized matrix of data), and each data frame is an
element within the list containing all of the stock data. After we extract the open and
close column data of each stock and calculate the returns, we store this data in a list of its
own, from which we will calculate all further statistics. The subsequent statistics are all
rolling window calculations, with the window being 60 days. Other practitioners may feel
free to change the rolling window size and observe differences in the strategy’s
performance.
We use equations 1 for the first 60-day period moving window, as it represents the
observed before trading begins. However, once we are assumed to be trading with real
time data, we must use equation 2. The reasoning is that if we want to trade in period t,
we only at that time can observe data prior to that point, not ahead. As such, returns are
calculated open to open. After these vectors are reorganized, we take a 60-day moving
average of the returns, and proceed to perform a 60-day moving window calculations of
the following statistics:
𝜎' =
Q(S+(
T	UV+(
)X
:T9
(4)
	
𝜌',Z[
=
]^_ ',Z[
`+`ab(
(5)
𝛽'(
=
	
𝜌',Z[
`+
`ab(
(6)
𝑊ℎ𝑒𝑟𝑒			𝜎' = 𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑	𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛, 					𝜌',Z[ = 𝑐𝑜𝑟𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛		
	𝑛 = 𝑡𝑜𝑡𝑎𝑙	𝑛𝑢𝑚𝑏𝑒𝑟	𝑜𝑓	𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑡𝑖𝑜𝑛𝑠, 𝑅'(
= 𝑟𝑒𝑡𝑢𝑟𝑛	, 𝑎𝑛𝑑		𝛽'(
= 𝐵𝑒𝑡𝑎
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 6	
The standard deviation (eq.4) will represent the risk associated with each asset,
the correlation (eq.5) will be a measure of the market and the stock’s respective
correlation, and beta (eq.5) is a measure of how risky an asset is relative to the market.
These equations play several critical roles in our experiment. One of those functions is
determining the optimal amount by which we should hedge our portfolio:
𝐻 =	−𝛽 𝑃𝑜𝑟𝑡 ,			𝑤ℎ𝑒𝑟𝑒	𝐻 = ℎ𝑒𝑑𝑔𝑒	𝑟𝑎𝑡𝑖𝑜,			𝑎𝑛𝑑	𝑃𝑜𝑟𝑡	 = 𝑃𝑜𝑟𝑡𝑓𝑜𝑙𝑖𝑜	𝑉𝑎𝑙𝑢𝑒
As mentioned before, hedging is an integral component to statistical arbitrage
strategies. In the context of this experiment, the hedge ratio is the percentage of our
portfolio investment that we devote to short selling the market. We hedge in statistical
arbitrage because we wish to lock the gains we observe from a temporary positive
disequilibrium with the stock relative to the market.
For example, say we observe a price rise substantially while the market overall
did not move. As per the concept of reversion, we expect that over the next period that
this stock will fall and go closer towards its equilibrium price relative to the market.
Because we wan to preserve the positive return yielded from this disequilibrium, we short
the market to offset the losses, from the stock being held through this period.
One-Factor Return Model
For the experiment, we will use the following model:
𝐿𝑒𝑡		𝑦
∗
= 	𝑡ℎ𝑒𝑜𝑟𝑒𝑡𝑖𝑐𝑎𝑙	𝑟𝑒𝑡𝑢𝑟𝑛		𝑎𝑡	𝑡𝑖𝑚𝑒	𝑡, 𝛼 = 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙	,
𝜖 = 𝑛𝑜𝑖𝑠𝑒	𝑎𝑡	𝑡𝑖𝑚𝑒	𝑡	
𝑦
∗
= 𝛼 + 𝛽 𝑅Z[ +	 𝜖 (7)
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 7	
The only systemic factor in returns is the market. As such, when we subtract the
portion of the returns attributed to the market, we are left with the following:
𝛼 = 𝑅'(
− 𝛽' 𝑅Z[(
	 (7)	
𝑊ℎ𝑒𝑟𝑒	𝛼 = 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙
The residual (eq.7) is defined as the returns specific to the stock, where it is
here an average. To trigger a trade due to very high or very low residuals, we
calculate the following statistics as well:
𝜎m+(
= 𝜎'(
n − 𝛽'(
n 𝜎'(
n (8)
							𝑠𝑖𝑔𝑛𝑎𝑙 =
m
`o+(
(9)
	𝑊ℎ𝑒𝑟𝑒		𝜎m+(
= 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙	𝑟𝑖𝑠𝑘	(𝑠𝑡𝑑. 𝑑𝑒𝑣. 𝑜𝑓	𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙𝑠)	
Residual Risk (eq.8) essentially is the in period standard deviation of the residuals
themselves. Plainly spoken, when we take the ratio of the residual to the residual risk, we
get a number that tells us how many standard deviations from the mean the alpha is,
giving us our trading signal (eq.9).
Why do we focus on residuals?
The two things that affect residuals are 1) long term fundamental changes and 2)
trading imbalances that cause the residual to be artificially high/low. Fundamental
changes to a stock, such as an increase in earnings or a structural change in the sector of
the stock, cause longer term changes to the price levels that a stock will gravitate around.
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 8	
As such, this doesn’t necessarily help us for finding intraday trading opportunities. Being
that we want to look at the short term, we want to focus on non-systemic factors only,
and arguably factors that are relatively short lived in their effects.
The signal has a lower limit of negative infinity and an upper limit of infinity. We
consider our statistical significance level in this experiment to be 95%, or that any
absolute value of the signal greater than or equal to two represents an outlier. However,
further research can be performed on individual stocks and/or portfolios to determine an
optimal significance level.
Trading Algorithm
Due to the significance level being 95% in this experiment, the bounds between
which we will hold a cash position in our account is -2 < signal < 2. When signal < -2, we
say that statistically the residual is artificially low and that the following period is likely
to feature a signal value closer to 0. As such, we will place an un-hedged investment in
the stock for this period. When the signal is > 2, we say that statistically the residual is
artificially high, and that the following period is likely to feature a signal value closer to
zero. As such, we will hedge our long investment in the stock by shorting the market.
In the case of our experiment, the market is the SPY. Our portfolio will be a
subset of the market, dependent on which stocks are statistically most likely to exhibit
reversionary moves. Plainly stated, if a stock is likely to make a reversionary move, it
will be traded. If not, we will opt to hold a cash position instead.
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 9	
IV. Results and Discussion
Summary Statistics:
Total	Number	of	Days		 504	
	
Total	Trades		 317,649	
Average	Daily	Trades	 138	
Minimum	Daily	Trades	 9	
Maximum	Daily	Trades	 362	
	
	
Average	Return		
												
0.37%	
Std.	Dev.	Of	Returns		 		0.36%	
Cumulative	Return		 403.80%	
Sharpe	Ratio		 		.99
Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 	 10	
Returns in Theory vs. Reality
It is important to note that while these returns are certainly quite appealing, that it
is highly improbable that they would ever be realized should this strategy be employed in
live trading activities. The reasoning behind this is that we are observing prices, and
ultimately the returns derived from them, close to close. However, to properly execute
this strategy, we cannot hold onto these equities overnight, putting us in a position where
we must decide when to sell and buy. Secondly, it is not guaranteed that we can buy at
the prices we observe, nor is it guaranteed that we can short at the prices we observe. For
example, the demand to short in instances where the signal is significantly higher than 2,
will be very high. This will in turn create higher costs for the shares that are available and
therefore impact profitability. We also assumes our broker can even find the shares to
short, when it is possible that our broker in some instances has none or at least not the
optimal amount we want to short. Moreover, there are transaction costs for each trade that
would accumulate over this period, which would also impact the profitability.

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (17)

Theories of nonrandom price motion
Theories of nonrandom price motionTheories of nonrandom price motion
Theories of nonrandom price motion
 
Market efficiency presentation
Market efficiency presentationMarket efficiency presentation
Market efficiency presentation
 
Emh
EmhEmh
Emh
 
Stock market model
Stock market modelStock market model
Stock market model
 
Perspective on Active & Passive Manageemnt of Fund
Perspective on Active & Passive Manageemnt of FundPerspective on Active & Passive Manageemnt of Fund
Perspective on Active & Passive Manageemnt of Fund
 
Market efficiency and portfolio theory
Market efficiency and portfolio theoryMarket efficiency and portfolio theory
Market efficiency and portfolio theory
 
Parametric perspectives-winter-2010 (1)
Parametric perspectives-winter-2010 (1)Parametric perspectives-winter-2010 (1)
Parametric perspectives-winter-2010 (1)
 
Market efficiency
Market efficiencyMarket efficiency
Market efficiency
 
Market efficiency and emh
Market efficiency and emhMarket efficiency and emh
Market efficiency and emh
 
Efficient market hypothesis
Efficient market hypothesisEfficient market hypothesis
Efficient market hypothesis
 
Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)
 
Market behavior research @ bec doms
Market behavior research @ bec domsMarket behavior research @ bec doms
Market behavior research @ bec doms
 
Effcient market hypothesis
Effcient market hypothesisEffcient market hypothesis
Effcient market hypothesis
 
Market efficiency and forms of market efficiency
Market efficiency and forms of market efficiencyMarket efficiency and forms of market efficiency
Market efficiency and forms of market efficiency
 
Case study of s&amp;p 500
Case study of s&amp;p 500Case study of s&amp;p 500
Case study of s&amp;p 500
 
Selection of Markets & Issues
Selection of Markets & IssuesSelection of Markets & Issues
Selection of Markets & Issues
 
Education
Education Education
Education
 

Andere mochten auch

Overview and Implementation of Principal Component Analysis
Overview and Implementation of Principal Component Analysis Overview and Implementation of Principal Component Analysis
Overview and Implementation of Principal Component Analysis Taweh Beysolow II
 
Fundamentals of oil and gas cert
Fundamentals of oil and gas certFundamentals of oil and gas cert
Fundamentals of oil and gas certLewis Chapman
 
Asset Price Prediction with Machine Learning
Asset Price Prediction with Machine LearningAsset Price Prediction with Machine Learning
Asset Price Prediction with Machine LearningTaweh Beysolow II
 
Oil Physical and Financial Markets: Economics, Engineering, Pricing, And Regu...
Oil Physical and Financial Markets: Economics, Engineering, Pricing, And Regu...Oil Physical and Financial Markets: Economics, Engineering, Pricing, And Regu...
Oil Physical and Financial Markets: Economics, Engineering, Pricing, And Regu...Kevin Kane
 
Classification via Logistic Regression
Classification via Logistic RegressionClassification via Logistic Regression
Classification via Logistic RegressionTaweh Beysolow II
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Tradingnattyvirk
 
Fundamentals of oil & gas industry h. kumar
Fundamentals of oil & gas industry   h. kumarFundamentals of oil & gas industry   h. kumar
Fundamentals of oil & gas industry h. kumargusgon
 

Andere mochten auch (10)

Overview and Implementation of Principal Component Analysis
Overview and Implementation of Principal Component Analysis Overview and Implementation of Principal Component Analysis
Overview and Implementation of Principal Component Analysis
 
Fundamentals of oil and gas cert
Fundamentals of oil and gas certFundamentals of oil and gas cert
Fundamentals of oil and gas cert
 
Gini Index Research
Gini Index ResearchGini Index Research
Gini Index Research
 
Asset Price Prediction with Machine Learning
Asset Price Prediction with Machine LearningAsset Price Prediction with Machine Learning
Asset Price Prediction with Machine Learning
 
Oil Physical and Financial Markets: Economics, Engineering, Pricing, And Regu...
Oil Physical and Financial Markets: Economics, Engineering, Pricing, And Regu...Oil Physical and Financial Markets: Economics, Engineering, Pricing, And Regu...
Oil Physical and Financial Markets: Economics, Engineering, Pricing, And Regu...
 
Classification via Logistic Regression
Classification via Logistic RegressionClassification via Logistic Regression
Classification via Logistic Regression
 
Statistical arbitrage
Statistical arbitrageStatistical arbitrage
Statistical arbitrage
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
 
Fundamentals of oil & gas industry h. kumar
Fundamentals of oil & gas industry   h. kumarFundamentals of oil & gas industry   h. kumar
Fundamentals of oil & gas industry h. kumar
 
International Accounting
International Accounting International Accounting
International Accounting
 

Ähnlich wie Statistical Arbitrage

Black Swan Event and How to Prepare for It
Black Swan Event and How to Prepare for ItBlack Swan Event and How to Prepare for It
Black Swan Event and How to Prepare for ItSamir Halim
 
Chapter 06_ Are Financial Markets Efficient?
Chapter 06_ Are Financial Markets Efficient?Chapter 06_ Are Financial Markets Efficient?
Chapter 06_ Are Financial Markets Efficient?Rusman Mukhlis
 
2017 Why invest in Momentum as a Factor ?
2017 Why invest in Momentum as a Factor ?2017 Why invest in Momentum as a Factor ?
2017 Why invest in Momentum as a Factor ?Frederic Jamet
 
A Century of Evidence on Trend-Following Investing
A Century of Evidence on Trend-Following InvestingA Century of Evidence on Trend-Following Investing
A Century of Evidence on Trend-Following InvestingTrading Game Pty Ltd
 
Trading System Seminar Handout
Trading System Seminar HandoutTrading System Seminar Handout
Trading System Seminar HandoutDean Hoffman
 
Investment Analysis
Investment Analysis Investment Analysis
Investment Analysis Nina Haku
 
Faj jan feb_2003_surprise_higher_dividends_higher_earnings_growth
Faj jan feb_2003_surprise_higher_dividends_higher_earnings_growthFaj jan feb_2003_surprise_higher_dividends_higher_earnings_growth
Faj jan feb_2003_surprise_higher_dividends_higher_earnings_growthSarayut Wanasin
 
Does trend following work on stocks?
Does trend following work on stocks?Does trend following work on stocks?
Does trend following work on stocks?LongboardAM
 
Monthly sept20 spx qi
Monthly sept20 spx qiMonthly sept20 spx qi
Monthly sept20 spx qiEyeHigh
 
Low Volatility Anomaly Osama Abdetawab
Low Volatility Anomaly Osama AbdetawabLow Volatility Anomaly Osama Abdetawab
Low Volatility Anomaly Osama AbdetawabOsama Elaish
 
Advance iq capital quantitative models
Advance iq capital quantitative modelsAdvance iq capital quantitative models
Advance iq capital quantitative modelsAndrew214
 
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdfAbdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdfdrwong3
 
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdfAbdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdfdrwong3
 
Abdul Rahim wong phd thesis.docx
Abdul Rahim wong phd thesis.docxAbdul Rahim wong phd thesis.docx
Abdul Rahim wong phd thesis.docxdrwong3
 
Abdul Rahim wong 1st year phd thesis.docx
Abdul Rahim wong 1st year phd thesis.docxAbdul Rahim wong 1st year phd thesis.docx
Abdul Rahim wong 1st year phd thesis.docxdrwong3
 
Use of vectors in financial graphs
Use of vectors in financial graphsUse of vectors in financial graphs
Use of vectors in financial graphsdrwong3
 
2015 Equal Weighting and Other Forms of Size Tilting
2015 Equal Weighting and Other Forms of Size Tilting2015 Equal Weighting and Other Forms of Size Tilting
2015 Equal Weighting and Other Forms of Size TiltingFrederic Jamet
 

Ähnlich wie Statistical Arbitrage (20)

Black Swan Event and How to Prepare for It
Black Swan Event and How to Prepare for ItBlack Swan Event and How to Prepare for It
Black Swan Event and How to Prepare for It
 
Chapter 06_ Are Financial Markets Efficient?
Chapter 06_ Are Financial Markets Efficient?Chapter 06_ Are Financial Markets Efficient?
Chapter 06_ Are Financial Markets Efficient?
 
2017 Why invest in Momentum as a Factor ?
2017 Why invest in Momentum as a Factor ?2017 Why invest in Momentum as a Factor ?
2017 Why invest in Momentum as a Factor ?
 
Dynamic stopcharts
Dynamic stopchartsDynamic stopcharts
Dynamic stopcharts
 
A Century of Evidence on Trend-Following Investing
A Century of Evidence on Trend-Following InvestingA Century of Evidence on Trend-Following Investing
A Century of Evidence on Trend-Following Investing
 
Trading System Seminar Handout
Trading System Seminar HandoutTrading System Seminar Handout
Trading System Seminar Handout
 
BHVF 11.pptx
BHVF 11.pptxBHVF 11.pptx
BHVF 11.pptx
 
Investment Analysis
Investment Analysis Investment Analysis
Investment Analysis
 
Faj jan feb_2003_surprise_higher_dividends_higher_earnings_growth
Faj jan feb_2003_surprise_higher_dividends_higher_earnings_growthFaj jan feb_2003_surprise_higher_dividends_higher_earnings_growth
Faj jan feb_2003_surprise_higher_dividends_higher_earnings_growth
 
Does trend following work on stocks?
Does trend following work on stocks?Does trend following work on stocks?
Does trend following work on stocks?
 
Monthly sept20 spx qi
Monthly sept20 spx qiMonthly sept20 spx qi
Monthly sept20 spx qi
 
Low Volatility Anomaly Osama Abdetawab
Low Volatility Anomaly Osama AbdetawabLow Volatility Anomaly Osama Abdetawab
Low Volatility Anomaly Osama Abdetawab
 
Advance IQ Capital Quantitative Models
Advance IQ Capital Quantitative ModelsAdvance IQ Capital Quantitative Models
Advance IQ Capital Quantitative Models
 
Advance iq capital quantitative models
Advance iq capital quantitative modelsAdvance iq capital quantitative models
Advance iq capital quantitative models
 
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdfAbdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
 
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdfAbdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
Abdul+Rahim+wong+1st+year+phd+thesis.docx.pdf
 
Abdul Rahim wong phd thesis.docx
Abdul Rahim wong phd thesis.docxAbdul Rahim wong phd thesis.docx
Abdul Rahim wong phd thesis.docx
 
Abdul Rahim wong 1st year phd thesis.docx
Abdul Rahim wong 1st year phd thesis.docxAbdul Rahim wong 1st year phd thesis.docx
Abdul Rahim wong 1st year phd thesis.docx
 
Use of vectors in financial graphs
Use of vectors in financial graphsUse of vectors in financial graphs
Use of vectors in financial graphs
 
2015 Equal Weighting and Other Forms of Size Tilting
2015 Equal Weighting and Other Forms of Size Tilting2015 Equal Weighting and Other Forms of Size Tilting
2015 Equal Weighting and Other Forms of Size Tilting
 

Statistical Arbitrage

  • 1. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 1 Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time Taweh Beysolow II Advisor: Yusif Simaan Fordham University
  • 2. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 2 I. Introduction History of Statistical Arbitrage From the 1980s forward, statistical arbitrage strategies yielded astounding returns that were attractive to both fund managers and investors. This was generally the case until the end of the 20th century and beginning of the 21st century, in which several incidents of considerable magnitude caused strategies to perform less well at best and terribly at worst. Statistical arbitrage funds failed catastrophically, investors withdrew funds, and many places that did practice statistical arbitrage in part stopped completely. While there has been resurgence of the discipline to some degree in the late 2000s and early 2010s, it is still neither as largely practiced nor as profitable as it was in the 1980s. While it is uncertain whether the profitability of this discipline in the future will ever reach its former levels, the study of the discipline’s rise, fall, and how it can be improved provides useful information for aspiring quantitative analysts, researchers, and traders. What is arbitrage and how is it different from statistical arbitrage? Arbitrage is defined as the act of taking advantage of inefficiencies in the price discovery process to obtain a “risk-free” profit. Typically, this involves the trading of stocks, options, or fixed income products. In traditional arbitrage, this involves trading between two or more markets, with the objective of buying assets in one market and selling them to make a profit, often requiring an instantaneous buy and sell. Traditional arbitrage usually involves investing nothing, takes no risk, but is able to make money on this discrepancy. In theory, asset prices adjust quickly and eliminate arbitrage opportunities.
  • 3. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 3 Statistical arbitrage seeks to take advantage of temporary mispricing consistently and yielding positive expected profit. As such, it is not the same as the traditional form of arbitrage. What is the market? In statistical arbitrage, the market usually is described as an index, or benchmark of some sort, and the equity would be considered a subset of the market. An example of this would be the SPY and YHOO – the former is a proxy for the market, here being the S&P 500, and the latter is a subset of the S&P 500. II. Mechanics and Assumptions of Statistical Arbitrage Trending vs. Reverting: What Causes Both Stocks generally are described to move, broadly speaking, in two distinct patterns: trending and reverting. Trending stock prices usually are caused by fundamental changes in the stock or the market, such as positive/negative news, earnings calls, and or changes in systemic factors within the market. These changes are typically considered to be long- term, and as such won’t be the primary focus of the study. We would like to focus on the short-term changes, which typically are classified as reversion. In this experiment, we consider that stocks are priced relative to the market, and therefore that they can be either in alignment with the market or be misaligned, either positively or negatively. When systematic changes occur in the market, we should in theory observe that all prices of stocks within the market move in a constant proportion with the market. This is true regardless of whether the market rises or falls. However, if
  • 4. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 4 we observe a movement of a stock that is considerably large in either direction, and the market did not move accordingly, we would consider this a temporary disequilibrium. As such, we flag these instances and predict there will be a reversionary movement towards the price that is closer towards its equilibrium price relative to the market. To illustrate the concept, consider that we are looking at a mining stock. It is just announced that there was major accounting fraud committed by the company, in which they overstated earnings. Long-term downward price movements would be expected. Contrastingly, imagine we are looking at the same mining stock but for some reason today, it gained 20% when there was no outwardly visible reason that should have happened. We do not expect this move to be permanent, and as such this would be considered a temporary mispricing. In short, fundamental changes cause permanent moves, where as temporary changes do not. III. Experiment In this experiment, we will download the open and close data for all stocks in the S&P 500 from yahoo Finance using the quantmod package in Yahoo Finance. From here, we will calculate returns as such: 𝐶𝑙𝑜𝑠𝑒𝑅'( = *+(,- *+( − 1 (1) 𝑂𝑝𝑒𝑛𝑅'( = *+(4- *+( − 1 (2) 𝐴𝑣𝑔. 𝑅'( = 9 : 𝛴: 𝑅'( − 1 (3) 𝑊ℎ𝑒𝑟𝑒 𝑥 = 𝑠𝑡𝑜𝑐𝑘 𝑥, 𝑦 = 𝑠𝑡𝑜𝑐𝑘 𝑦, 𝑡 = 𝑡𝑖𝑚𝑒 𝑝𝑒𝑟𝑖𝑜𝑑 1,2, … 𝑛 , 𝑛 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑡𝑖𝑜𝑛𝑠, 𝑎𝑛𝑑 𝑃 𝑥 𝑡 = 𝑃𝑟𝑖𝑐𝑒 𝑜𝑓 𝑆𝑡𝑜𝑐𝑘 𝑥 𝑖𝑛 𝑝𝑒𝑟𝑖𝑜𝑑 𝑡
  • 5. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 5 Each ticker is a data frame (a generalized matrix of data), and each data frame is an element within the list containing all of the stock data. After we extract the open and close column data of each stock and calculate the returns, we store this data in a list of its own, from which we will calculate all further statistics. The subsequent statistics are all rolling window calculations, with the window being 60 days. Other practitioners may feel free to change the rolling window size and observe differences in the strategy’s performance. We use equations 1 for the first 60-day period moving window, as it represents the observed before trading begins. However, once we are assumed to be trading with real time data, we must use equation 2. The reasoning is that if we want to trade in period t, we only at that time can observe data prior to that point, not ahead. As such, returns are calculated open to open. After these vectors are reorganized, we take a 60-day moving average of the returns, and proceed to perform a 60-day moving window calculations of the following statistics: 𝜎' = Q(S+( T UV+( )X :T9 (4) 𝜌',Z[ = ]^_ ',Z[ `+`ab( (5) 𝛽'( = 𝜌',Z[ `+ `ab( (6) 𝑊ℎ𝑒𝑟𝑒 𝜎' = 𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛, 𝜌',Z[ = 𝑐𝑜𝑟𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑛 = 𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑡𝑖𝑜𝑛𝑠, 𝑅'( = 𝑟𝑒𝑡𝑢𝑟𝑛 , 𝑎𝑛𝑑 𝛽'( = 𝐵𝑒𝑡𝑎
  • 6. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 6 The standard deviation (eq.4) will represent the risk associated with each asset, the correlation (eq.5) will be a measure of the market and the stock’s respective correlation, and beta (eq.5) is a measure of how risky an asset is relative to the market. These equations play several critical roles in our experiment. One of those functions is determining the optimal amount by which we should hedge our portfolio: 𝐻 = −𝛽 𝑃𝑜𝑟𝑡 , 𝑤ℎ𝑒𝑟𝑒 𝐻 = ℎ𝑒𝑑𝑔𝑒 𝑟𝑎𝑡𝑖𝑜, 𝑎𝑛𝑑 𝑃𝑜𝑟𝑡 = 𝑃𝑜𝑟𝑡𝑓𝑜𝑙𝑖𝑜 𝑉𝑎𝑙𝑢𝑒 As mentioned before, hedging is an integral component to statistical arbitrage strategies. In the context of this experiment, the hedge ratio is the percentage of our portfolio investment that we devote to short selling the market. We hedge in statistical arbitrage because we wish to lock the gains we observe from a temporary positive disequilibrium with the stock relative to the market. For example, say we observe a price rise substantially while the market overall did not move. As per the concept of reversion, we expect that over the next period that this stock will fall and go closer towards its equilibrium price relative to the market. Because we wan to preserve the positive return yielded from this disequilibrium, we short the market to offset the losses, from the stock being held through this period. One-Factor Return Model For the experiment, we will use the following model: 𝐿𝑒𝑡 𝑦 ∗ = 𝑡ℎ𝑒𝑜𝑟𝑒𝑡𝑖𝑐𝑎𝑙 𝑟𝑒𝑡𝑢𝑟𝑛 𝑎𝑡 𝑡𝑖𝑚𝑒 𝑡, 𝛼 = 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙 , 𝜖 = 𝑛𝑜𝑖𝑠𝑒 𝑎𝑡 𝑡𝑖𝑚𝑒 𝑡 𝑦 ∗ = 𝛼 + 𝛽 𝑅Z[ + 𝜖 (7)
  • 7. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 7 The only systemic factor in returns is the market. As such, when we subtract the portion of the returns attributed to the market, we are left with the following: 𝛼 = 𝑅'( − 𝛽' 𝑅Z[( (7) 𝑊ℎ𝑒𝑟𝑒 𝛼 = 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙 The residual (eq.7) is defined as the returns specific to the stock, where it is here an average. To trigger a trade due to very high or very low residuals, we calculate the following statistics as well: 𝜎m+( = 𝜎'( n − 𝛽'( n 𝜎'( n (8) 𝑠𝑖𝑔𝑛𝑎𝑙 = m `o+( (9) 𝑊ℎ𝑒𝑟𝑒 𝜎m+( = 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙 𝑟𝑖𝑠𝑘 (𝑠𝑡𝑑. 𝑑𝑒𝑣. 𝑜𝑓 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙𝑠) Residual Risk (eq.8) essentially is the in period standard deviation of the residuals themselves. Plainly spoken, when we take the ratio of the residual to the residual risk, we get a number that tells us how many standard deviations from the mean the alpha is, giving us our trading signal (eq.9). Why do we focus on residuals? The two things that affect residuals are 1) long term fundamental changes and 2) trading imbalances that cause the residual to be artificially high/low. Fundamental changes to a stock, such as an increase in earnings or a structural change in the sector of the stock, cause longer term changes to the price levels that a stock will gravitate around.
  • 8. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 8 As such, this doesn’t necessarily help us for finding intraday trading opportunities. Being that we want to look at the short term, we want to focus on non-systemic factors only, and arguably factors that are relatively short lived in their effects. The signal has a lower limit of negative infinity and an upper limit of infinity. We consider our statistical significance level in this experiment to be 95%, or that any absolute value of the signal greater than or equal to two represents an outlier. However, further research can be performed on individual stocks and/or portfolios to determine an optimal significance level. Trading Algorithm Due to the significance level being 95% in this experiment, the bounds between which we will hold a cash position in our account is -2 < signal < 2. When signal < -2, we say that statistically the residual is artificially low and that the following period is likely to feature a signal value closer to 0. As such, we will place an un-hedged investment in the stock for this period. When the signal is > 2, we say that statistically the residual is artificially high, and that the following period is likely to feature a signal value closer to zero. As such, we will hedge our long investment in the stock by shorting the market. In the case of our experiment, the market is the SPY. Our portfolio will be a subset of the market, dependent on which stocks are statistically most likely to exhibit reversionary moves. Plainly stated, if a stock is likely to make a reversionary move, it will be traded. If not, we will opt to hold a cash position instead.
  • 9. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 9 IV. Results and Discussion Summary Statistics: Total Number of Days 504 Total Trades 317,649 Average Daily Trades 138 Minimum Daily Trades 9 Maximum Daily Trades 362 Average Return 0.37% Std. Dev. Of Returns 0.36% Cumulative Return 403.80% Sharpe Ratio .99
  • 10. Testing Mean Reversion: Evaluation of a Statistical Arbitrage Strategy Over Time 10 Returns in Theory vs. Reality It is important to note that while these returns are certainly quite appealing, that it is highly improbable that they would ever be realized should this strategy be employed in live trading activities. The reasoning behind this is that we are observing prices, and ultimately the returns derived from them, close to close. However, to properly execute this strategy, we cannot hold onto these equities overnight, putting us in a position where we must decide when to sell and buy. Secondly, it is not guaranteed that we can buy at the prices we observe, nor is it guaranteed that we can short at the prices we observe. For example, the demand to short in instances where the signal is significantly higher than 2, will be very high. This will in turn create higher costs for the shares that are available and therefore impact profitability. We also assumes our broker can even find the shares to short, when it is possible that our broker in some instances has none or at least not the optimal amount we want to short. Moreover, there are transaction costs for each trade that would accumulate over this period, which would also impact the profitability.