Monday, January 3, 2011

Back test results

Happy New Year to everyone. Now for a little update on the algos and some results that we have from simulations as promised in one of the previous posts.

The snapshot only shows the info for the last date of the simulation. However some of the ratios shown do capture the essence and point us to the industries where we see the most promise for convergence. As seen from our results for the year the performance is not stellar for 2010, however with appropriate leverage, and adjustments to the algos based on the volatility regime shifts one can guarantee better results. There are industries that have posted very good returns on a longer time frame.


Now for some parameter specs used while running the algo. The algo uses daily adjusted closing price from yahoo for US stocks (about 6000 are considered).

Market - US stocks broken by industry. Pairs have to be in the same industry to enter a trade.

Volume - Only stocks with daily and last 20 day average volume greater than 40,000 are considered for this simulation. We ran the simulation for a volume floor of 20K also (which will also be posted). This volume filter should make sure that we are using tradeable companies.

Beta - One year beta to S &P 500 based on daily data is used in calculating the raw beta based on a linear regression. The betas are recomputed for each stock on a daily basis. No mean reversion adjustments are made to the calculated beta (Ex:- Bloomberg uses a mean reversion factor to adjust the raw beta). Stocks with a beta difference of less than 0.2 are used in the sample set for trading (another mechanism to reduce volatility).

Price - Volume criterion should filter low priced stocks. However we do have a low price barrier of $1. The reason for using this low barrier is because we use adjusted closing prices. When you use adjusted closing, even highly liquid stocks can have very low price when we go back 20 years (dividend adjustments and stock splits).

Mean - The average price ratio over 252 days is used in calculating the mean.

Std. Dev - 252 day daily data is used in calculating the std. Dev.

Co-integration test - The test is performed for testing stationarity over a 252 day period for all pairs. A p-val of less than 0.01 is required for a pair to be tradeable.

Std.Dev threshold - A 1.6 Std. Dev move from mean is used as entry criterion for each trade.
Separate simulation with 2 Std. Dev move was also considered.

Profit Limit : Profit limits of 10%, and 5% in separate simulations. Profit limit of complete reversion to mean is being tested right now (will be available later).

Loss Limit : Stop loss limit of 20% with 10% profit limit, and 10% with 5% profit limit are used.

If a pair is entered then it is not repeated the next day until it reverts or until the close out date is reached.

Close Out criteria: 100 days from opening up the trade or when profit or loss limits are hit.

Leverage : Leverage is limited to 300% on a gross basis in most simulations. An unconstrained (high leverage of 20) is also run to keep track of all historic pairs.

Sharpe ratio : We calculate annualized five year and one year Sharpe ratios. We also calculate a 3 month Sharpe ratio (without annualized returns). Risk free rate of 1% is used to calculate the Sharpe ratio.

Trading Cost : Assumed to be $1 per 1000 shares for both entering and exiting a stock.

Capital: Assumed to be $100K at the beginning.

Concentration limit: 6% of capital for each leg of a pair.

Hit ratio: Is calculated as the ratio of profitable pairs over total pairs for a given time frame. We calculate 5 year, 1 year, and 6 month ratios on a rolling basis. A pair is considered profitable if it makes 5% or more at the time of exit.


The summary results as of 12/08/2010 (last day of simulation) are at the bottom of the page. However 5 year Sharpe ratio should give a good idea of where the opportunities lie.

First image (highthreshold) shows results for profit limit of 10%, and second one (lowthreshold) shows results for profit limit of 5%. As we see with lower profit limit per pair we can achieve better Sharpe ratio. Basically that's what we were seeing in 2010. It was a different picture in 2009. A snapshot of 2009 shows the picture is different (reverses). Which takes us to the next important topic of volatility regimes. When the volatility in general is coming down the opportunity starts to shrink, however with better calibration and more trading one can still achieve fairly decent returns.

In our own experience a Sharpe of 0.6 or higher is good. As long as you are in positive territory you are still not losing money although you may not be doing all that well relative to the risk you are taking.

Additional charts and analysis will be provided for some of the industries soon. We have all the data on a daily basis in SQL DB. Just a matter of building a web interface to chart/present the data in a user friendly way. All the pairs info from the time of simulation inception to end date is also stored in the DB. There is scope for further data mining and adding additional conditions for better trading.

Data in xls format can be provided upon request. For some reason blogger doesn't allow me to upload spreadsheets.

Thursday, December 30, 2010

Close Out (UMPQ/CBU)

Closing out the Pair.

UMPQ at 12.39, CBU at 27.93

Position Update

Currently running the portfolio at a gross leverage of 65%, and net short of 21%. A slightly bearish posture given the size of the rally. Somehow the skeptic in me is screaming SELL SELL.

Outright shorts in the portfolio now are

1) MAR -1.7%
2) PLL -9%
3) TIF -3.8%
4) CBU -6%


Long/Short

PNR/PLL
RE/PTP
HPQ/ORCL
UMPQ/CBU

Thursday, December 23, 2010

Closing google time spread (Or trying)

Misread market closing time. Closed the Dec call at 4.2. Closing Jan call at 19.9 (hopefully).

Wednesday, December 22, 2010

New Trade (Software)

One of the rare software pairs trades on this site.

Long HPQ at 41.53
Short ORCL at 31.64

Some additional charts

Google Call Spread

Sell 12/23 Call at strike 600 --- $5.4
Buy 1/21 Call at strike 600 --- $20.9

Tuesday, December 21, 2010

Hypothetical Put/Call Time Spread

Another really short term trade idea. Opening up both a call time spread, and put time spread simultaneously. I'm using google as an example.

The strike is 600 for all four legs of this strategy. The bet is that google will trade between 600 and 610 between now and Thursday i.e. two days of trading. If that happens one could potentially make $750 in two days. Downside is if google rallies or drops 5% then you lose $1.5K. the info is based on one contract each.

Trade summary:

Ticker: GOOG
Instrument: Option
Type: Put
Strike: 600
Maturity: 2010-12-23
Buy/Sell: Sell
Price: 1.7
Implied Vol: 28%

Ticker: GOOG
Instrument: Option
Type: Put
Strike: 600
Maturity: 2011-1-21
Buy/Sell: Buy
Price: 16.6
Implied Vol: 28%


Ticker: GOOG
Instrument: Option
Type: Call
Strike: 600
Maturity: 2010-12-23
Buy/Sell: Sell
Price: 5.25
Implied Vol: 28%

Ticker: GOOG
Instrument: Option
Type: Put
Strike: 600
Maturity: 2011-1-21
Buy/Sell: Buy
Price: 20.6
Implied Vol: 28%

*Implied vol is an estimate. Could be +/- 2%.

Payoff chart:

Darn the google train!

Seems like is leaving without me :(... No worries. On a separate note outright short on NFLX seems dangerous at this time. With more than 20% of the float short, a short squeeze is a real possibility.

short CBU

Short CBU at 27.73