Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

Buy at Today’s Close and Sell at Next day Open – Do Simple Trading Strategies Really Work? [Part2]

2 min read

Do simple Trading strategies really work in Indian Markets? This curiosity in me raised again, after looking into a simple backtest buy at today’s close and sell at next day open which produced phenomenal returns of whopping 568% since 1993 in SPDR S&P 500 ETF (US Market). How about doing similar BTST strategy in Nifty Futures?

But in order to do trading (Buy & sell transaction in the regulated exchanges), trader also involved in paying to the Exchange(Turnover Fees), SEBI(Regulatory Fee) , Govt(STT, Stamp Duty,GST,incomes tax if any), Broker (Brokerage) and to the market (Slippages). If you are a frequent trader possibly you could know that it is really tough to Buy exactly at market close and sell exactly at market open. Due to quick movement in market price, one has to buy or sell at a higher price than the anticipated price at market open or market close. Call it as market slippages or market volatility.

One way to perfect the simple BTST (Buy today sell tommorow) to a near real-time trading rule is converting the trading strategy to Buy Nifty Futures (Go Long) exactly at 3:15 p.m i.e very close to market square off time and Sell (Exit Long) Exactly at Next Day 9.30a.m to avoid market volatility at market open we sell 15min from the market open.

Backtesting Settings

Symbol Nifty Futures
Timeframe 1 min
Trade Execution MKT order
Dataset Length Jan 2011 – Jun 2018
Trading Commissions + Slippages 0.00%
Initial Capital 1,00,000
Position Sizing 1 lot or 75 shares per trade (Fixed shares)
Holding Period Overnight BTST Strategy

What one could get is a stunning & superior result just by playing this simple rule. Returns are a whopping 595% returns since 2011 on a 1 lakh capital and betting one lot of Nifty Futures every time.

Equity Curve of 595% returns (Zero Transactional Cost Involved) on 1 Lakh Capital

Backtesting Results when No/Zero trading cost involved

So where is the catch? The real catch is there in transactional cost. Since the trading rule makes a trade every day, transactional cost plays a major rule in deciding the fate of the trading system in long term. So I now tried with 0.02% of the transactional cost (Exchange(Turnover Fees), SEBI(Regulatory Fee) , Govt(STT, Stamp Duty, GST, incometax if any), Broker (Brokerage) and to the market (Slippages)).

Backtest with 0.02% transactional cost

Surpringly, the system lost 67% of initial capital (1 Lakh) within 185 trades and there is no enough margin to take the next trade. So in order to place right position size, I increased the initial capital to 2 Lakhs this time. The system survived the worst drawdown period and able to make an absolute return of 94.65% over a period of Jan 2011 – July 2018. In compounded terms, Annual returns (CAGR) comes around 9.3%

Equity Curve with 2 Lakhs Initial Capital and 0.02% trading cost

Equity Curve with 2 Lakhs Initial Capital and 0.02% trading cost

Amibroker AFL – Buy Nifty Futures (Go Long) exactly at 3:15p.m and Sell (Exit Long) Exactly at Next Day 9.30a.m.
https://gist.github.com/d391fdc282d560a73126b827b07b4ddc

Conclusion

Undoubtedly, most of the market performance comes by holding positions overnight. However one cannot capitalize the entire performance returns majorly due to higher number of trades involved and transactional cost. The key learning is just dont carried away with some viral backtest report circulated in social media groups. Try to get into deeper insights to understand the nuances and the risky nature involved.

Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

[Live Coding Webinar] Build Your First Trading Bridge for…

In this course, you will be learning to build your own trading bridge using Python. This 60-minute session is perfect for traders, Python enthusiasts,...
Rajandran R
1 min read

[Webinar] Understanding and Mitigating Curve Fitting in System Trading

"Understanding and Mitigating Curve Fitting in System Trading"! This dynamic session aims to equip novice to intermediate traders, quantitative analysts, and financial engineers with...
Rajandran R
1 min read

P-Signal Strategy Long Only Strategy – Amibroker AFL Code

This tutorial provides an overview of the P-Signal reversal strategy, a quantitative trading strategy that utilizes statistical parameters and error functions to generate probabilistic...
Rajandran R
2 min read

4 Replies to “Buy at Today’s Close and Sell at Next day…”

  1. That is a great insight and would save many a shirts. Can someone please tell me where can I find historical 30 min ieod data for futures in CSV format. I need for last 10-12 years.

  2. Hi Rajandran,

    Can you share the results for this:
    if we short nifty when market opens and square it off at market closing.

  3. i plot psar in amibroker and tradetiger but psar value is different in amibroker and tradetiger.what is the problem i canot understand plz help me

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More