Module 10 Trading Systems

Chapter 1

What to expect?

106

What is a trading system?

Such a glorious day to start this module! Here is the headline that rocked the stock markets today –

Yesterday i.e 24th Oct 2017, the Finance Minister announced that the Government would infuse Rs.210,000 Crore into the Public Sector banking system, which is basically an effort to save the PSU banks from the deteriorating NPAs (Non-performing assets).

How did PSU Banks react to this announcement? After all, this is a lease of life to the PSUs. Well, they were jubilant, as expected –

As you can see, the PSU Bank index shot up 27.75% at opening.

Some of the PUS stock options were on steroids, here is the hero of the day –

Punjab National Bank’s 160 Call option expiring on 26th Oct 2017, shot up 20,600% overnight! If you had bought 1Lac worth of option on 24th Oct, it would have translated to 2.02 Cr on 25th Oct morning.  So clearly, there is a lot of action in the market today.

Earlier in the day, my colleague and I were looking at the way markets were behaving and trying spot an opportunity, and here is something that looked interesting –

Bank Nifty Index too joined the party, with the index going up nearly 3% (look at the image of the sectoral indices above). However, a 3% move on Bank Nifty was quite questionable considering the fact that PSU banks contribute just around 10% to the Bank Nifty index, look at the index constituents and its weights below –

Considering this, my colleague and I decided to write a short strangle on Bank Nifty and collect a premium of close 253 points per lot, obviously hoping that the volatility would die and premiums would reduce.

I don’t want to debate about the reasoning of this trade – whether it’s going to make money or not is not really the concern, although I hope it does ☺

However, I want you to think about the thought process behind this trade.  The trade idea originated through what I consider as ‘systematic deduction’.  To make such systematic deduction and find opportunities, you need to question what is happening in the market and sometimes be willing to take contrarian positions, which is exactly what we did.

‘Systematic deduction’ is one of the most popular methods market participants adapt to trade the market. However, not all systematic deductions are right, you could, of course, succumb to biases and make systematic errors while making these deductions. Nevertheless, systematic deduction is one of the other popular techniques to trade. Other popular trading techniques being –

  • Trade because your gut says so
  • Trade because my friend says so
  • Trade because the guy on TV says so
  • Trade because my broker says so

None of the above mentioned ‘approach’ to trade the market, including the ‘systematic deduction’ can really be defined as a process. These are ad-hoc methods, which cannot really be quantified or backtested.

Any approach to trade where you cannot really define ‘the approach’ as a process is not considered as a trading system.

On the contrary, if you can define the approach and can quantify the process to trade the market, then you are essentially talking about a ‘Trading System’, which is exactly the focus of this module.

1.2 – Trading system – the Holy Grail?

The moment you talk about a trading system, people generally tend to think of these systems as a sure shot technique to make money, or in other words, they approach these systems as a money-making machine. They expect profits to roll from the first trade itself. Unfortunately, it does not really work that way.

Remember, a trading system receives a bunch of inputs from your end, performs a set of task, and gives you an output. Based on the output, you then decide (or the system itself decides) if this is a trade worth taking or not.

Here is how you can visualize this –

If you realize, for the trading system –

  1. You give the system the inputs
  2. You design the system
  3. You decide to trade or not to

So the onus of making money really depends on you. The advantage of a trading system, however, is that – you only have to decide the logic once and then just follow the system that you’ve designed.

Of course, as you may have sensed, I’ve dumbed down the journey of a trading system to a large extent, and this is just to give you a perspective at this stage.

1.3 – What to expect from this module?

The trading systems that we will discuss in this module will be complete, in the sense, it will have –

  1. The logic, which is the core of the trading system
  2. Input parameters
  3. Interpreting the output
  4. The decision to trade or not

At this point, I’ve planned to write about the following 4 trading systems –

  1. Pair trading
  2. Volatility based Delta hedging
  3. Calendar spreads
  4. Momentum strategy (Portfolio approach)

There two techniques to pair trade – a simple approach based on correlations and a slightly complex approach using statistical concepts – both of which we will explore.  Of course, as we proceed, I may try and add other trading systems as well.

However, this module will not include the ‘backtest’ bit. The onus is on you to backtest the system and figure out if the system works for you or not. You will have to take the rules of the system and figure out how many times in the past it has worked and if it has worked, what kind of profitability pattern the system is showcased.

Remember, no trading system is complete without having the backtesting results. The only reason why I’m not including the backtesting part is that I lack programming skills. Some of these systems can be efficiently backtested if you can manage to write a piece of code. When these systems were developed, I was fortunate enough to have a fellow trader with programming skills, hence I was in a position to get greater insights into these systems. I must also tell you that these were fairly competent systems to trade – and I presume they still are.

