Tactical Equity Allocation Using Conference Call Sentiment Indicators

THEORETICAL BACKGROUND 

The dialogue between management teams and Wall Street analysts on earnings conference calls is an important tool for information dissemination from asymmetrically informed management teams to the investing public.  This data point is primarily used by fundamental analysts to understand the current issues concerning a public company’s performance.  However, the linguistic content of these dialogues can also provide valuable quantitative data points if the market is not fully efficient in immediately digesting positive and negative stories.  Route 3 Capital and its predecessor firm, HudsonView Capital Management, have worked to prove this is the case, by quantifying and employing sentiment measures from these conference calls to predict security returns.

Sentiment Average Construction 

Route 3 Capital uses proprietary measures of conference call sentiment to systematically guide short to medium term tactical equity allocation for managed account clients.  To this end, the firm maintains short and medium term moving averages of sentiment for industry ETFs using weighted sentiment scores of constituent company conference call dialogues.  The following chart shows clear delineation in next day returns (morning to morning) in four beta driven industry ETFs by percentile of the sentiment averages:

Average Next Day ETF Returns by Sentiment Score Percentile

   

TACTICAL ETF STRATEGY BACKTEST

In November 2012, Route 3 began live trading its Tactical ETF Strategy.  The model is systematic, using the sentiment averages to determine a long, short, or neutral position in each ETF each trading day.   Route 3 used minute bar pricing data from TickData, adjusted for dividends, and the Deltix QuantOffice strategy development environment utilizing TimeBase’s integrated message bus to backtest the strategy from Jan 1, 2007 through the present.  The risk adjusted returns are encouraging and, with a negative 21% monthly correlation to the S&P 500, show particular value as an equity hedge or short-bias strategy:

Tactical ETF Strategy: Backtested Model Time Series (1/1/2007 – 1/31/2014),  $10m starting equity)

 

Tactical ETF Strategy: Backtested Monthly Returns (1/1/2007 – 1/31/2014)

 

 

Tactical ETF Strategy: Backtested Summary Performance Data (1/1/2007 –1/31/2014)

 

 

Principal- Joseph Graham, CFA

Joe currently operates Route 3 Capital and is a Senior Risk Officer at LibertyView Capital Management.  He most recently founded HudsonView Capital Management, which developed quantitative testing systems and research related to linguistic signals.  The company used this research to manage systematic long/short strategies for a prominent Geneva-based family office.  Prior to HudsonView, Joe was part of the SPAC portfolio management team at Millennium Partners.  Joe’s team was one of the largest SPAC common and warrant investors from 2008 to 2010.  Prior to Millennium, Joe was an Analyst and Portfolio Manager at LibertyView in the equity group, focusing on private placements, merger arbitrage, and SPACs.  He has an MBA with honors from the Wharton School of Business at the University of Pennsylvania and graduated summa cum laude with majors in Finance and Philosophy from Washington University in St. Louis.

Contact info:

Email: [email protected]

Phone: 646-660-3167

Automated Trading Strategy using Social Media Sentiment

Introduction

This paper describes the implementation of an automated equity trading strategy based on social media derived bullishness and bearishness sentiment indicators and the results from back-testing this strategy. The sentiment factors were provided by PsychSignal who have developed natural language processing software with the purpose of calculating bullishness and bearishness indices from StockTwits, Twitter and chat rooms.

The PsychSignal data and market data used in this research, together with the QuantOffice implementation of this strategy, are available from Deltix Cloud Services (DCS). 

Trading logic description

We developed the trading strategy based on intraday PsychSignal bullish/bearish indices using two approaches. In both cases, we were operating on the hypothesis that past bullish/bearish indicators for a specific security provide predictive power on the future price of that security and that we can profitably trade using this insight.

1. Regression based model

We took as predictors the two most recent days of daily bullish and bearish indicators data. These daily predictors were smoothed using an EMA (Exponential Moving Average) indicator and acted as the regressors (independent variables) in our model. As the regressand (dependent variable), we calculated the close-to-next-day-open price change for each security in the S&P500 over a period of 50 days (the training period).  We applied linear regression to the resultant matrix of regressor values and the vector of the regressand values. The regression parameters were set as weights in the indicator formula and the following signal logic was applied:

If indicator  is positive and current price is lower than the 50 day EMA-smoothed day close price, then open a long position at market close and close that position at next market open.

