What is Margin Calculator? Part1

In the previous chapter, we talked about margins. Taking the same forward, we will now talk about the margin calculator. Along with this, we will also discuss some other issues related to it.

In the previous chapter, we looked at different types of margins. We have also seen that the margin is different in every deal and it depends on how volatile the stock is. We will discuss volatility in the next module but still, we know that the volatility of each underlying asset is different and margins on that basis also vary. So how do we know how much margin will be charged for which contract? There is also a margin calculator on Zerodha’s / Angelone & opstra trading platform for the same purpose, which you can use in trading.

Zerodha’s margin calculator is quite popular. It is easy to use and calculates well. In this chapter, we will also go through this margin calculator. We will also see how you can find out the margin of the transaction. Next, we will go into more detail about the use of a margin calculator when we are talking about options.

Now let us see an example, suppose we decide to buy a futures contract of Idea Cellular Ltd which is due to expire on 29th January 2015. For this, we have to deposit the initial margin. We know that Initial Margin (IM) = Span Margin + Exposure Margin. To find your initial margin, you need to:

Step 1: The link for the margin calculator is https://zerodha.com/margin-calculator/SPAN/. As you can see there are many options available for you in Margin Calculator. But right now our focus should be on SPAN and equity futures. By the way, whenever you open this calculator, you will directly see the span margin calculator which is highlighted here in red.
Step 2 – Span Margin Calculator has two different parts which are shown here.

Step 3 – You have to choose three things in the area surrounded by red color. In the drop-down section of “Exchange,” you have to specify on which exchange you want to trade.

  • If you want to trade in futures on NSE then you will choose NFO.
  • If you want to trade commodity futures on MCX then choose MCX.
  • If you want to trade derivatives in currency on NSE then you will choose CDS.

The next drop-down section in which you have to select is shown on the right side – under “Products”. If you want to trade in futures then choose futures, otherwise, you can also choose options. In the third part, you have to choose the symbol or symbol in which you want to trade from all the contracts that you can buy and sell under Futures Options. Since we have to buy the futures of Idea Cellular with expiry date of 29th June, I have chosen that one. You can also see it in the picture below:


Step 4: As soon as you select a futures contract, one lot is replaced by quantity. If you want to buy more than one lot, you will have to fill the new quantity yourself. The lot size for our Idea Cellular stocks is 2000 so you will see that it automatically shows up in the net quantity. Now if I want to buy 3 lots then I have to fill 6000 here. After doing this, you have to press the button to sell or buy, finally you have to press the Add button.


The span calculator will tell you the margin as soon as you press the add button. This calculator will show you the total initial margin apart from showing both the span and exposure margins separately. You can also see it highlighted in red in the picture below:

Source: NSE

Span Calculator showing you Span Margin = ₹ 22,160

Exposure Margin = ₹14,730

Initial Margin (Span + Exposure) = ₹36890

Now you know how much margin you will need to trade Idea Cellular’s futures. The margin calculator has a separate section on “Equity Futures” which we will discuss in the next chapter. Now let us quickly discuss expiry, spread and intraday orders. When we understand all these three well then it will be easier for us to understand Equity Futures.

Expiry

We have discussed expiry in the earlier chapter as well. Expiry is the date on which the contract expires. For example, if I have bought futures of Idea Cellular with expiry on 29th January 2015 at ₹149 and I expect it to reach ₹155. But this means that Idea Cellular has only till January 29 to reach ₹155. If the price of Idea Cellular falls below ₹149 before 29th January, then I will be in loss and if Idea Cellular price falls below ₹155 on 30th January i.e. 1 day after expiry then it will not benefit me. This means that even before the expiry, Idea Cellular will go up as per my expectation, only then will I benefit.

Should this rule be so strict? Or is it likely to be slightly modified? Can this deal continue even after the expiry? Let’s look at an example:

Suppose today is January 19, 2015 and I hope that after 1 month i.e. in the last week of February, when the budget of the central government will come, it will be beneficial for the companies in the manufacturing sector because the government is working on Make in India. Will stress more. With this in mind, I want to bet on Bharat Forge. I think Bharat Forge is going to be very profitable and I expect Bharat Forge stock to continue to grow till the budget comes. With this thought I want to buy the futures contract of Bharat Forge. Take a look at the picture below:

Bharat Forge’s January 2015 contract is available at ₹1022. I think from here the share of Bharat Forge will continue to grow and will continue to grow till the budget. But if I buy a futures contract then this contract will expire on 29th January 2015 and I will not be able to take full advantage of the rally till the budget.

To take full advantage of my opinion, I will have to continue this deal beyond the January expiry. There are different types of contracts on NSE for this type of situation.

You can find contracts with three types of expiry at any one time on NSE. For example, if you want to buy Bharat Forge in January, there are three types of expiry contracts available to you.

  • 29 January 2015 – This is called “Near month” contract or “Current month” contract
  • 26 February 2015 – This is called the “Mid Month” contract.
  • 26 March 2015 This is called the “Far Month” contract.

look at the picture below

As you can see in the expiry dropdown menu I can choose any contract from Current Month, Mid Month and Far Month. Since I want a contract till the end of February, I will choose the mid-month contract that expires on February 26.


Here you will clearly see the difference in the price of the futures contract. The contract expiring on 26th February 2015 is priced at ₹1032 while the contract expiring on 29th January is priced at ₹1022.8. This means that the mid month contract is more expensive than the current month contract. It happens all the time. The longer the expiry time, the more expensive the stock’s future will be. For this reason, currently the contract expiring on March 29, 2015 is showing at ₹ 1037.4.

So remember, the futures contract for the current month will be less, the mid month will be more expensive and the far month will be even more expensive. There is a simple math behind this. We will understand it better when we discuss the formula for futures price.

One more thing that you should understand very well – As I said earlier that at any point of time there are 3 types of futures contracts appearing in NSE. Current Month Contract, Mid Month Contract and Far Month Contract. As we know Bharat Forge contract is going to expire on 29th January 2015 that means January contract will expire on 29th January at 3:30 PM. So when this contract expires on January 29 at 3:30, will there be only two contracts left on the NSE?

No it will not happen After the expiry of this contract on 29th January at 3:30, the next day on 30th January at 9:15 NSE will issue a new contract for April 2015. This means that when the market opens at 9:15 am on January 30th, you will again have 3 contracts in which you can invest. –

Now the February contract will become your current month contract which till now was the mid month contract.
The contract for the month of March, which till now was the contract of the far month, will become the mid month.
Similarly, the new contract of April will now become the contract of the Far Month.

Similarly, when the February contract expires, NSE will issue the May contract and thus the 3 months contract will always remain in the market.

Now let’s once again look at the futures contract of Bharat Forge Limited. Since I have a slightly longer outlook, I can buy the contract expiring on February 26, 2015 and keep it with me till the end of February. But I also have another option – instead of buying the February futures contract, I can buy the January futures contract and hold it till its expiry. After this, I can buy the February contract by selling it at the time of expiry. This is called “rollover”.

If you watch business news channel you can see that rollover data is used again and again at the time of expiry. There is no need to worry too much after hearing this. Rollover data only shows how many traders are rolling over their positions for the next month’s contract. That is, they remain in their position in the next month’s contract as well. When more people are rolling over long positions, it means that the market is bullish. But when more people rollover their short positions, it means that there is a bearish environment in the market. So is it correct to assume that rollover data tells you the exact state of the market, maybe not because this data just gives a view of the market.

So when is a rollover in the market done instead of buying a long futures contract? The biggest reason for doing this is – liquidity. In the current month contract i.e. in the current month contract, there are always more buyers or sellers, so it is always easier to buy and sell this contract.

A Look at the Spreads

Now we will talk about a new principle, which you may find a little difficult in the beginning to understand. But still you watch it carefully. We will understand it in detail later. Now let’s understand it through an example.

look at the two contracts

  • Bharat Forge Limited Futures contract expiring on 29 January 2015
  • Bharat Forge Limited Futures contract expiring on 26 February 2015

These two are separate contracts and the prices of these two contracts are also different. But the underlying of both the contracts is the same – Bharat Forge Limited. So both these contracts move in the same way i.e. if the stock of Bharat Forge goes up in the spot market then both these futures contracts will go up and if the stock goes down in the spot market they both January and February futures contracts will go down.

But there are times when you buy one contract and sell the other contract and make money from it. Such occasions are called “calendar spreads”. To understand how this happens, we will discuss it in the next module, but for the time being let’s understand it by margin.

We know how to apply margins – for risk management. But what is the risk if we are buying the contract on one side and selling the same contract on the other? The truth is that the risk will be very low. Let us understand this with an example:

Scenario 1 – Trader buys the January futures contract of Bharat Forge Ltd.

Spot price of Bharat Forge = ₹1021 per share

Bharat Forge January contract price = ₹1021 per share

lot size = 250

Suppose the spot price falls below Rs 10 and reaches Rs 1011

Approximate price of future = ₹1013

P&L = (10×250) = 2500 Loss

Situation 2 – Trader buys January futures and sells February futures

Spot price of Bharat Forge = ₹1021 per share

Long position on Bharat Forge’s January contract at ₹1023 per share

Short position on Bharat Forge’s February contract at ₹1033 per share

lot size = 250

Suppose the spot market price falls to ₹1011 per share (10 points)

Approximate price of January futures = ₹1013 per share

February futures price approx = ₹1023 per share

P&L of January contract =(10×250) = 2500 loss

P&L of February contract =(10×250) = profit of 2500

Total P&L = -2500 + 2500 = 0

Situation 3 – Trader sells January futures and buys February futures

Spot price of Bharat Forge = ₹1021 per share

Short position in Bharat Forge’s January futures contract at ₹1023 per share

Long position in Bharat Forge’s February futures contract at ₹1033 per share

lot size = 250

Suppose the share price of Bharat Forge increases by 10 points to 1031 in the spot market.

Approximate price of January futures = ₹1033 per share

February futures price approx = ₹1043 per share

P&L of January contract =(10×250) = 2500 loss

P&L of February contract =(10×250) = profit of 2500

Total P&L = -2500 + 2500 = 0

What I am trying to point out here is that if you are long on one contract and short on the other, your risk is almost zero. But it is not that the risk is completely eliminated. You still have to keep an eye on liquidity, volatility and other risks. But despite all this the overall risk remains low.

When the risk is low, the margin should also be below. This is what actually happens.

When we buy the January contract of Bharat Forge, the margin will be ₹37,362.

When we try to sell the February contract the margin will be ₹37,362
When we want to buy January contract and sell February contract then margin will be ₹7213
As you can see when the January and February contracts are taken separately, the margin on both is 37362 and 33629 i.e. total ₹74991. But when one contract is being bought and another contract is being sold at the same time, the risk is reduced so the margin requirement also gets reduced. As we can see that buying both together creates a margin of ₹7213. This means that instead of a margin of Rs.74991 we now have to pay a margin of Rs.7213 which is a saving of Rs.67658. But remember, such an opportunity rarely comes when making both long and short positions together can make money. Such occasions are called calendar spreads. There is no need to make such a deal when there is no chance of a calendar spread.

Highlights of this chapter

  • Zerodha’s Margin Calculator helps you to easily calculate the margin of each transaction.
  • Margin calculator has many features i.e. features.
  • The margin calculator also tells you the span and exposure margin separately.
  • There are 3 types of futures contracts available on NSE at any given point of time which have the same underlying.
  • A trader can choose the contract of his choice based on the expiry data.
  • The contract expiring in the current month is called the current month contract, the contract expiring in the next month is called the mid month contract and the third contract is the far month contract which also expires one month after that.
  • On the expiry of every month, the contract of the current month expires. A new far month contract is triggered and at the same time the mid month contract becomes the current month contract.
  • A calendar spread is a trading technique in which a contract for a month of one underlying is bought and a contract for another month is sold.
  • When a calendar spread is introduced, the margin requirement is significantly reduced.