Pair Trading - Exploring The Low Risk Statistical Arbitrage Trading Concepts

ncube

Well-Known Member
View attachment 28001

Dear ncube,
Its possible trades of today ....exits @ 3.15 pm....Looks big loss in RELINFRA...please give your thoughts ...
@VJAY, yes these kind of scenarios are common when applying the 30min break-out strategy on pairs. If both the trades are executed then it is a difficult situation and the best option is to close the trades at some point during the day when the loss is minimum. We make profit when only 1 trade is executed and that moves in our direction. I had explained the rules that I follow in my earlier post please check it again:

30 min candle breakout Strategy details:
You guys would already be having some strategies to day trade, you can use the same to place your trades, however you do not keep stop loss orders, instead you will place the opposite order on the second stock. Day trading is a skill, and there are multiple ways to execute your strategy, however I use these simple rules which I had explained in general chat thread:

Reasoning on why it will work:
1. If the stocks trend in our identified direction (usually the pair will move in same direction) only 1 of these trades will be triggered and will go into profit.
2. If the stocks trend is opposite to our identified direction both trades will not be triggered and no trade for us. (The price diversion will increase by end of day..so higher chances they will mean revert in subsequent days)
3. If the stocks trend in our identified direction and later change direction after the 1st trade was executed then the 1st trade will start going into loss, however the 2nd pair trade will get triggered and the position is now hedged. Usually in these cases by end of the day trend reverses (due to mean reversion force) giving small profit else during the course of the day they will come to a point where it can be close for break-even or small loss.
Trading Rules:
@VJAY,
1.When we enter trade using 30 min bar after trigger are we need to put SL @ abv/blw 30 bar?
>> If our trade goes through as per our analysis, only one of the trades is executed first and both stocks should move in the same direction. This give us a hint on the direction for the day. However if both are not moving in same direction and see that the trend is exhausted and reversing (Based on the price action of subsequent candles) I will wait to see if price pull back more than 50% of the 1st 30 min bar in opposite direction. This means there is some change in sentiment, hence higher chances that the price move will be stong in the reverse direction. In this case I will place a SL reverse order (Double the quantity of the stock traded) at the low of the 1st 30 min candle. You can refer to my ALBK-ANDHRABANK trade example that I shared in earlier post.
2.So if 30 bar is big one and we expect move in our side we wait for next 15 bar and trade as per that bar ...here we use triggeres in 15 bar for both scrips?
>> If the 30 min bar is nearer to the average daily movement of the stock, then I will skip trading it as there is no point trading it as risk-reward ratio will be small. However I sometimes do try to observe if the trend has exhausted. For example say both the stocks have moved up more than 3% in the 1st bar, then I will focus on the stock to be shorted on the 15 min candle. You can refer my TATAMTRDRV-TATAMOTORS trade shared earlier.
3.If 30 bar close near lows/highs(big bar) we not jump into trade wait for 15 min bar.
>> If the close is very near to the low of the 1st 30 min bar then, I will wait for a small pullback and then place the SL trade order. Else there is high chance that after hitting our SL the trend is reversed. I dont chase the price, I want it to come to me at the price that I choose and not the other way around.
4.Please explain with example for bolded risk part...how can we calculate risk?
>> Lets say the 1st 30 min candles of both the stocks are 3% long, then we will be placing a buy order at the top of the 1st stock and a sell order at the bottom of the other stock. In this case the risk is 3% as once the first trade is executed and the price reverses then by the time the 2nd stock sell order is executed we would lose 3% in the 1st stock.
Day trading requires regular monitoring of the trades, hence I dont usually prefer it. Also one should have good experience in price action analysis, hence I had suggested that one need to use the pair trading concepts on the strategies one is comfortable with.

In my earlier post I had given an alternative strategy which is quick and more systematic as it does not require discretionary actions and since you are good in pivot based analysis you may find it interesting. Please check:

Bracket order strategy in the prominent Pair direction:

@VJAY,

Another method which works for day trading and you guys can explore:

In pair trading Y stock direction is the prominent direction in which the stocks would most likely move, hence one can use the Bracket Order (BO) to make quick profits as follows:

Direction to trade: Y-Stock Direction as per pair analysis
Trading rules: Use 1min candle pivot breakout or 15min candle breakout for both stocks in the same direction as Y-stock
Profit & SL target: About 0.03% of the stock price.

For example: If the Zscore is -2.5, which means as per our pair analysis the Y stock need to be bought and X to be sold. But in this we will not short X, rather we will buy as we want to trade in the prominent direction of Y and it will be a quick short term trade.
Say Y stock price = 300 & X Stock price = 500
Now wait for the 1st 1 min candle pivot or 1st 15 min candle to be formed.
Place SL Buy BO at the top of the pivot or 15 min candles for both the stocks with SL & Profit target which is equal to 0.03% of the stock prices. i.e Ystock = 300 * 0.03 = 0.90 paise & Xstock = 500*0.03 = 1.5 rs.
 
Last edited:

ncube

Well-Known Member
View attachment 28001

Dear ncube,
Its possible trades of today ....exits @ 3.15 pm....Looks big loss in RELINFRA...please give your thoughts ...
@VJAY, As we use EOD price to calculate the zScore, there is low probability that the pairs will mean revert intraday, It usually takes few days for it to mean revert completely. hence if both trades are executed do not wait till eod hoping for the pairs to mean revert, you need to try and close the trades during the day when the loss is minimum. For intraday Pair trading logic is used only to find the most probable directions for the stocks to move and try to use this information to our advantage, it just give a statistical edge and improve our strategy performance. Hope its clear.
 

VJAY

Well-Known Member
Dear ncube,
Thanks for always helping out us here .....
reason for loss trade in RELCAPITAL=RELINFRA ..mainly due to its zscore i think...its not reversing to mean its traveleed again today zscore is -2.218 :(
 

VJAY

Well-Known Member
RELCAPITAL-RELINFRA
pVAlue:0.00114
Zscore: (-2.218)

BANKINDIA-UNIONBANK
pVAlue:0.000634
Zscore: (-2.064)
 

VJAY

Well-Known Member
AXISBANK-ICICIBANK
pVAlue:0.0136
Zscore: 2.006

HDFC-HDFCBANK
pVAlue:0.0132
Zscore: 2.136
 
HCLTech-TCS / p-value: 0.0318 / z-score: 2.175

Unionbank-PNB / p-value: 0.0247 / z-score: -2.116
 

VJAY

Well-Known Member
HCLTech-TCS / p-value: 0.0318 / z-score: 2.175

Unionbank-PNB / p-value: 0.0247 / z-score: -2.116
Thanks Vevensa
RELCAPITAL-RELINFRA
pVAlue:0.00208
Zscore: (-2.577)
 
Last edited:

VJAY

Well-Known Member
Dear ncube,
is there code for filter pair combinations from my sheet which havine p value of 0.05/below ?
 

VJAY

Well-Known Member
Syndibank-andhrabank / p-value: 0.000355 / z-score: 2.019)

HCLTech-TCS / p-value: 0.0191 / z-score: (-2.248)

Unionbank-PNB / p-value: 0.0201 / z-score: (-2.007)

andhrabank-bankbaroda/ p-value: 0.000881 / z-score: (-2.6)