6.1 – The Margin Calculator

In continuation of our discussion on margins in the previous chapter, we will now discuss the margin calculator. Over the next two chapters, we will discuss the margin calculator and learn a few associated topics related to margins.

Do recollect, in the previous chapter, we learnt about the various types of margins required to initiate a futures trade. Margins vary from one future contract to another as the margins depend on the volatility of the underlying. We will talk about volatility in the next module, but for now, remember that the volatility changes from one underlying to another; hence the margins vary from one underlying to another. So how do we know what is the margin requirement of a particular contract? Well, if you are trading with Zerodha, chances are you would have come across the ‘Margin Calculator’.

Zerodha’s margin calculator is one of our popular offerings, and rightly so. It is a simple to use tool that has a very sophisticated engine in the background.  In this chapter, I will introduce you to the margin calculator and help you understand the margin requirement for the contract you choose. We will revisit this topic on the margin calculator when we take up the chapter on Options in the next module; at that point, we will understand Zerodha’s margin calculator’s complete versatility.

Let us take up a case where one decides to buy the futures contract of IDEA Cellular Limited, expiring on 29th January 2015. Now to initiate this trade, one needs to deposit the initial margin amount. We also know that the Initial Margin (IM) = SPAN Margin + Exposure Margin. To find out the IM requirement, all you need to do is this –

Step 1 – The link to the Margin Calculator is https://zerodha.com/margin-calculator/SPAN/. As you can see from the image below, many different options are available (I have highlighted the same in black). However, our focus, for now, will be on the first two options called ‘SPAN’ and ‘Equity Futures”. In fact, you will land on the SPAN Margin Calculator subpage by default, highlighted in red.


Step 2 – The SPAN Margin Calculator has two main sections within it; let us inspect the same –


The red section has 3 drops down menu options. The ‘Exchange’ dropdown option basically requires you to choose the exchange you wish to operate. Select –

  1. NFO if you wish to trade Futures on NSE,
  2. MCX if you wish to trade commodity futures on MCX
  3. CDS if you wish to trade currency derivatives on NSE

The next drop down on your right is the ‘Product’; choose Futures if you wish to trade a futures contract, or if you wish to trade options, select Options. The third drop-down menu lists symbols where all the futures and options contracts are made available. From this drop-down menu, choose the contract you wish to trade. Since we are interested in IDEA Cellular Limited expiring on 29th Jan, I have selected the same; please see the image below –


Step 4 – Once you select the futures contract, the Net Quantity automatically gets pre-populated to 1 lot. If you wish to trade more than one lot, you need to enter the new quantity manually. Notice in the image below, as soon as I select the IDEA futures contract, the net quality has changed to the respective lot size, 2000. If I wish to trade, say 3 lots, I have to type in 6000 (2000 * 3). Once this is done, click on the radio button, either a buy or sell (depending on what you wish to do) and finally click on the blue “Add” button


Once you instruct the SPAN calculator to add the margins, it will do the same, and it will give you the split up between the SPAN, Exposure, and the total initial margin. This is as shown below, highlighted in the red box –


The SPAN calculator is suggesting the following –

SPAN Margin = Rs.22,160/-

Exposure Margin = Rs.14,730/-

Initial Margin (SPAN + Exp) = Rs.36,890/-

With this, you know how much money is required to initiate the futures trade on IDEA Cellular; it is as simple as that! The next interesting section within the margin calculator is the “Equity Futures”. We will discuss the same in the next chapter. However, before we understand this, let us quickly understand 3 more topics, namely the Expiry, Spreads, and Intraday order types. Once we understand these topics, we will be placed better to understand the “Equity Futures” on the margin calculator.

6.2 – Expiry

