Pair Trading - Exploring The Low Risk Statistical Arbitrage Trading Concepts

ncube

Well-Known Member
#83
Ok now i think its okey ...is this pvalue is same with yours?
View attachment 26989


Why here your last check point 11 hours ago showung?

View attachment 26990
Yes, should be ok looks like you have updated the new closing prices for the stocks.

That checkpoint time is in your jupyter notebook, jupyter will periodically save the file as checkpoints, maybe the last checkpoint in you system was abt 11 hrs back.
 

20.sum1

Active Member
#84
import statsmodels.api as sm
sm.version.version

gives
'0.9.0'

On making suggested changes I think I am getting correct values. My stock csv is not updated hence I think not matching VJAY's values but matches cloudtrader's values
 

VJAY

Well-Known Member
#86
Dear ncube.
In your experience for intraday use 30 min high/low is good.How if use 15 minuets?you found anything like whips if used 15 ?
 

VJAY

Well-Known Member
#87
Dear ncube,

Tryed a trade today ...totally gone opposit ...abv 1k loss ...Y scrip triggered trade and turned too fast ...when allready above 1k loss X trade triggered ...though momentum is fast and dif also big in Y scrip ...so loss increasing fast ..even after X trade triggered ....Any tips/thought process in this scenerio....? other trade iin HDFC-ICICIBANK not triggered?in this if not triggered you keep this order in pending?when you cancell those pending orders?

Untitled.png
 
Last edited:

ncube

Well-Known Member
#88
Dear ncube,

Tryed a trade today ...totally gone opposit ...abv 1k loss ...Y scrip triggered trade and turned too fast ...when allready above 1k loss X trade triggered ...though momentum is fast and dif also big in Y scrip ...so loss increasing fast ..even after X trade triggered ....Any tips/thought process in this scenerio....? other trade iin HDFC-ICICIBANK not triggered?in this if not triggered you keep this order in pending?when you cancell those pending orders?

View attachment 26994
@VJAY , have you already started trading the pairs or is it just paper trade? I suggest for few days you just observe the pairs and do paper trading to get a feel of it. Its not a good practice to risk money on new strategies until you get some experience observing & journaling it.

Coming to the pairs ALBK-ANDHRABANK, as per the zScore, we need to look for shorting ANDHRABANK & Long ALBK. I checked the 30 min chart and see that the 1st 30 min candle is quite large for both the stocks, so one should take care while trading these as already the stocks have moved 3%, either aviod trading it or go to 15 min candle and trade the next candle.

Looks like for ANDHRABANK you traded it early, when the candle close is near the low, it is not good to places trade at low as there is high chance it will hit your SL. Day trading is all about you controling your trades not allowing market to dictate. Your thought process should be I will place the trade at a point where I think it will not be hit. If it hits then it should continue in the same direction taking my trade into profit. Remember you should never force a trade as you cannot force market to move as per your wish.

Following points to be noted:
1. If the 1st 30 min candle is larger avoid trading it unless you are sure of the direction. If the trade has already moved more than 3% there is less chance that it will give more profit.
2. Another risk of large candles is the hegde on the second candle will also kick start late, so your risk also increases accordingly, i.e the diffence between the 2 stock trades will be your risk. In this current case your risk will be about 3-4%, which on a capital of 25K will be around 750-1000. Ideally try to keep risk below 500.

But one good point is that your risk is limited and it will hover around 1000, however during the course of the day it may come down and you can try to close it at lesser loss.
 

ncube

Well-Known Member
#89
Dear ncube.
In your experience for intraday use 30 min high/low is good.How if use 15 minuets?you found anything like whips if used 15 ?
Yes, based on my experience I have observed that usually the 1st 30 min candle sets the direction for the day and if the price reverts and moves in opposite direction then there is some change in sentiment and the move tend to continue. I go to 15 min chart only in exceptional cases when the 1st 30 candle is large and I am confident the trend will continue in my direction.
 

ncube

Well-Known Member
#90
@ncube ,

Is it not possible to employ this whole process in Amibroker ?
I am not familiar with the functionalities of Ambibroker, I have shared the logic of how one can trade pairs on intraday basis in this thread, maybe someone with expertise in Ambibroker can analyze it further. The key point for pair trading is that the pairs should be co-integrating, so Ambibroker scripts should be able to somehow develop it within its functions or should use some external function to get it done.
 
Last edited: