Page 1 of 3

MY Spread Thread.

Unread postPosted: Fri May 18, 2018 9:17 pm
by varun
Hello everyone.

Here i will try to explain the spread trades and all the nuances behind it as promised to my good friend Kumudhan ji.

This is just my attempt to unravel the mystery and immense profits one can generate in spread trades with minimum risk using charts.

What is a Spread ?

A spread is the difference in price between 2 underlyings. These 2 can be just anything as long as they have a continuous data of price attached to it.

How does one profit from spread trading ?

Let us keep it simple. Of the 2 underlying buy the one which is showing strength and at the same time sell the other one which is showing weakness. That is all there is to it.

What spreads to trade ?

One can trade any spread irrespective of co-relation technically but one normally trades co-related spreads. Like from the same industry (something like HDFCBANK and State Bank of India) or Indices from the same markets (Like say Bank Nifty and Nifty or say Metal Index and IT index or any other 2 indices.)

For trading the spreads i have an AFL which just asks for the Factor to draw a spread line.

First determine which 2 underlying you want to trade in a spread.
Then to arrive at the factor, just divide the more expensive of the 2 with the other one to arrive at an estimated Factor. Just Round it off to the next higher number (You do not need to be exact.)

For example HDFC Bank is at 2000 and sbin is at around 250. When you divide 2000 by 250 you get a value of 8. So your factor is 8. What it really means is that 1 share of HDFCBANK is worth approx 8 shares of SBI. SO whatever trade you do would be in the ratio od 1:8. Meaning if the system is telling to go long in HDFCBANK and short sbi then for every 1 share of HDFC long you would ve required to short 8 shares of SBI. Example 25:200,50:400,100:800 .... and so on.

In short the net value of both the long and the short should be approximately equal.

In arriving at a factor for indices, we need to calculate the value of 1 lot as we cannot trade 1 share. In this the net value of both the indices should be the same approx.

So if Nifty is at 10500 and has a lot size of 75 then the whole lots value would be 75*10500= 787500

ANd if BN is at 26000 and has a lot size of 40 then the whole lots value would be 40*26000 = 1040000.

so if we divide 1040000 by 787500 then we get a value of 1.32 or say 1.33. This gives a ratio of 3:4 ideally . That is 3 lots of BN against 4 lots of Nifty.

I hope it is clear till now.

Re: MY Spread Thread.

Unread postPosted: Fri May 18, 2018 9:26 pm
by kumudhan
thank you ji...and how to use the spread afl you posted for entry,sl and exit or reversal please....if you can pl post some charts here too....

Re: MY Spread Thread.

Unread postPosted: Fri May 18, 2018 9:36 pm
by varun
_SECTION_BEGIN("Spread");


_N( Symbol2= ParamStr("Symbol2", "MSFT") );
Mode = ParamToggle("Mode", "Difference (Symbol1-Symbol2)|Ratio (Symbol1/Symbol2)");

SetForeign( Symbol2 );
C2 = C;
H2 = H;
L2 = L;
O2 = O;
V2 = V;
RestorePriceArrays();
f = Param("Factor",2,0,500,0.01);
Color = ParamColor( "Color", colorDefault );
Style = ParamStyle( "Style", styleLine|styleThick, maskPrice );
O = O - (f*o2);
H = H - (f*H2);
L = L - (f*L2);
C = C -(f*C2);

PlotOHLC( O, H, L, C, "(" + Name()+" - "+Symbol2 + ") spread", Color, style );

ec36 =Wilders(C,36);
ec200 = Wilders(C,200);
mcolor = IIf((ec36 < C), IIf(ROC(ec36,36)>0,colorBrightGreen,19),IIf(ROC(ec36,36)<0,colorRed,13));
mcolor2 = IIf((ec200< C), IIf(ROC(ec200,200)>0,colorBrightGreen,19),IIf(ROC(ec200,200)<0,colorRed,13));


Plot(ec36,"\n WildersEMAc36",mcolor,styleThick);
Plot(ec200,"\n WildersEMAc200",mcolor2,styleThick);

_SECTION_END();

Re: MY Spread Thread.

Unread postPosted: Fri May 18, 2018 9:51 pm
by varun
Let us try a new spread say Tatasteel and VEDL. Now both data should be there with you.

When you plot this AFL it will ask you the parameters as the defaults are Symbol2 as MSFT and factor at 2. http://prntscr.com/jjlo2b

To arrive at the factor as told earlier you divide the price of Tatasteel with that of VEDL. so about 590 by 270 = 2.18 so for simplicity we round it off and come up with a factor of 2.

Now you just key in symbol2 as "VEDL" and in factor "2" (which is already the default) http://prntscr.com/jjlquw

We would get a chart like this. http://prntscr.com/jjlrap

Re: MY Spread Thread.

Unread postPosted: Fri May 18, 2018 11:10 pm
by kumudhan
in BNF/NIFTY spread what should we input in FACTORS ji as we are trading 3 bnf and 4 nifty?

Re: MY Spread Thread.

Unread postPosted: Fri May 18, 2018 11:15 pm
by varun
Kumudhan ji that is ideal as of now. But i am trading in the ratio 2:3. 2BN : 3 Nifty.

Re: MY Spread Thread.

Unread postPosted: Fri May 18, 2018 11:16 pm
by varun
input 1.5 in factor

Re: MY Spread Thread.

Unread postPosted: Fri May 18, 2018 11:18 pm
by kumudhan
how this 1.5 you arrive in factorji pl...

Re: MY Spread Thread.

Unread postPosted: Fri May 18, 2018 11:27 pm
by varun
Refer 1st post. The ratio was coming as 1.33 so rounded it off to 1.5.

Re: MY Spread Thread.

Unread postPosted: Sat May 19, 2018 10:14 am
by Deepak00
Varun Sir, Thanks for this valuable post and afl..