In the earlier chapters, we briefly figured out what the ‘Expiry’ of a futures contract means. Expiry specifies the last date up to which the contract lasts, beyond which it will cease to exist. Consider this; if I buy IDEA Cellular Limited futures contract at 149/- expiring on 29th January 2015, with an expectation that it will hit 155, it simply means that this move to 155 has to pan out by 29th January 2015. Obviously, if the price of IDEA is below 149 before the expiry, then I have to book a loss. Even if the price of IDEA futures hits 155 (or in fact any price above 149) on 30th January 2015 (1 day after the expiry), it is of no use to me as the contract has already expired. In simple words, when I buy a futures contract, it has to move in my favour on or before the expiry day, else there is no point.

Does it really have to be so rigid? Is there any flexibility in terms of going beyond the stated expiry date? Let me illustrate what I mean –

I know that the Central Government budget is expected sometime around the last week of February 2015, which is a little more than a month away (considering today is 19th Jan 2015). I expect a good budget this time around, and I’m hopeful that the manufacturing sector will significantly benefit from the budget in the backdrop of the ‘Make in India’ campaign. Given this, I would like to bet that Bharat Forge, a manufacturing major, will significantly benefit from the upcoming budget. To be precise, I expect Bharat Forge to rally from now, all the way till the budget (pre-budget rally). Therefore to exploit my directional perspective on Bharat Forge, I would like to buy its futures today. Have a look at the snapshot below –


Bharat Forge  January 2015 contract is trading at Rs.1022/-, but here is a situation – my view is that Bharat Forge will rally from now, all the way till the last week of Feb 2015. But If I buy the futures contract, as shown above, it expires on 29th Jan 2015, leaving me stranded halfway through.

Clearly, since my directional view goes beyond the January expiry period, I need not be bound to buy the January expiry contract. In fact, for reasons similar to this, NSE allows you to select a contract that suits the expiry requirement.

At any given point, NSE allows us to buy a futures contract with 3 different expiries. For example, we are in January; hence we have 3 contracts of Bharat Forge with different expiry –

  1. 29th January 2015 – This is called the near month contract or the current month contract
  2. 26th February 2015 – This is called the mid-month contract
  3. 26th March 2015 – This is called the far month contract

Have a look at the image below –


As you can see, from the expiry drop-down menu, I can choose any contract between the current month, mid-month, or far month based on my specific requirement. Needless to say, I would choose the mid-month contract expiring on 26th Feb 2015 in this particular case (as shown below) –


One thing that stands out clearly is the change in futures price. The contract expires on 26th Feb 2015 is trading at Rs.1,032/- while at the same time the contract expiring on 29th Jan is trading at Rs.1,022.8/-. Which means the mid-month contract is more expensive compared to the current month contract. This is always the case; the larger the time to expiry, the higher is the price. In fact, as I write this, Bharat Forge Limited’s March contract expiring on 29th March 2015 is trading at Rs.1,037.4/-.

For now, remember this – The current month futures price should be less than mid-month futures price, which should be less than far month futures price. There is a mathematical reason for this; the same will be discussed when we take up the futures pricing formula.

Also, here is another important concept you need to remember – As I had mentioned earlier, at any given point, the NSE ensures there are 3 future contracts (current, mid, and far month) available to trade. For now, we know, Bharat Forge contract is expiring on 29th January 2015. This means the January contract can be traded till 3:30 PM on 29th January 2015, after which it will cease to exist. Does that mean from 29th January 2015 onwards, the January contract goes out of the system leaving behind just the February and March contract?

Not really; till 3:30 PM on January 29th 2015, the January contract is available, after which it will expire. On 9:15 AM 30th January 2015, NSE will introduce April 2015 contract. So on 30th January, we will have three contracts –

  1. The February contract would now graduate as the current month contract from the mid-month contract until the previous day.
  2. The March contract would now be considered the mid-month contract (graduated from being the far month the previous day to a mid-month now)
  3. The April contract, which is newly introduced, becomes the far month contract.

Likewise, when the February contract expires, NSE will introduce the May contract. Hence the market will have March, April, and May contracts to trade. So on and so forth.