If indicator is negative and current price is higher than 50 day EMA-smoothed day close price with then open a short position at market close and close that position at next market open.

The order size for opening order is calculated by the following formula:

where: retON = list of overnight returns collected for the last 50 days.

The following variations of this model are available via input parameters of the strategy:

  •   Using the return calculated as 15 min before close price, as an extra parameter in the regression model.
  • Instead of comparing the indicator to 0, we can compare it to some enhanced boundaries. As an example of such boundaries, +/- absolute value of the 30 day SMA (Simple Moving Average) of the indicator was used: if indicator is greater than the absolute value of the SMA, then open long position, if it is less then open a short position.

2. RSI based model

In this model, daily predictors are smoothed by collecting data for each predictor into an EMA indicator. The day close EMA values are smoothed with EMA daily indicators and the RSI (Relative Strength Index) is calculated as:

If RSI<15  and current price is lower than 50 day EMA-smoothed day close price then open long position at market close and close that position at next open.

If RSI>85  and current price is higher than 50 day EMA-smoothed day close price then open short position at market close and close that position at next open.

The order size for opening order is calculated by the following formula:

where: retON means list of overnight returns collected for the last 30 days.

Results

The strategy was run on securities in the S&P100.

Consolidated results

ParameterRegression basedSMA boundariesReturn in regression, SMA boundariesRSI
Net Profit/Loss390,804.54404,459.44325,423.34137,914.56
Total Profit2,176,093.571,734,422.431,614,855.21326,873.83
Total Loss-1,785,289.03-1,329,962.99-1,289,431.87-188,959.27
Cumulated Profit %390.80%404.46%325.42%137.91%
Max Drawdown-106,957.11-95,237.32-62,589.54-20,407.60
Max Drawdown %-18.80%-16.77%-13.00%-19.80%
Max Drawdown Date7/24/20137/23/20137/25/201312/31/2012
Return/Drawdown Ratio3,654,255,26,76
Drawdown Days %46.07%41.88%50.26%54.97%
Max Drawdown Duration21212129
CAGR771.97%805.16%617.77%225.39%
Sharpe Ratio2,883,133,12,7
Annualized Volatility184,48175,93143,0369,47
Sortino Ratio5,555,615,755,76
UPI5,186,794,134,14
Information Ratio2,883,133,12,7
Optimal f2,272,63,024,67
All Trades #565743414226739
Profitable Trades Ratio0,510,540,510,58
Winning Trades #289723382172427
Losing Trades #276020032054312
Average Trade69,0893,1777,01186,62
Average Winning Trade751,15741,84743,49765,51
Average Losing Trade-646,84-663,99-627,77-605,64
Avg. Win/ Avg. Loss Ratio1,161,121,181,26
Average Profit per Share0,020,030,030,05
Max Conseq. Winners13261947
Max Conseq. Losers15161413

Detailed results

1. Regression based algorithm

ParameterAll TradesLong TradesShort Trades
Net Profit/Loss390,804.54378,866.6211,937.92
Total Profit2,176,093.57845,980.891,330,112.68
Total Loss-1,785,289.03-467,114.27-1,318,174.76
Cumulated Profit %390.80%378.87%11.94%
Max Drawdown-106,957.11-53,779.96-158,289.04
Max Drawdown %-18.80%-15.74%-60.24%
Max Drawdown Date7/24/20136/24/20137/24/2013
Return/Drawdown Ratio3,657,040,08
Drawdown Days %46.07%45.03%64.40%
Max Drawdown Duration211627
CAGR771.97%743.23%16.59%
Sharpe Ratio2,883,080,07
Annualized Volatility184,48167,3242,09
Sortino Ratio5,555,570,11
UPI5,1810,020,05
Information Ratio2,883,080,07
Optimal f2,272,660,03
All Trades #565718593798
Profitable Trades Ratio0,510,610,47
Winning Trades #289711251772
Losing Trades #27607342026
Average Trade69,08203,83,14
Average Winning Trade751,15751,98750,63
Average Losing Trade-646,84-636,4-650,63
Avg. Win/ Avg. Loss Ratio1,161,181,15
Average Profit per Share0,020,070
Max Conseq. Winners135534
Max Conseq. Losers152344
 

2. +/- SMA value as boundaries

