How to analyze the stocks for Pair Trading:
Core Idea: Stocks in the pair move together but one of them will move more than the other in the same direction.
Activities to be done at end of day to find the stock pairs:
1. Update the stockdata.csv sheet with the closing values for each of the stocks that you want to track. This data can be downloaded from NSE site or from your regular data source. Ensure the data is cleaned for bonus & splits.
2. Identify the stock pairs that you are interested in based on your fundamental judgement..for example stocks from the same industry.
3. Find the co-integration pvalue for the stock pair. Note co-integration pvalue for stocks S1,S2 is not same as S2,S1. Hence you may want to check both the combination. A pValue of less than 0.05 is consider significant. Lower the better.
4. Once you find the stock pair S1,S2 which are significant, check what is their zScore, The first stock S1 is considered as Y stock & S2 is considered as X stock. If the zScore value is +ve, then the stock Y is considered as overvalued and higher probability of it to move down and if zScore value is -ve, the the stock Y is considered undervalued and has higher probability to move up in coming days. The further the zScore value from 0, the better.
5. If the zScore is as per our expectation, we need to identify the quantity of the stocks to trade. Since we want to keep the percentage of price movement same for both the stocks, we need to fix the rupee value for both the stocks same. For example if stock S1 closing price is 100, and our fix rupee value is 25000 for each stock then we can trade 25000/100 = 250 quantities of stock S1.
Summary at the end of day:
1. We have identified the 2 stocks S1,S2 for next day pair trading.
2. We have identified the direction for S1 & S2 to bet on.i.e which one to short and which one to long.
3. We have identified the quantities of each stocks that we will be trading.
In the next posts I will explain the 3 Pair trades that I executed on 24th July and the reasoning behind the trades.
Core Idea: Stocks in the pair move together but one of them will move more than the other in the same direction.
Activities to be done at end of day to find the stock pairs:
1. Update the stockdata.csv sheet with the closing values for each of the stocks that you want to track. This data can be downloaded from NSE site or from your regular data source. Ensure the data is cleaned for bonus & splits.
2. Identify the stock pairs that you are interested in based on your fundamental judgement..for example stocks from the same industry.
3. Find the co-integration pvalue for the stock pair. Note co-integration pvalue for stocks S1,S2 is not same as S2,S1. Hence you may want to check both the combination. A pValue of less than 0.05 is consider significant. Lower the better.
4. Once you find the stock pair S1,S2 which are significant, check what is their zScore, The first stock S1 is considered as Y stock & S2 is considered as X stock. If the zScore value is +ve, then the stock Y is considered as overvalued and higher probability of it to move down and if zScore value is -ve, the the stock Y is considered undervalued and has higher probability to move up in coming days. The further the zScore value from 0, the better.
5. If the zScore is as per our expectation, we need to identify the quantity of the stocks to trade. Since we want to keep the percentage of price movement same for both the stocks, we need to fix the rupee value for both the stocks same. For example if stock S1 closing price is 100, and our fix rupee value is 25000 for each stock then we can trade 25000/100 = 250 quantities of stock S1.
Summary at the end of day:
1. We have identified the 2 stocks S1,S2 for next day pair trading.
2. We have identified the direction for S1 & S2 to bet on.i.e which one to short and which one to long.
3. We have identified the quantities of each stocks that we will be trading.
In the next posts I will explain the 3 Pair trades that I executed on 24th July and the reasoning behind the trades.