Anyway, continuing with Bharat Forge Limited futures contract example, because I have a slightly longer-term view, I can buy the futures contract expiring on 26th February 2015 and hold the February contract till I deem appropriate. However, there is another alternative, as well. Instead of buying the February contract, I can buy the January contract, hold on to it until around expiry and very close to expiry. I can square off the January contract and buy the February contract. This is called a ‘rollover’.

If you watch business news regularly, the TV anchor usually talks about the ‘rollover data’ around the expiry time. Well, don’t get too confused about this; in fact, it is quite straight forward. They are trying to convey a % measure of how many traders have ‘rolled over’ (or carried over) their existing positions from the current month to the mid-month. If many traders are rolling over their existing long positions to the next month, it is considered bullish; likewise, if many traders are rolling over their existing short positions to the next month, it is considered bearish. This is as simple as that. Now is this a proven technique to draw any concrete inference about the markets? Not really; it is just a perception of the market.

So under what circumstances would one want to roll over rather than buy a long-dated futures contract? One of the main reasons for this is the ease of buying and selling, aka ‘The liquidity. In simple words, at any given point, there is more number of traders who prefer to trade the current month contract as compared to the mid or far month contract. Obviously, when more traders are trading the same contract, the ease of buying and selling gets better.

6.3 – Sneak Peek into Spreads

We are now at an exciting stage. You may find some of the discussion below a bit confusing, but just read through this and try to grasp as much as you can. At the right time in future, we will talk more about this in detail.

Just think about these two contracts –

  1. Bharat Forge Limited Futures, expiring on 29th January 2015
  2. Bharat Forge Limited Futures, expiring on 26th February 2015

These are two different contracts for all practical purposes, priced slightly differently; both derive its value from the same underlying, i.e. Bharat Forge Limited, hence they behave the same. If Bharat Forge stock price in the spot market goes up, then both January futures and February futures price would go up. Likewise, if Bharat Forge stock price in the spot market goes down, then both January futures and February futures price would go down.

At times there are opportunities created whereby simultaneously buying the current month contract and selling the mid-month contract or vice versa, one can make money. Opportunities of this type are called ‘Calendar Spreads’. How to identify such opportunities and setup trades is a different topic altogether. We will discuss this soon. But at this moment, I want to draw your attention to the margins aspect.

We know why margins are charged – mainly from the risk management perspective. What kind of risk would exist if we are buying the contract on the one hand and selling the same type of contract on the other? The risk is drastically reduced. Let me illustrate this with numbers –

Scenario 1 – Trader buys only Bharat Forge Limited’s January Futures.

Bharat Forge Spot Price = Rs.1021/- per share

Bharat Forge January contract Price= Rs.1023/- per share

Lot Size = 250

After buying, assume the spot price drops to Rs.1011/- (10 point fall)

Approximate futures price = Rs.1013/-

P&L = (10 * 250) = Rs.2500/- loss

Scenario 2 – Trader buys January and sells February Futures.

Bharat Forge Spot Price = Rs.1021/- per share

Long on Bharat Forge January contract at Rs.1023/- per share.

Short on Bharat Forge February contract at Rs.1033/- per share

Lot Size = 250

After setting up this trade, assume the spot price drops to 1011 (10 point fall)

Approximate price of January Futures = Rs.1013/-

Approximate price of February Futures = Rs.1023/-

P&L on January Contract = (10*250) = Rs.2500/- loss

P&L on February Contract = 10*250 = Rs.2500/- profit

Net P&L = – 2500 + 2500 = 0

Scenario 3 – Trader sells January and buys February Futures.

Bharat Forge Spot Price = Rs.1021/- per share

Short on Bharat Forge January contract at Rs.1023/- per share

Long on Bharat Forge February contract at Rs.1033/- per share.

Lot Size = 250

After setting up this trade, assume the spot price increases to 1031 (10 point increase)