ParameterAll TradesLong TradesShort Trades
Net Profit/Loss404,459.44377,455.0827,004.36
Total Profit1,734,422.431,047,071.96687,350.47
Total Loss-1,329,962.99-669,616.88-660,346.11
Cumulated Profit %404.46%377.46%27.00%
Max Drawdown-95,237.32-70,438.24-99,399.48
Max Drawdown %-16.77%-16.54%-43.90%
Max Drawdown Date7/23/20136/24/201308.01.2013
Return/Drawdown Ratio4,255,360,27
Drawdown Days %41.88%45.55%60.73%
Max Drawdown Duration211628
CAGR805.16%739.85%38.46%
Sharpe Ratio3,132,540,28
Annualized Volatility175,93202,45131,01
Sortino Ratio5,614,30,43
UPI6,797,180,18
Information Ratio3,132,540,28
Optimal f2,61,810,22
All Trades #434122182123
Profitable Trades Ratio0,540,60,48
Winning Trades #233813251013
Losing Trades #20038931110
Average Trade93,17170,1812,72
Average Winning Trade741,84790,24678,53
Average Losing Trade-663,99-749,85-594,91
Avg. Win/ Avg. Loss Ratio1,121,051,14
Average Profit per Share0,030,060
Max Conseq. Winners263423
Max Conseq. Losers164034
 

3. Return in regression, SMA boundaries

ParameterAll TradesLong TradesShort Trades
Net Profit/Loss404,459.44377,455.0827,004.36
Total Profit1,734,422.431,047,071.96687,350.47
Total Loss-1,329,962.99-669,616.88-660,346.11
Cumulated Profit %404.46%377.46%27.00%
Max Drawdown-95,237.32-70,438.24-99,399.48
Max Drawdown %-16.77%-16.54%-43.90%
Max Drawdown Date7/23/20136/24/201308.01.2013
Return/Drawdown Ratio4,255,360,27
Drawdown Days %41.88%45.55%60.73%
Max Drawdown Duration211628
CAGR805.16%739.85%38.46%
Sharpe Ratio3,132,540,28
Annualized Volatility175,93202,45131,01
Sortino Ratio5,614,30,43
UPI6,797,180,18
Information Ratio3,132,540,28
Optimal f2,61,810,22
All Trades #434122182123
Profitable Trades Ratio0,540,60,48
Winning Trades #233813251013
Losing Trades #20038931110
Average Trade93,17170,1812,72
Average Winning Trade741,84790,24678,53
Average Losing Trade-663,99-749,85-594,91
Avg. Win/ Avg. Loss Ratio1,121,051,14
Average Profit per Share0,030,060
Max Conseq. Winners263423
Max Conseq. Losers164034
 

4.  RSI

ParameterAll TradesLong TradesShort Trades
Net Profit/Loss325,423.34304,738.1520,685.20
Total Profit1,614,855.21603,891.161,010,964.04
Total Loss-1,289,431.87-299,153.02-990,278.85
Cumulated Profit %325.42%304.74%20.69%
Max Drawdown-62,589.54-26,493.13-113,048.33
Max Drawdown %-13.00%-8.72%-48.37%
Max Drawdown Date7/25/20136/24/201308.01.2013
Return/Drawdown Ratio5,211,50,18
Drawdown Days %50.26%43.98%63.35%
Max Drawdown Duration211037
CAGR617.77%570.69%29.17%
Sharpe Ratio3,13,580,15
Annualized Volatility143,03115,91184,57
Sortino Ratio5,756,890,24
UPI4,139,860,09
Information Ratio3,13,580,15
Optimal f3,024,250,09
All Trades #422613012925
Profitable Trades Ratio0,510,620,47
Winning Trades #21728041368
Losing Trades #20544971557
Average Trade77,01234,237,07
Average Winning Trade743,49751,11739,01
Average Losing Trade-627,77-601,92-636,02
Avg. Win/ Avg. Loss Ratio1,181,251,16
Average Profit per Share0,030,080
Max Conseq. Winners193526
Max Conseq. Losers141746
 

·        Using the return calculated as 15 min before close price, as an extra parameter in the regression model.

·        Instead of comparing the indicator to 0, we can compare it to some enhanced boundaries. As an example of such boundaries, +/- absolute value of the 30 day SMA (Simple Moving Average) of the indicator was used: if indicator is greater than the absolute value of the SMA, then open long position, if it is less then open a short position.

Automated FX Trading Strategy Using Macro News Events

Introduction

