15.1 – The classic approach
I had briefly introduced the concept of calendar spreads in Chapter 10 of the Futures Trading module. Traditionally calendar spreads are dealt with a price based approach. Here is a quick recap on how this is done –
- Calculate the fair value of current month contract
- Calculate the fair value of the mid-month contract
- Look for relative mispricing between the two contracts
Based on the mispricing, you either buy the current month contract and sell the mid-month contract or sell the current month contract and buy the mid-month contract. Here is an example of a Calendar Spread –
- Buy TCS Futures expiring 28th June 2018 @ 1846
- Sell TCS Futures expiring 28th July 2018 @ 1851
Here you buy and sell the futures of the same stock, but of contracts belonging to different expiries like showcased above. The difference between prices of the two contracts is what is expected to made here. The risk is extremely low in calendar spreads so therefore the money you make on calendar spreads is also small. If you are trader like me, who is averse to risk, then this is something you may like.
This approach to performing a calendar spread is a decent one.
By the way, if you are not familiar with what I’m discussing, then I’d suggest you read Chapter 10 in the Futures Trading module to get a quick perspective on the classic calendar spreads approach. I think it forms a crucial foundation on top of which you can build other variant/styles of calendar spreads.
So let’s get started straight away.
15.2 – Calendar spread logic
If you have read the chapters on pair trading, then understanding the calendar spread logic is quite straightforward. This simplified approach assumes that the current price of futures is a reflection of everything known in the market. The known set of information can extend from news on the stock, corporate action, discount/premium, fair value, and literally everything out there which is relevant to the stock.
Now, if the above assumption is valid, then probably we can use the price itself as a trigger to identify opportunities to set up a calendar spread trade. This kind of simplifies the whole approach. Calendar spreads are a low-risk strategy so therefore do not expect big bucks from this strategy. However, since you simultaneously buy-sell the same asset, you take out the directional risk involved in the trade, hence it does make sense to top up the leverage. Also, unlike pair trade, the calendar spread trades can be ultra-short term in nature, with most of the trades closing within the same day. Before I take up an example to explain this, I’ll quickly give you an overview of this is done.
Start with downloading the continuous futures closing prices of the stock for both near month and next month contracts.
Calculate the daily historic difference between the two contracts and generate a time series. Calculate the mean and standard deviation of the time series. Using the mean and standard deviation data we can estimate the range for the difference. A trading signal is triggered when the difference between the two contracts move to mean plus or minus 1 standard deviation and the trade is closed when the difference collapses to mean.
You get the point, don’t you ☺
15.3 – Calendar spread example
I’ve taken the example of SBIN to illustrate calendar spreads. I have download the continuous futures data from Zerodha Pi (Zerodha’s desktop trading application) for last 200 trading days. I have got the closing prices on excel sheet, and this is how it looks –
The next step is to calculate the difference between the two contracts. It is advisable to subtract the price of near month contract from the current month contract. This is because, all else equal, the futures price of Near month contract is always higher than the previous month contract owing to the ‘cost of carry’. Chapter 10 of futures module explains this in more detail.
The difference is calculated and the time series data is generated, as shown below –
I will now calculate the mean and standard deviation on this time series. The mean will give me an estimate on how much of the difference is acceptable on a ‘day to day’ basis and at the same time, the standard deviation will give me a sense of variation in this difference. Here is the snapshot.
You can calculate the mean and standard deviation on excel using the ‘=Average ()’ and ‘=stdev()’ functions respectively.
The mean of 1.227 tells me that, all else equal, the difference between the two contracts should be 1.227 or in that vicinity. This essentially means, there is no trade opportunity if the spread (or the difference) between the two contracts hovers around this value.
We now use the standard deviation value and the mean value to calculate the range of the spread –
- Upper range = 1.227 + 0.4935 = 1.7205
- Lower Range = 1.227 – 0.4935 = 0.7335
I had mentioned that the spread can hover around 1.227, but I had not quantified ‘vicinity’, which is quite important. The range calculation does just that, it helps us quantify the range within which (vicinity) the spread can vary on a daily basis.. Any value of the spread outside this range gives us an opportunity to set up a calendar spread.
If the spread has increased beyond the upper range of 1.7205, it means either the near month contract has increased in value or the current month contract has reduced in value.
The rule of thumb in any arbitrage is to always buy the asset in the cheaper market and sell the same asset in the expensive market, hence the trade here would be to buy the current month contract and sell the near month contract.
Likewise, if the spread has fallen below the lower range value i.e 0.7335, this means the current month has become expensive and near month has become cheaper. Hence, the trade here is to sell the current month and buy the near month contract.
With this logic in perspective, let’s evaluate the if SBIN has given us any opportunities over the last 200 trading days.
15.4 – Spotting opportunities
Keeping the above pointers in perspective, we can conclude the following –
- Sell the spread when the spread increases beyond 1.7205. Sell spread means, sell the near month contract and buy the current month contract
- Buy the spread when the spread shrinks below 0.7335. Buy spread means, buy the near month contract and sell the current month contract.
If you find it hard to figure out which contract to buy and which one to sell when a signal originates, then simply think in terms of the near month contract. Sell spread means sell the near month (therefore buy current month) and buy spread means buy the near-month (therefore sell the current month contract).
In the excel sheet, I now look for the historical opportunities. I will identify the sell spread opportunities first. To do this, I simply have to apply a filter, to filter out all values above 1.7205. I’ve done the same, here are the results –
As you can see, on 6 occasions, the spread increases beyond 1.7205 or the first standard deviation levels. On all these occasions, there was a trigger to sell, implying the spread would fall back to mean.
In fact, here is how the spread behaved –
|Signal Date||Sell spread value||Trade closing date||Buy spread value||P&L|
As you can notice, signals originate around month ends, probably due to expiry dynamics. Also, every trade has resulted in a profit (although small) and closed the very next day.
Let us see how the buy spread trades have performed. I have filtered for all values below 0.7335, and here are the results –
There are close to 28 trade here and not all of them are successful. Of course, the losses are as small as the profits, if not smaller. I’ll let you do the exact calculation, like the way I’ve shown for the short trades.
I hope this example gives you a general sense of how to carry out calendar spread. I’m sure you’d agree that this is far simpler and intuitive compared to the classic approach to calendar spreads.
I have summarized my thoughts on Calendar spreads here and this will also double up as the key takeaways for this chapter –
- The expected profits and losses are small in calendar spreads
- Directional risk is eliminated, hence you go can go full throttle on leverage
- All the short trades in SBIN were successful but longs were not – this implies that I would only look for short opportunities in SBI. In other words, you need to backtest the P&L profile of each futures contract and figure out which contract you can go long on and which contract you can go short on
- Since the P&L is small, ensure your trading costs are minimum, a discount broker like Zerodha is most suited for such trades J
- Trades usually close within a day or two
- Trades usually originate around expiry due to expiry dynamics
Think about this, if you can backtest this across the entire universe of equity and commodities futures contract, you will essentially have at least a signal or 2 every day!
I’d love to hear your thoughts, so please do post your queries.
PS: I won’t be posting any new chapters for a while, but that does not mean I’m not working on new content, it is just that the delivery format will be different and way more exciting!
Stay tuned ☺