SH's 315 Strategy - how to use if effectively

rkkarnani

Well-Known Member
I had written to NSE seeking Beta values of equities and this is the response I received. Trust may be of some use to people seeking Beta values.

Beta values are not published on website.

Formula for calculating Beta can be sought from the link given below:
http://www.nseindia.com/products/content/equities/indices/beta.htm

Kindly refer following links for retrieving necessary data for Beta calculation:

Composition of S&P CNX 500: http://www.nseindia.com/products/content/equities/indices/s_n_p_cnx_500.htm
Close values of Scrips: http://www.nseindia.com/products/content/equities/equities/eq_security.htm
S&P CNX Nifty values (Independent Variable) :http://www.nseindia.com/products/content/equities/indices/historical_index_data.htm

In case of any further query, feel free to revert.

Thanks & Regards,
C.Kukreja
India Index Services & Products Ltd.
Tel: (D) +91-22-26598386
(B) +91-22-2659 8100-14, Ext.: 2030
<[email protected]>
 
GMR Infra even though is a high beta stock, it doesn't stay in a trend for long periods. It shoots up quickly during intraday and finishes its journey almost within a week. Same when it crashes.

Backtest result will show you that you made only Rs.3 in the whole year. Whereas trading it on hourly timeframe gave a profit of Rs.1.3 in the last two weeks only! Haven't done backtest due to lack of hourly data.
 

VJAY

Well-Known Member
GMR Infra even though is a high beta stock, it doesn't stay in a trend for long periods. It shoots up quickly during intraday and finishes its journey almost within a week. Same when it crashes.

Backtest result will show you that you made only Rs.3 in the whole year. Whereas trading it on hourly timeframe gave a profit of Rs.1.3 in the last two weeks only! Haven't done backtest due to lack of hourly data.
If we waited for predefined entry then in 3 days we made rs.3 :)
I tracking GMR since last 1 month putting order every day.for buy ..@ 16.90 :)
 
If we waited for predefined entry then in 3 days we made rs.3 :)
I tracking GMR since last 1 month putting order every day.for buy ..@ 16.90 :)
But is that using 315?
 
I am still trying to learn to code. However, I would like to backtest this strategy in different timeframes and on different scrips and learn more about it.

Has someone posted an AFL of this strategy that can be used for this purpose? If not, can someone please post the same?
How can we do automatic backtest?
 
How can we do automatic backtest?
Open Analysis-->Automatic Analysis.

1. Pick the AFL (you should have stored the formula in a .afl file)
2. Do for the current symbol (otherwise it will run very slow for all the symbols)
3. You can modify the timeframe as you want.
4. Change the setting for both Long and Short (see the image)
5. If you want detailed report, select "Generate detailed report for each symbol in individual backtest" (see the image). this will provide detailed report which will help you to understand every trade.

One issue on this is. The back test assume you go long when bullish crossover happens and you cover the position when bearish crossover happens. You can modify your AFL to add some stop loss so that it will give accurate picture.

I have report for NIFTY backtested from 2003. If you want I can send that. But still it will not give correct picture as I have not added the stop loss.

I am working on include Elder SafeZone SL in this AFL and backtest. I am not able to achieve it (my programming knowledge sucks :mad:). If I get through will let you know.



 
Can anybody post the latest AFL or atleast provide thread number.There are 578 pages and it would be a tedious job to search in all the pages.
Below are the main 3 AFL

_SECTION_BEGIN("315 Basic Cross");

Len01 = Optimize("Len01", Param("Len01", 3, 2, 15, 1), 2, 15, 1);
Len02 = Optimize("Len02", Param("Len02", 15, 10, 100, 1), 10, 100, 1);

ema03 = EMA(C, Len01);
ema15 = EMA(C, Len02);

color03 = IIf(ema03 > Ref(ema03, -1), colorDarkGreen, colorDarkRed);
color15 = IIf(ema15 > Ref(ema15,-1), colorBlue, colorRed);

Plot(ema03, "", color03, styleThick);
Plot(ema15, "", color15, styleThick);

Buy = Cross(ema03, ema15);
Sell = Cross(ema15, ema03);

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

Short = Sell;
Cover = Buy;

SetPositionSize(1,4);

PlotShapes(Buy * shapeUpArrow, colorBlue, 0, L);
PlotShapes(Sell * shapeDownArrow, colorRed, 0, H);

_SECTION_END();


_SECTION_BEGIN("EMA Reversal");
// Book everything when ema3 going in the opposite direction of the position for 2 days

FlagUP04 = ema03 < ema15 AND ema03 > Ref(ema03,-1) AND Ref(ema03,-1) > Ref(ema03,-2);
FlagDN04 = ema03 > ema15 AND ema03 < Ref(ema03,-1) AND Ref(ema03,-1) < Ref(ema03,-2);

PlotShapes(FlagUP04 * shapeSmallUpTriangle, colorDarkGreen, 0, L);
PlotShapes(FlagDN04 * shapeSmallDownTriangle, colorOrange, 0, H);

_SECTION_END();


_SECTION_BEGIN("eXTREME RUNs");

//Can Book Profit when Last Candle Not toucing EMA3
FlagUP01 = ema03 > ema15 AND ema03 < L; //Buy Mode Ruaway Profit Part Booking
FlagDN01 = ema03 < ema15 AND ema03 > H; //Short Mode Ruaway Profit Part Booking

PlotShapes(FlagUP01 * shapeHollowCircle, colorBlue, 0, H, 5);
PlotShapes(FlagDN01 * shapeHollowCircle, colorRed, 0, L,-5);

//Take a Contra Position when 2 Full Candles Not toucing EMA3
FlagUP02 = ema03 > ema15 AND ema03 < L AND Ref(ema03,-1) < Ref(L,-1); //Buy Mode Ruaway Contra Entry
FlagDN02 = ema03 < ema15 AND ema03 > H AND Ref(ema03,-1) > Ref(H,-1); //Short Mode Ruaway Contra Entry

PlotShapes(FlagUP02 * shapeHollowDownArrow, colorDarkYellow, 0, H,-20);
PlotShapes(FlagDN02 * shapeHollowUpArrow, colorDarkYellow, 0, L,-20);

_SECTION_END();
 

Similar threads