This paper describes the implementation of an automated quantitative FX trading strategy based on macro news data provided by RavenPack.  RavenPack sources news from a variety of sources from which it produces an array of analytics (including sentiment, relevance and novelty) in real-time, and which are available historically.

We undertook the research and implemented the strategy in the Deltix QuantOffice research platform, a purpose-built C# development studio with embedded math, statistics and data libraries.

Our thesis was: does the arrival of macroeconomic news from the world’s largest economies bring additional volatility to the market? The historical data set used is described below:

  •      News Data from 1 March 2012 till 1 August 2012:

–       More than 1.1 million messages

–       Used subset of macro-economic news  for US (287,000 records), Germany (7,800), EU (3,700) and Japan (14,400).

  •       Market Data from 1 March 2012 till 1 August 2012:

–       Three currency pairs: EURUSD, USDJPY, EURJPY (bid/ask quotes)

–       Approx 100 million market data messages.

  •       News data was filtered by the following news types:

–       consumer-price-index

–       producer-price-index

–       unemployment

–       retail-sales

–       gross-domestic-product

–       durable-goods

–       interest-rate

–       consumer-confidence

–       home-sales-existing, home-sales-new

–       current-account, current-account-surplus, current-account-deficit

–       consumer-spending

–       jobless-claims

–       inflation

–       trade-balance, trade-balance-deficit, trade-balance-surplus

  •    Extra filters applied were:            

–       news relevance: RELEVANCE = 100 (maximum relevance)

–       news novelty: ENS = 100 (maximum novelty) 

Testing the Thesis

As a measure of volatility, we calculated the annualized standard deviation of log returns inside 5 minute windows of 10-sec bars (i.e. 30 bars). We also calculated variance ratio[i]:

               VR = HILO (N) / ( ATR(N) * SQRT(N))

where

               N = 30; HILO (N) is high/low price range and ATR(N) is average true range over the N bars period

All statistics were calculated for 5 minutes before the time of the news release time and for 5 minutes after. For example, for US announcements scheduled for 8:30am, the time intervals were 8:25am to 8:30am and 8:30am to 8:35am. The results, pertaining to US economic news data, are show below:

automated1

automated2

Trading Strategy

It is clear from the results above that there is a significant change in short-term volatility of FX rates after the announcement of economic data. The next step in our research was to design and test a trading strategy which utilizes this observation.

The strategy defines breakout buy/sell levels in the five minute interval preceding the scheduled event. Upon receiving the news event, the strategy creates a long position if the price exceeds the buy level, and creates a short position if the market moves below the sell level. The strategy then closes positions five minutes after receiving the news event.

In back-testing, order execution simulation was done using the relatively conservative Best Bid Offer mode: buy at best ask price; sell at best bid price. The lot size for all trades was $100,000.

Results

automated3

automated4


[i] Variance Ratio statistics introduced by Lo and MacKinlay (1988):

VR close to 1 indicates that market is in a random walk regime;

VR > 1 indicates that market is in a trending regime (with positive autocorrelation of price returns);

VR < 1 indicates that market is in a mean reversion regime (with negative autocorrelation of price returns).

 

 

Automated Trading Strategy Using Twitter Sentiment

By: The Deltix Quantitative Research Team

Introduction

This paper describes the implementation of an automated quantitative equity trading strategy based on sentiment factors derived from Twitter and the results from back-testing this strategy. The sentiment factors were provided by Social Market Analytics (SMA).  SMA produces a family of metrics, called S-Factors™, designed to capture the signature of financial market sentiment. SMA applies these metrics to data captured from Twitter to estimate sentiment for indices, sectors, and individual securities; yielding and recording time series of these measurements on daily and intraday time scales.

We implemented the strategy in the Deltix QuantOffice research platform, a purpose-built C# development studio with embedded math, statistics and data libraries.

The strategy, which uses SMA’s intraday S-Scores, generates trading signals based on the S-Score trend-lines. We applied industry standard moving average methodology for S-Score time-series data and established trend-lines by comparing slow and fast moving averages. In addition we generated several filters to improve signal accuracy.

We made a series of experiments on the members of S&P100 index from December 2011 till March 2013. We compared the following scenarios:

a)      Open a position using day open price

b)      Open a position at 9:32am using current price

In addition, we added a hedging rule against the market using the SPY ETF and investigated the impact of hedging for each of the above scenarios. In the consolidated results table below, “H+” means with hedging, “H-”means without.

