Pair Trading Strategy Journal

Discussion in 'Journals' started by jonnysharp, Aug 18, 2008.

  1. waltbx

    waltbx

    Here is what I did. I'm grateful for the guys who know much more than I do for sharing. I learned from them, especially Jonny.

    I have read each and every one of the posts listed in this journal, and copied notes into a word processer to use as a training guide. I'm treating it as a business and am being very serious about it. I ask questions on the forum after I have worked unsuccessfully to find my answer.

    My Pair Trade Finder settings are the default settings, except my trade size setting is $2500 (Long+Short = $5000 total). My account size was a little larger than $25K now up to almost $30K, and I use the margin provided by my broker, IB. I have my layers set to 2.00, 2.20, 2,40, etc.

    I studied the graphs of the trades Jonny put on, and studied his loosers. What was the commonality in the big losses? What did the graphs show that was in common in the losses?

    To find Jonny's spreadsheet of his trades, go through the posts to find where he posted his Excel spreadsheet. Study his trades, and look up the graphs in Pair Trade Finder. As Jonny posts his trades in this Journal, I put each of them in the spreadsheet. I study the losses.

    Some thoughts on what pairs to choose. Some people on this thread have said they aren't concerned much about the past profit history of specific pairs. I don't agree. (Keep in mind that many of them have much more experience than I have, and you should weigh their advice heavier than mine.) It is my belief that if we are to look historically at correlation of stocks in a pair, it is equally valid to look at profit history of the pair. After all, profit is why I'm in the game. If I have a choice between a pair averaging $35 profit over the past year, and one averaging $200, I'll choose the $200 pair. So I load my stocks, then PT finds all the pairs, and I choose the ones averaging $200 or more and with a correlation of 60% or better. My trade size is $2500 so if you go with a $10,000 trade size, you would look for pairs with an average profit 4x larger, or $800 or more. I don't tie my money up with smaller potential profit.

    When I discovered what I think is the key to knowing if a good pair will bring a profit today, I was ecstatic. I was looking at Jonny's trades and studying the graphs. You must do this. It will sink in better if you do this yourself, I believe. I saw the correlation between his loosing trades and the graph for those pairs. Most of them were trending pairs.

    Remember, that to be profitable, the ratio must drop below where it is today (that is if the ratio is above the mean today -- or go up if below the mean). And remember too, that this is called Mean Reversion pair trading. We look for pairs with ratios that have diverged from the mean, and we are expecting the ratio to revert back to the mean. But if, while we wait, the ratio continues to rise, over days it will drag the mean up with it. Losses occur when the daily ratio finally meets the mean, but does it above the entry ratio. So, the key is to study the Ratio Chart and pass on those pairs where the ratios have little chance of meeting the Mean Average line at a point where profit can be made. ie: don't trade pairs with strong trending graphs. Don't bother with "iffy" pairs.

    Do not fail to check for news. Any news that affects one stock in the pair, but not the other is problematic. Earning's reports coming in the next two weeks are a possible problem.

    I use a spread sheet to calculate an estimated profit % using the present ratio and my conservative estimate of where the ratio will be when it meets the Mean, determined from the ratio chart in PT. I choose only those pairs with an potential profit of 5% or more. I use this formula: (Expected ratio less today's ratio) / (today's ratio) x 0.5 as a percentage. This has been VERY helpful in making choices. Some pairs that have enter-the-trade signals have had potentials of 10%, some less than 1%.

    Before I get a signal to close, I'll set a stop loss to protect profits if one side is showing good profit. I'd rather take a good present profit, than risk losing it for possible future gain. Perhaps I'm wrong. When I get a signal to close the trade, I'll close out the losing side, but let the profitable side run, keeping a trailing stop loss to protect my profits.

    Jonny spends an hour studying the pairs, and trades once a day, at closing. I'm excited and having fun, so I spend my morning (I'm on the west coast USA) at the computer studying the trades and playing the "game." Personal choice. Eventually, I'll probably shift to what Jonny is doing, and do other things with my day.

    I haven't tried to factor RSI into the mix. Maybe someone with experience can tell me how RSI has been important to them. I haven't factored in spread either. I'd guess that if the spread were decreasing, that would be a good sign.

    Works for me. So far.

    Walt B
     
    #751     Mar 26, 2009
  2. saico

    saico

    Hello Walt,

    you made great points especially on how to read the ratio chart and determine the trade quality. I have to admit, that I neglected that in the past. I also had great results but these got reduced by some very view bad trades. After reviewing them I found out, that all had terrible looking ratio charts. As you said before, the ratio should not be trending and should not be found in a small range. Taking trades with a ratio that meets the points I just mentioned plus that resists atleast in the upper 3rd of its recent 150 days trading range seems to be optimal.

    What exactely do you mean with the ''Ratio Mean''? Is that the ratio MA for you? If not how do you determine that?

    Regarding the backtest results dollar wise I tend to disagree, Walt. Because the PTF takes all trades within the backtest period. Regardless of a trending, or not trending ratio, regardless of a correlation of 20%, or 90%. I had same great results with pairs that contained stocks that had major news, or other big events during the testing period. So I think you should take those numbers with a grain of salt. Besides the points being made of course I also would prefer a pair with good numbers rather than the ones with a low average return.

    Keep up the good work!
    saico
     
    #752     Mar 27, 2009
  3. I am incredibly thankful for this thread.

    I too have started trading on a small scale but so far have 37 trade (real money, small size) and so far so good. With no stops my average win/loss is 70/30. This compares to about 65/35 from what I can tell from Johnny's trades; although interestingly we almost never trade the same things. Unfortunately my win per trade vs loss per trade is worse (assuming i close out two old ones at a loss) where my losses are currently about 1:5 times larger than my wins, where Johnny's are in the range of 1:1 from what I can tell. Still profitable but either not lucky or not as good at Johnny at picking them ....

    Anyway a few comments. I have purchased pairtradefinder and I use it to review each trade before I make it. But I found it too unreliable to be my only/main source of data so far. I too have found missing/inconsistant data. If you click on the pair and right click on "refresh prices" before "analyse pair" it seems to help. So i click on "refresh prices" each time before going into "analyse pair."

    When I spoke with them they said it was because I had too many pairs (something like 1000 in there) and that I was overwhelming the system (essentially). I know that many of my pairs have shorter term low correlation so i could remove them but havn't had the time. So the other thing you can try is keep your pairs to 200 or so (which is what they suggest).

    I have also created my own versoin with similar settings in AmiBroker which is my main source for review and monitoring. It took a few workarounds since AmiBroker isn't really set up for it but it is much easier / reliable for me to scan given the data issues. But even with the workarounds it is a zillion times faster for me to look at and monitor my pairs. I typically scan for pairs then if I like one (I have similar charts created) I go into pairtrader and confirm the chart looks about right and i confirm the signal.

    So...to try to deal with the data issues (a) try to keep your active pair list low and (b) hit refresh prices on a pair before bringing that pair up. I think pairtradefinder is useful but still a bit rough around the edges.

    Hope that helps.

    Mike
     
    #753     Mar 27, 2009
  4. waltbx

    waltbx

    Ratio Mean is the mean average of the ratio, a Moving
    Average. 20 days.

    Backtest results in PTF do include all trades (but note that it calculates the profit using the LAST signal values, not the first. So if the layer 2 or layer 3 signals are more profitable, and they always will be, it uses last signal prices, where you may instead have entered on a layer 1 signal. So the result will be somewhat skewed toward more profit than you or I would achieve.) Anyway, yes the backtester takes ALL trades, regardless of correlation, trending, etc. I figure if the backtest can show a strong profit average when entering trades strickly by the numbers, I can better the profit average by discriminately choosing the cream of the choices. I can avoid pairs when they are trending, bad news for one of the two stocks, etc. That will make my profit average for that pair even better than the PTF profit average which is based on entering on ALL trade signals.

    I also open the spreadsheet data on a few of the better pairs and the lesser of the pairs I have selected to check on the individual trades over the last year. I sort by clicking the "Profit" column and check if the great profit average was due to just a few really good trades and if the rest were mediocre, or negative. I want pairs that yeild consistently good profits, trade after trade. That's my first step in choosing a profitable trade. I'm working with only the best pairs.

    Remember, if you don't pick good pairs to begin with, then later, when you have your humongus list of pairs showing enter signals, you won't know the ones with good history from the ones with a bad history. For me, it is essential to have a smaller list of cream of the crop pairs. Besides, PTF is far more efficient with a smaller list.

    Yes, I have also had some great results when news struck on one of the stocks. But that's been luck. I figure that if news strikes one of the two stocks or an earnings report comes out for one, I have a 50/50 chance it will be bad or good for for my trade. It will affect only one stock and that one stock will go up, or down as a result. Which stock? Which way will it go? I'm looking looking for stocks whose price ratios have diverged from their mean averages for no apparent reason. An "inefficiency" in the market has occured that the market will soon correct, and I want to take advantage of it. I'm not using "statistical arbitrage" (hedging) for taking 50/50 chances. So, when the PTF backtester takes trades on ALL signals, I'm not going to. I'll avoid the trades where near term news or earnings reports are known to me. And as a result I expect to have even better profit averages than the backtester. But I WILL use the backtester to pick the historically very best pairs based on profitability per trade over the last year.

    So, where trader A may choose a pair because it has great signals and great probability of profit, but he hasn't filtered his pairs, he may great success getting the average profit for that pair, but perhaps only $50 average. I'll put my same money in a pair that has demonstrated an average of $200 or better. Much greater percentage profit. (My trade amount in PTF is $2500 per side and the backtester uses that to calculate the average profit. If I set PTF for a trade amount of $10,000 per side, then the average profit per trade I would filter for would be $800.)

    Just my thoughts, how I work. We all do it differently. But these points are logical to me. But I'm a beginner with pair trades. So listen to me only if what I suggest seems reasonable.

    Walt B
     
    #754     Mar 27, 2009
  5. waltbx

    waltbx

    I'm also thankful. I've learned a lot here.

    In my experience, the refresh ability of PTF with the free data has problems. Sometimes I'll shut PTF down and reopen it to force a refresh.
    That being said, the software is amazing and has generated information that resulted in a large amount of profit for me in just a few days.
    Perhaps live data feed will solve the data problem I'm experiencing. I don't know how to get that data. But I could ask.

    Walt B
     
    #755     Mar 27, 2009
  6. saico

    saico

    Thanks Walt!

    Would you mind sharing how many sectors you currently have in your PTF and the number of pairs per sector?

    saico
     
    #756     Mar 27, 2009
  7. Hi Walt,

    Thanks for sharing your experiences. Impressive start.

    It's funny, but when I first started I had broad sectors and ran correlation and the pairs worked great. Now that I have switched to industry specific they don't seem to work as well.

    Also, I didn't use the high average profit as a filter based on what PT Finder said, but I am rethinking it after what you said and knowing Jonny did the same.

    Finally, I had two pairs today that I closed out at no profit. I checked them and the level was zero, i.e., they no longer met the standard deviation requirement. However, they never gave an exit signal. After I closed them it dawned on me that I shouldn't have closed them. That's the first time that has happened to me. Every other time they have gone directly to an exit flag. I guess I learned something today if I considered this correctly.
     
    #757     Mar 27, 2009
  8. waltbx

    waltbx

    I haven't counted my pairs before and did today. I have about 250 pairs, about 550 stocks, and about 36 sectors if I ignore the sectors with only 2 or 3 stocks. The number of pairs per sector varies from 1 or 2 to 40 pairs in Asset Management, which is a new sector I'm exploring. Each pair has a good profit history, others I ignore.

    Walt B
     
    #758     Mar 27, 2009
  9. I have been monitoring this thread lightly, I was curious if anyone has begun trading pairs on an intraday basis. My testing has shown that this is not profitable but I freely admit that the testing was not done rigorously enough to draw any conclusions. Look forward to hearing some responses.
     
    #759     Mar 27, 2009
  10. walt, great to see your've done your work, studied my trades, taken it a step further and thought outside the box, all the qualities of a great trader. you've made a few good points that have made me think.
    with regards to a pair backtesting well, its a valid argument you present and I agree with, however remember to make sure with a backtest the pair didn't generate the majority of its profit from one trade, rather even dispersed across all trades. i like you point with measureing the % difference between ratio and avg ratio, a step further would be to divide this number by the pair volatility, for eg a 5% divergence on a pair with volatility of 2% is more significant of pair with a 8% divergence with volatility of 5%, so divergence % relative to volatility %. maybe we can mention to them to incorporate this reading into the console. I don't use the RSI too much anymore, I like a strong divergence, Ive actually been using the spread chart more, like to see it a 50day highs/lows and fade that direction if the signal coincides. glad ive been of help to you and thanks for sharing your method.
     
    #760     Mar 28, 2009