Approximate price of January Futures = Rs.1033/-

Approximate price of February Futures = Rs.1043/-

P&L on January Contract = (10*250) = Rs.2500/- Loss

P&L on February Contract =(10*250)= Rs.2500 /- Profit

Net P&L = – 2500 + 2500 = 0

Clearly, the point that I’m trying to make here is that when you are long on one contract and short on another contract, the risk is virtually reduced to zero. However, it is not completely risk-free; one has to account for the liquidity, volatility, execution risk, etc. But by and large, the risk reduces drastically. So when risk reduces drastically, the margins should also reduce drastically.

In fact, this is what happens, have a look at the following snapshots –

This is the margin requirement (Rs.37,362/-) when we intend to buy January contracts of Bharat Forge.


This is the margin requirement (Rs.37,629/-) when we intend to sell February contracts of Bharat Forge.


And this is the margin requirement (Rs.7,213/-) when we intend to buy January contract and sell February contract simultaneously.


As you can see, individually, the January and February contracts require Rs.37,362/- and Rs.37,629/- respectively. Hence a total of Rs.74,991/-. However, when a futures contract is bought and sold simultaneously, the risk reduces drastically, hence the margin requirement. As we can see from the image above, the combined position requires a margin of Rs.7,213/- only. Another way to look at it would be from a total of Rs.74,991/-, Rs.67,658/- i.e. Margin Benefit (highlighted in black) is reduced, and the benefit is passed on to the client. But do remember this – A simultaneous long and short position is built only when opportunities arise. These opportunities are called the ‘Calendar Spread’. If the calendar spread opportunity is not there, then there is no point initiating such trades.

Key Takeaways from this chapter

  1. Zerodha’s margin calculator is a simple tool that lets you calculate the margin required for a futures contract.
  2. The margin calculator has many versatile features inbuilt.
  3. The margin calculator gives the split up between the SPAN and Exposure margin.
  4. At any given point, NSE ensures there are three contracts of the same underlying, which expire on 3 different (but consecutive) months.
  5. A trader can choose the contract of his choice based on the expiry date.
  6. The contract belonging to the present month is called ‘Current Month Contract’, the next month contract is called ‘Mid Month’, and the 3rd one is called “Far Month Contract.’
  7. On every expiry, the current month contract expires and a new far month contract is introduced. In the process, the mid-month contract would graduate to the current month contract.
  8. A calendar spread is a trading technique which involves buying a certain month contract and selling another month contract simultaneously for the same underlying.
  9. When a calendar spread is initiated, the margins required are lower since the risk is drastically reduced.



View all comments →
  1. Raju Shinde says:

    In the above example of Calender Spread, what will happen when we spare off any one of the trades?
    Raju Shinde.

    • Karthik Rangappa says:

      The margin benefit is given because of the risk offset i.e buying current month and selling the mid (or far) month contract. As long as these positions are held the margin benefit stays, moment you Sq.off any 1 position the margin benefit is not given. Hence you are either supposed to have the full margin or you need to sq off the other position as well.

  2. Raju Shinde says:

    With reference to your above example of Bharat Forge, Suppose, I have Rs. 8000 as a balance and I want to place a spread order. As soon as I place (first) buy order, will it get accepted? Because the Margin required for the order is Rs. 37,362. How to place both the orders at a time?
    Please explain?
    With Best Regards.
    Raju Shinde.

  3. keshav says:

    Sir in spread order the profit becomes zero is it. How to take profit from this?

    • Karthik Rangappa says:

      Usually in a spread order, the max profit you make is the amount of spread between the the two contracts. Yes, you can think about it as the spread narrowing (driving upto zero) and therefore profiting out of it.

  4. sushil 12 says:

    i want next chap sir.. 😛 🙂 🙂

  5. sushil 12 says:

    2nd good thing in coming week zerodha also launching own Depository service i heard news somewhere.. 🙂

View all comments →
Post a comment