The results of the backtesting showed Information Ratios between 3.0 and 3.72 across the four scenarios tested. The primary effects of hedging were to reduce average profit per share and drawdown amounts.

 

Consolidated results

 SP100, H-,S&P100, H+,S&P100, H-,S&P100, H+,
gap 0.5%gap 0.5%9.32, gap 0.5%9.32, gap 0.5%
HedgingFALSETRUEFALSETRUE
Average Profit per Share0,080,040,080,03
Information Ratio3,313,723,313,3
Net Profit/Loss3,601.192,089.433,668.971,711.99
Total Profit9,058.9211,376.368,788.8610,922.18
Total Loss-5,457.73-9,286.93-5,119.88-9,210.19
Cumulated Profit %3.60%2.09%3.67%1.71%
Max Drawdown-338,39-126,02-339,28-171,73
Max Drawdown %-0.33%-0.12%-0.33%-0.17%
Max Drawdown Date4-May-20124-May-20124-May-201213-Dec-2012
Return/Drawdown Ratio10,6416,5810,819,97
Drawdown Days %62.46%63.36%62.46%66.67%
Max Drawdown Duration36394239
CAGR2.80%1.63%2.85%1.33%
Sharpe Ratio3,313,723,313,3
Annualized Volatility0,850,440,870,41
Sortino Ratio6,178,316,67,19
UPI1,812,281,771,51
Information Ratio3,313,723,313,3
Optimal f388,54845,22380,3812,9
All Trades #1598184215991844
Profitable Trades Ratio0,580,550,570,55
Winning Trades #92210209151019
Losing Trades #676822684825
Average Trade2,251,132,290,93
Average Winning Trade9,8311,159,6110,72
Average Losing Trade-8,07-11,3-7,49-11,16
Avg. Win/ Avg. Loss Ratio1,220,991,280,96
Average Profit per Share0,080,040,080,03
 

 

Detailed results

1. Open position at day open time

twitter1

Performance report:

ParameterAll TradesLong TradesShort Trades
Net Profit/Loss3,601.193,768.95-167,77
Total Profit9,058.928,316.09742,82
Total Loss-5,457.73-4,547.14-910,59
Cumulated Profit %3.60%3.77%-0.17%
Max Drawdown-338,39-338,39-206,71
Max Drawdown %-0.33%-0.33%-0.21%
Max Drawdown Date4-May-20124-May-20123-Aug-2012
Return/Drawdown Ratio10,6411,14-0,81
Drawdown Days %62.46%60.66%89.79%
Max Drawdown Duration3640299
CAGR2.80%2.93%-0.13%
Sharpe Ratio3,313,53-0,73
Annualized Volatility0,850,830,18
Sortino Ratio6,176,69-0,93
UPI1,812,31-0,05
Information Ratio3,313,53-0,73
Optimal f388,54422,1-404,48
All Trades #15981449149
Profitable Trades Ratio0,580,590,49
Winning Trades #92284973
Losing Trades #67660076
Average Trade2,252,6-1,13
Average Winning Trade9,839,810,18
Average Losing Trade-8,07-7,58-11,98
Avg. Win/ Avg. Loss Ratio1,221,290,85
Average Profit per Share0,080,1-0,03
Max Conseq. Winners21207
Max Conseq. Losers20207
 

 

2.  Open position at day open time, hedged version

twitter2

Performance report:

ParameterAll TradesLong TradesShort Trades
Net Profit/Loss2,089.433,819.76-1,730.33
Total Profit11,376.368,610.222,766.13
Total Loss-9,286.93-4,790.47-4,496.46
Cumulated Profit %2.09%3.82%-1.73%
Max Drawdown-126,02-382,58-1,730.33
Max Drawdown %-0.12%-0.37%-1.73%
Max Drawdown Date4-May-20127-Nov-20121-Mar-2013
Return/Drawdown Ratio16,589,98-1
Drawdown Days %63.36%61.86%89.79%
Max Drawdown Duration3941299
CAGR1.63%2.97%-1.35%
Sharpe Ratio3,723,55-2,04
Annualized Volatility0,440,840,66
Sortino Ratio8,316,7-2,71
UPI2,282,02-0,06
Information Ratio3,723,55-2,04
Optimal f845,22421,79-307,84
All Trades #18421499343
Profitable Trades Ratio0,550,580,43
Winning Trades #1020872148
Losing Trades #822627195
Average Trade1,132,55-5,04
Average Winning Trade11,159,8718,69
Average Losing Trade-11,3-7,64-23,06
Avg. Win/ Avg. Loss Ratio0,991,290,81
Average Profit per Share0,040,1-0,12
Max Conseq. Winners12205
Max Conseq. Losers162011
 