Of course, the market conditions have changed, hence a fresh set of backtesting is justified.

However, the broader objective of this module is to showcase different systems and give you insights into how systems are developed. Hopefully, this will inspire you to develop your own system and perhaps works out to be your own money making machine!

With this hope let us proceed – onwards to Pair trading!

PS: The short strangle on Bank Nifty worked out quite well

106 comments

  1. Sashidhar. L says:

    Very much excited to see the much awaited module live.I just have one question. I know you have already said that you do not trade naked options, but why not take a bull call spread or some other aggressive bullish trade on some top PSU bank’s options, as it would give you maximum benefit or am I missing something here? I am just an option beginner and trying to know the way pros like yourself think. Thank you.

  2. Ravi Kumar BA says:

    Congrats on your bank nifty short strangle turning out right 🙂

    I was taken by surprise about the rally in Banknifty.. unfortunately got on to the wrong side of the trend..Some hard lessons learnt ..1. Never do naked options.. 2. Don’t put all eggs in single basket

    Sir, where do u think the banknifty ends by Nov expiry (ball park number atleast)? Your answer will give boost to my thought process and to my existing open trade 🙂

    • Karthik Rangappa says:

      Thats is a hard call, Ravi. Maybe you should apply the volatility concept and get a sense of where the expiry could be. Or something like max pain.

  3. Umer Azam says:

    Sir, I was expecting a module on personal finance? As you had said earlier.

  4. Maha says:

    Yeah, I want to build my own trading system. It should needs rules and regulations. I eagerly awaiting to learn your lessons. hurrah!!!!

  5. Ravi Kumar BA says:

    Karthik, If you don’t mind, can you give details of the trade setup you did for the mentioned banknifty ?

  6. Man Deep says:

    why can’t we download PDF of chapter 9 and 10

  7. Keval says:

    Its really weird that only 10% of the PSU banks contribute to the Bank Nifty Index and Bank Nifty surged 3 % !

  8. Jay says:

    Desperately waiting for pair trading module!

  9. Ahtasham says:

    Hi Karthik.
    This is my first post and I want to thank you first as I have learned most of the trading concepts and strategies from your modules at varsity.
    I am eagerly looking forward to this module as I have plans to build a trading system and put my programming skills to some use.

    Keep up the good work 🙂

    (Just some random question)
    I know it is really hard to predict the stock market moves but just asking what you think should be the ideal success rate of trading system.

  10. Narayanan says:

    Hi Karthik, is pi quant be available on app?. Found only desktop version

  11. Prashant says:

    Sir when you gonna post pair trading module?

  12. Saurabh Tomar says:

    Kartik
    It is great to figure out someone who thinks like me.I am too excited by the way you write the module in easy to understand way.I some times trade on the basis of contrarian view .Well you have just given me an Idea for my P.hD thesis,which will in Behaviorial Finance and will try to figure what guts are, and to investigate the noise which affect trading decision in India.
    Thanks

  13. Vinit says:

    Hey Karthik
    This is my first post here. But I must admit I am a huge fan and follower of ur work.
    Infact I have learned a lot from varsity, the very foundation of my understanding of markets is varsity. All due credits to you and team zerodha. I have an active account with zerodha and have referred a few friends to varsity and zerodha as well.

    Many congratulations for the new module. Really looking forward to it..!
    The appetite for knowledge of your followers has surpassed your capacity to produce quality work here. Congratulations!
    Cheers

  14. Isaac Maria says:

    Hello Sir, an out of the context question. I am thinking to invest in Index Funds but I don’t know how to choose one. I am aware of two factors
    1) Expense ratio (Which has to be less than 0.5)
    2) Tracking Error
    My Questions are :
    1) How do I find out tracking error for an Index Fund
    2) Am I missing any of the important factors before choosing one?

  15. Sujeet Raj says:

    Some options had better results than the PNB one.

    SBI OCT 280 CE had some 27,000% and 300 CE some 40,000% gain.

    There could be others too

  16. Sushil says:

    Hi Kartik,
    On the same fateful day I entered a short strangle after the market opened and price of SBI stock looked to stabilize of SBI 280 PE & 320 CE and burnt my fingers badly as I had to buy back my call option at a very high price.

    • Sujeet Raj says:

      I think he did it towards the end of the day when prices had stabilized. Not at opening. But he did it for the index which had unusually high volatility even tough PSU’s had less say on Bank NIFTY.

    • Karthik Rangappa says:

      Hmmmm, touching stocks which have fundamental news around it is a tough call. Its better to stay away if – especially in situations where its hard to assimilate the news flow.

  17. Gunjan sharma says:

    Why not chapter 9 & 10 in pdf format

  18. Satyaki Mallick says:

    Hi Karthik,
    Is there a module here which explains about investing in mutual funds? I was curious about Coin of Zerodha. If yes, please do comment the link for the module.

  19. nikhil says:

    hi Karthik,
    In some previous comment you said that you would look for atleast 60% win rate. But i have a question, for how many trades should we decide that the system is given 60% win rate or more?

  20. Sashidhar. L says:

    I read few books on trading systems and they all say that all trading systems have some edge over others. How true is this and if yes, what kind of edge are they talking about?

  21. Panky says:

    Team Varsity, you have done some really great work by designing such a great platform for retail trader for free. thank you very much for such great efforts.. can you launch google playstore app of Varsityzerodha. in which we read online and offline content on zerodha varsity instead of providing pdf copy.so we should read on zerodha platform instead of third party App (for pdfs). we also like to click on adds shown on this zerodha app as token of love from our side. i really want that u should design app for varsity and Q&A for greater mobility…….
    once again thank you very much….

  22. Ash says:

    Hi Karthik,

    I know you aren’t the right person for this, just thought you can cascade this to the right people like Nithin Kamath.

    Lots of issues in current version of Kite in the past few days. What is happening with Zerodha applications? I called the support team and they weren’t of much help except for saying some backed up-gradation work is going on. How can that be allowed to affect the front end. It affects people like me a lot.

    Issue :

    For example in Kite application, the positions tab is not reflecting “Average Price” and “P&L” at all and “Change” shows as NA. It shows as 0. You might want to look into the issue. I think the issue is common to many users, even my friend is facing the same problem. Also average prices are shown wrongly in the Holdings tab.

    Would be great if you could escalate this issue or let me know a proper forum to discuss these

    Thanks,
    Ash

  23. Ashish says:

    Hi,
    Sir can you please make a module on trading plans and trading strategies for beginners. Especially for regular stocks rather than the Derivatives. I am new to stock trading and I want to stay away from Derivatives untill I get a hang of trading.
    I would really appreciate if you such a module comes out on Varsity.

    Thank you

    P.S I have became a fan of Zerodha and I have started suggesting Varsity and Zerodha to everyone interested in trading stocks

  24. T A RAMA KRISHNA REDDY says:

    Hi karthik,I have a doubt many People say that everything in market is manipulated by big institutional traders,that is why almost 99% retail traders lose money success percentage is very low there is also a belief that the index like nifty and bank nifty are also manipulated in their favour.is this talk really true?please explain briefly about this manipulation which is eating the retail traders wealth and health?can the index be manipulated?

    • Karthik Rangappa says:

      There is no manipulation. People lose money because they do not have the kind of patience or discipline that the institutional investor has. Not for any other reason.

  25. deepak naha says:

    Hi Karthik,

    As always great educational topics been discussed by you.
    I have been trading for some time in options , using strategies.

    Can we have a session on bitcoin and how to trade on bitcoin-I have been hearing a lot but know nothing on bitcoin- would request you to throw your intelligence on the subject.

    Also can we form a wats app group –where you would discuss your profit making strategies ( I know I m sounding selfish).

  26. deepak naha says:

    One more thing karthik–can we have a trigger in our mail box, whenever a new topic been discussed by you.

  27. Mayur says:

    hi Kartik

    Momentum strategy (Portfolio approach)

    by this you mean you will be doing all the calcs like 3 mnth – 12 mnth / 6mth-12 mnth / 9mth 12mth returns on a sent of scock
    an then rank them as per the relative strength and select top 10 or 20 stock for your portfolio if yes can you please do that in excel and some ami broker code to go with as it will be much easier to backtest

  28. Mayur says:

    *** correction set of stocks 🙂

  29. Sashidhar says:

    Sir how does one decide on what strategy the trading system should be based on? As you said there are so many trading strategies- Pairs trading, momentum etc. How should one go about selecting a trading system? Thanks.

    • Karthik Rangappa says:

      A good trader usually has 2-3 strategies and masters them to perfection. So you always trade these strategies, based on the opportunities that come about in markets.

      • Karthik says:

        Thanks for the reply sir. Would you be comfortable telling what kind of trading systems you personally use? Thanks.

        • Karthik Rangappa says:

          I use a mix of strategies, including Pair Trading, option writing, naked futures position, long-term investments, TA based trades etc.

  30. Monil says:

    @Karthik Rangappa
    @nithin kamath

    Will zerodha ever be listed on any exchange ?

    Are you doing anything for making kite /PI (for options trading – currently we can’t view live Greeks /net position Greeks in kite /pi- at least make this thing available if not rest ) as sophisticated as think and swim ?

    Wait for your response >>

    • Karthik Rangappa says:

      Monil, no one knows what the future holds 🙂

      We are doing quite a bit with respect to options, hopefully, we should make some announcements soon 🙂

  31. Manish Goyal says:

    @Karthik

    Sir, First of all i wud like to thank u for all stuff, i have gone through most of the module & i found them really helpful

    I am the beginner in this field & hopefully going to complete my CA in Coming Jan & want to make my career in this field but don’t know how to start, Should i get training somewhere for this or should i start to analyze at my own ??

    Waiting for Reply

    • Karthik Rangappa says:

      Good luck for the upcoming exams in Jan, Manish.

      I’d suggest you start making your own analysis. This will always help.

      • Manish Goyal says:

        Thank u Sir

        Sir, i want to know how one can keep himself updated with all stuff related to companies & relevant industry apart from business news, so that i can track them

        Is there any app or something.??

  32. Saurav says:

    Hi karthik,
    Sorry for posting here, but mobile kite application is not working from 2 days in android platform. Please suggest what to do??? 😞😞

  33. Sashidhar. L says:

    Sir is there anything zerodha is doing about back testing, even for those who don’t have any coding knowledge?

  34. Shabnam says:

    Hi sir, I’m new into this field and um also reading your given modules. And let me tell u they R very easy to understand…
    Hopefully will soon start earning..
    Tx

  35. Manish Goyal says:

    Hii Sir,

    I want to know that in case i short sale nifty 50 index suppose on last day @2 ( 1 lot for 10700 nifty call) and before closing i wont able to buy or their are no buyer for the same then what will happen/ be consqunce. ??

    ( As we know nifty 10700 call will become “0” on expiry closing while nifty 50 is trading at 10470)

  36. Sashidhar. L says:

    Sir I have a very important question about stop losses . In the above trade, say I was the option seller of PNB Oct 160 CE and I had placed a stop loss at 5 rupees below the sell price. How do I manage against drastic market changes like this? The price wouldn’t hit my stop loss as it opened at a much higher price. How do traders protect themselves from incidents such as this?

    • Karthik Rangappa says:

      This is a practical problem and a risk inherent in placing not just SL but any limit order. There is no guarantee of execution. This is where market order scores over limit orders, but the prices you get in mkt order can be quite dissapointing.

      • Sashidhar. L says:

        Just what I thought too sir. So in such cases, what can a trader do to protect himself from such black Swan events?

        • Karthik Rangappa says:

          Nothing really 🙂

          • Sashidhar says:

            Sir I know this solution might not be feasible. But do you think holding the same number of underlying stocks bought at a much lower price say a few years back would act as a hedge for such black Swan events?

          • Karthik Rangappa says:

            That is as good as a buy and hold strategy. Not really a hedge. But yes, in a sense, the only hedge against market volatility is time.

  37. CreaTorr says:

    Hi Karthik,

    I have couple of questions regarding settlement of derivative market:

    1) If I have leveraged 10 times by shorting future contract on a particular day and then next day that particular stock has gap-up opening of 20% because of uncertain situation like the above mentioned news. So, in this type of trade how is trade cash settled assuming investor who has shorted doesn’t have money to pay. As it is zero sum game, who is gonna pay to opposite party? Is that SEBI or broker or government?

    2) If I’ve 1000 lot of PUT In the Money options and then war breaks out. In this situation, every PUT writer will try to close their position. But now, everyone has conviction that the worst situation will prevail and the worst of market is still to come. Finally because of liquidity crunch, situation is like only the OI for that particular series is 1000 lot.
    Then will I be forced to close the position by regulator as the put writer is facing problem with margin amount and he is not able sustain financially that trade by putting extra required margin amount? or Is it regulator gonna take hit of lost amount?

    • Karthik Rangappa says:

      1) The risk management team would cut your position in situations where it starts making losses over an above the margins parked.
      2) If you have 1000 Put short, then there will be someone who has bought these from you. As long as you have an open position, someone else will also. So regulator will ensure money is transferred (or settled) between both the parties. Remember, the seller has margins parked already with the broker.

  38. Aman Agrwal says:

    Hey Karthik,
    Please upload the complete pdf for module 10 so that we can learn from it .
    Please upload the complete pdf as soon as you can

  39. Aman Agrwal says:

    I want to clarify a doubt regarding brokerage .
    Suppose i had put an order for 10K shares but the order is executed in parts
    My Order : 10K Shares of X Stock.
    Order gets executed in parts : 5000/10000
    3000/10000
    2000/10000

    So in this case my brokerage cost at zerodha would be Rs 20 ( As i have given a single trade entry )
    or,
    It would be Rs 60 ( as the trade is executed in 3 trades instead of 1 trade )

    Looking forward for your answer.
    Thank You

Post a comment