3. Open positions at 9.32am

twitter3

Performance report:

ParameterAll TradesLong TradesShort Trades
Net Profit/Loss3,668.973,861.32-192,34
Total Profit8,788.868,073.09715,77
Total Loss-5,119.88-4,211.77-908,11
Cumulated Profit %3.67%3.86%-0.19%
Max Drawdown-339,28-339,28-200,74
Max Drawdown %-0.33%-0.33%-0.20%
Max Drawdown Date4-May-20124-May-201221-Feb-2013
Return/Drawdown Ratio10,8111,38-0,96
Drawdown Days %62.46%59.76%89.79%
Max Drawdown Duration4242299
CAGR2.85%3.00%-0.15%
Sharpe Ratio3,313,55-0,84
Annualized Volatility0,870,850,18
Sortino Ratio6,67,22-1,05
UPI1,772,13-0,06
Information Ratio3,313,55-0,84
Optimal f380,3415,71-466,28
All Trades #15991450149
Profitable Trades Ratio0,570,580,48
Winning Trades #91584372
Losing Trades #68460777
Average Trade2,292,66-1,29
Average Winning Trade9,619,589,94
Average Losing Trade-7,49-6,94-11,79
Avg. Win/ Avg. Loss Ratio1,281,380,84
Average Profit per Share0,080,1-0,04
Max Conseq. Winners21207
Max Conseq. Losers202010
 

4. Open positions at 9.32am, hedged version

twitter4

Performance report:

ParameterAll TradesLong TradesShort Trades
Net Profit/Loss1,711.993,900.98-2,188.99
Total Profit10,922.188,352.472,569.72
Total Loss-9,210.19-4,451.49-4,758.71
Cumulated Profit %1.71%3.90%-2.19%
Max Drawdown-171,73-414,77-2,188.99
Max Drawdown %-0.17%-0.40%-2.19%
Max Drawdown Date13-Dec-20128-Nov-20121-Mar-2013
Return/Drawdown Ratio9,979,41-1
Drawdown Days %66.67%60.96%89.79%
Max Drawdown Duration3942299
CAGR1.33%3.03%-1.71%
Sharpe Ratio3,33,56-2,5
Annualized Volatility0,410,860,68
Sortino Ratio7,197,21-3,1
UPI1,511,87-0,07
Information Ratio3,33,56-2,5
Optimal f812,9414,81-367,24
All Trades #18441500344
Profitable Trades Ratio0,550,580,44
Winning Trades #1019867152
Losing Trades #825633192
Average Trade0,932,6-6,36
Average Winning Trade10,729,6316,91
Average Losing Trade-11,16-7,03-24,78
Avg. Win/ Avg. Loss Ratio0,961,370,68
Average Profit per Share0,030,1-0,15
Max Conseq. Winners19205
Max Conseq. Losers17209

1.      Open positions at 9.32

Index Tracking: A Genetic Algorithm Approach

Theoretical Background

The method of Index Tracking in portfolio management is a reproduction of time-dependence of a certain index I by distributing the capital among a given set of instruments S of the size M. To minimize transaction costs, the size N of a set P of instruments involved should not exceed certain boundary K. In this case the problem is called Tracking Portfolio Optimization with Cardinality Constraint. Here we describe how to apply Genetic Optimization (specifically, using the Genetic Optimization QuantOffice library) to solve the problem of Tracking Portfolio Optimization with Cardinality Constraint.

We use the following approach: the set P of allowed instruments and their weights  in the portfolio are found in course of genetic optimization. The fitness of the potential optimal portfolio is found as

where  – weights of instruments representing the target index in the set S. If the target index corresponds to the instrument number k, then . For the covariance matrix C of individual instrument returns

here  is the market price of the instrument m at time t.

The genetic algorithm is as follows:

  1. Each possible solution to the Index Tracking problem is represented as a chromosome. The chromosome is a set P of instruments of size K and their weights .  A population of such randomly generated chromosomes (randomly chosen instruments and weights) is maintained.
  2. Genetic optimization is performed in a number of iterations called generations. At the beginning of a new generation we have some initial population. All the chromosomes are sorted by their fitness to be a solution of the Index Tracking problem. The quantitative measure of fitness is the value of functional (1.1) for the weights  of P.
  3. Having completed sorting, the best Elitism% chromosomes of population are selected for reproduction phase.
  4. Then the reproduction phase begins. Two chromosomes are selected at random and the crossover operator is performed on them yielding two children. This crossover procedure is repeated until there are enough children to replace the entire population except the best Domination% and the worst Mutation% chromosomes.
  5. The latter are subjected to the mutation operator.
  6. After a specified number of iterations the best chromosome P with weights   of the last generation is reported as the Optimal Index Tracking Portfolio.

Genetic Operators

Crossover

Given two parent chromosomes A and B, the crossover operator generates two children  and , according to the following procedure. Intersection  and symmetric difference  of the sets are calculated. Instruments which present in both portfolios A and B are assigned a weight SharedAllelesWeight. We start from empty children sets  and .  Then a random real number is played. If

an element from I is chosen at random and added to the both children  and .  If

an element x from D is chosen at random. A second random real number  is played. If  this number is less than 0.5 then x is assigned to . In the opposite case it is assigned to . The procedure with random number  is repeated again and again until the both of the children reach the maximum size K. If any of the children  and  reaches the maximum size then all the subsequent assignments for that child are ignored.

Mutation

The Mutation operator consists of a series of elementary mutations. The elementary mutations applied are of two types. Mutations of the first type are a sequence of random exchanges of the pairs of elements between the chromosome P and the complement  S\P. During the second type of mutations a weight  of randomly chosen instrument i is altered. The relative frequency of these mutations is regulated by InstrumentVsWeight parameter. Then intensity of mutation, i.e. how many instrument/weight pairs are modified during one mutation operator, is defined by NumberOfMutations parameter.

Strategy Usage Manual

As input, the strategy accepts a list of instrument symbols from which to choose the optimal portfolio, and the symbol of the target index (instrument). Which symbol corresponds to the target index is indicated in the “Target Instrument” field. Maximum size of tracking portfolio is indicated in “Maximum Size of Tracking Portfolio” field. The weights of instruments in the tracking portfolio can be constrained to have a unit sum,

as indicated by “Is weights sum constrained to be unity?” field. Sometimes it is desirable to remove this restriction since the value of target index is proportional to the value of portfolio, where the coefficient of proportionality is a slowly varying function of time.

The returns  of each instrument are calculated regularly over a fixed period of time, whose duration is specified in “Size of one History Time Step (days)” in days. All other duration parameters are specified in terms of this time step size.

The strategy accumulates the history of prices during “Length of Price History Window (Time Steps)” time steps. Then periodically at intervals of “Interval Between Portfolio Rebalance Events (Time Steps)” time steps the correlation function (1.3) is evaluated and GA is started. After GA is finished the optimal tracking portfolio weights are determined.

When the strategy is run it plots two price differences between the target index (instrument) and the tracking portfolio. The first price difference is reset after each rebalancing. The second price difference is reset only after the first rebalancing and shows how index (instrument) behavior is approximated by the tracking portfolio globally.

Genetic algorithm parameters are defined by the fields “Population size”, “Number of generations”, “Percent of Dominating Chromosomes”, “Percent of Elite” and “Percent of Mutated”. Their meaning is described above in the section ‘Method’.

Parameters of the index tracking genetic operators (see section Genetic Operators above) are defined by the following fields: “Shared Alleles Weight” is SharedAllelesWeight; “Number of Genes to Mutate at once” is NumberOfMutations; “Instrument vs Weight Mutations” is InstrumentVsWeight.

The size of a tracking portfolio is proportional to the transaction costs necessary to maintain it. So we should keep the portfolio as small as possible and discard negligible instruments. The field “Threshold Weight below which to discard Instrument” defines when the instrument is discarded from portfolio: the instrument j is discarded if the following is true:

Example: “DIA” is specified as the index ticker. As a ticker universe, all the available equities are chosen. Maximum portfolio size e.g. = 4. All the other parameters are set as default in the current configuration of the attached strategy. The tracker approximates the out-of-sample behaviour of DIA; the quality of approximation is dependent on market (of course) and quality of data (gaps etc.).