How to Automate Contract Selection For Option Trading Using Breeze APIs ft. Salil Shukla, Quantitative Analyst
options trading, how to do option trading in ICICIdirect, options trading, options, api, breeze api, contract selection
Please Enter Email
Thank you.
Related content
Videos - Futures & Options
What are Equity Derivatives and How do They Work?
Want to learn about futures and options? This video simplifies equity derivatives with real-life examples and clear explanations. Find out how they work, why investors use them, and the differences between options and futures.
Videos - About ICICIdirect
How to Place Order using Request Library of Python
Watch this detailed video to learn how to place order using request library of python
Videos - About ICICIdirect
Fetch Option Chain and Historical Data in C#
Watch this informative video to learn how to fetch option chain and historical data through C# on ICICI Direct
Videos - About ICICIdirect
From setup to execution : Breeze API in C#(.NET)
Watch this video to learn how to setup Breeze API in C# on ICICI Direct
Videos - About ICICIdirect
Place Equity/FNO orders for NSE/BSE through C#
Watch this informative video to learn how to place Equity/FNO orders for NSE/BSE through C# on ICICI Direct
Videos - About ICICIdirect
How to Use Websocket for Live Data Streaming?
Watch this video to learn how to use websocket for live data streaming on ICICI Direct
Videos - About ICICIdirect
How to Fetch Order Book using Breeze API?
Watch this video to learn to fetch order book through breeze API on ICICI Direct
Videos - About ICICIdirect
How to Square Off using Breeze API
Watch this video to learn how to square off using breeze API on ICICI Direct
Videos - About ICICIdirect
How to Fetch Historical Data with Breeze API
Watch this video to learn how to fetch historical data with Breeze API on ICICI Direct
Videos - About ICICIdirect
Placing orders in BSE FnO using Breeze API.
Watch this video to learn how to place orders in BSE FO using Breeze API on ICICI Direct
Videos - About ICICIdirect
How to Generate the Breeze API Key
Watch this video to learn how to generate Breeze API key on ICICI Direct
Videos - About ICICIdirect
Butterfly Strategy Using Breeze API
Watch this video to learn how to trade butterfly strategy with Breeze API on ICICI Direct
Videos - About ICICIdirect
How to use RSI & EMA with Breeze API
Watch this video to learn how to trade using RSI & EMA via Breeze API on ICICI Direct
Videos - About ICICIdirect
Iron Condor Strategy using Breeze API
Watch this video to learn how to trade iron condor strategy with Breeze API on ICICI Direct
Videos - About ICICIdirect
Four Leg Option Strategy Using Breeze API
Watch this video to learn how to use four leg option strategy using Breeze API on ICICI Direct
Videos - About ICICIdirect
How to use ADX Technical Indicator via Breeze API
Watch this video to learn how to use ADX technical indicator via Breeze API on ICICI Direct
Videos - About ICICIdirect
How to Automate Two Legs Option Strategies via Breeze API
Watch this video to learn how to automate two legs option strategies via Breeze API on ICICI Direct
Videos - About ICICIdirect
Trade Using RSI Technical Indicator via Breeze API
Watch this video to learn how to trade using RSI technical indicator via Breeze API on ICICI Direct
Videos - About ICICIdirect
How to Trade Multi-leg Option Strategies via Breeze API
Watch this video to learn how to trade multi-leg option strategies via Breeze API on ICICI Direct
Videos - Xpert view
How to Use Readymade Option Strategies of Breeze API
Watch this video to learn how to use the readymade option strategies of Breeze API
Videos - Futures & Options
Introduction to options
Metal stocks set to boost your portfolio next year! Have you seen this headline recently and wondered about adding steel stocks to your portfolio? Did you just go to your investment app and search for the stock of Tata Steel? If yes, you must have seen a long list of items with names such as December call, December put, and other months’ options. If you have tried your luck at investing in the stock market, you would have heard of a variety of terms such as stocks, derivatives, options, futures, etc.
For many of us, just hearing these words can lead to confusion, but that need not be the case. While you probably already know that stocks or equities refer to the shares of companies which you can buy and trade for a profit, do you know what derivatives are? If you have a basic idea about these concepts, or even if you know nothing at all, we are here to help you clear your doubts. So let us get started by demystifying these concepts in the simplest way possible. Let us first talk about derivatives. As a financial product, which, just like its name suggests, derives or gets its value from another asset. Derivatives can be an exciting investment option.
Let us take a very simple example to start with. When your car's tank runs empty, what do you do? You drive to the nearest petrol pump for a refill. Here, you look at the electronic fuel meter, which displays the volume of petrol being filled along with the amount you need to pay. You know that the price of petrol changes from time to time. Have you ever wondered how they arrive at that price? The price you pay for petrol depends on the current price of crude oil, so one could say that petrol’s value is derived from the prevailing rates of crude oil. The concept of derivatives is quite similar. It is a financial instrument that has no value of its own; a derivative gets its worth or value from that of the underlying asset, which could be stocks, bonds, commodities, currencies, indices, or interest rates. Now that you know what a derivative means, let us look at some of its important features. Each time you refuel your car, there is a transaction between you, the buyer, and the petrol pump, the seller. The petrol pump sells you petrol for a specific price, and you agree to buy it at that price. A derivative contract also involves a transaction between a buyer and a seller.
Here are the key components of a derivative contract: lot size or contract size stands for the minimum number of units being exchanged; for example, a crude oil derivative may have a lot size of 100 barrels. The expiry date is when the derivative transaction must take place—you cannot trade the contract once the expiration date has passed. Price is the pre-agreed rate at which you will settle the contract. So how do you then trade derivatives?
Derivative contracts are mainly of two kinds:
1. Over-the-counter (OTC) derivatives:
These derivatives are traded directly over the counter between the buyer and the seller; there is no intermediary, so you and the other party are free to customize the contract terms.
2. Exchange-traded derivatives:
They are bought and sold through an intermediary known as the exchange, which links the buyers and sellers of derivatives. Here, the contracts are most standardized, so you have no scope for personalization.
Now that you're aware of derivatives, let us understand what options are:
An option contract is an example of an exchange-traded derivative instrument. Now let us look at what this concept means. Suppose you're planning on booking a hotel room for your vacation a month from today during the festive season. You know that the prices will go up in the next month, so you want to book in advance. However, what if the hotel does not receive any bookings and reduces its price in the meantime? You would be facing a loss since you have entered a contract to pay more. What could be a solution here? Options could be the solution to this problem. Options are a derivative instrument that gives rights to the buyer of an option, and the option seller has an obligation to honour the contract. Options contracts are different from futures contracts because one party has the right to buy or sell an underlying, while another party has an obligation; while in futures, both parties have an obligation.
-
Call and put options:
The right to buy is a call option, while the right to sell is a put option. Options contracts provide the buyer with the option to exercise their right to buy or sell, as the case may be. The buyer may choose to exercise their right only if it is favourable. If a transaction is not in the buyer's favour, they're not required to go through with it. On the other hand, the seller doesn't have any right but has an obligation. If a buyer wants to exercise their right, the seller must compulsorily oblige and honour the contract. The buyer of an option is also known as the holder; the seller of an option is also known as the writer. So, in a hotel example, you can buy a call option with the hotel to stay at your booked rate despite an increase in prices. However, if the price falls, you are not liable to check in at your booked price. Similarly, if you expect a fall in price and want to sell at your earlier agreed price, you can buy a put option.
-
Premium:
To enjoy this right of buy or sell, you would have to pay a premium, as the party with the right has to compensate the party with the obligation. So, when a buyer purchases their right, they need to pay the cost of that right, known as a premium, upfront to the seller. This means that the buyer needs to make an upfront compensation to the seller for taking on risk. Since the hotel is taking on a risk by agreeing to your price, you need to compensate them with a premium, because you may choose to cancel your stay if the hotel price falls at the time of the trip, which will lead to a loss for the hotel. That's why options are always a zero-sum game; that is, profit for one party is equivalent to the loss for the counterparty.
Let us look at examples of market-based call and put options to understand the concept better. Assume you are bullish on ABC Limited stock and have purchased the ABC Limited ₹1000 call option with an expiry of January 29th at ₹100. This means that you have purchased the right to buy ABC stock at ₹1000 on expiry. You don't need to exercise or use your right compulsorily; you can exercise your right only if it is favourable to you. For instance, if you find that the ABC Limited’s market price is more than ₹1000, you can choose to exercise your call option. The amount you paid to purchase the right is known as premium—that is, ₹100 in this example. The rate at which you enter the contract is known as the strike price or the exercise price—that is, ₹1000 in this example. If you don't exercise your right, you will lose the premium to the seller, who will earn it. However, if your expectation turns into reality and ABC Limited stock touches ₹1300, then you have the right to buy the stock at ₹1000 and earn a profit after deducting the premium paid. The level at which you start earning profits is known as your break-even point.
Let us understand the put option now. Assume that you have purchased the ABC Limited’s ₹1000 put option with an expiry of January 29th at ₹80. This means you have purchased the right to sell ABC Limited at ₹1000 on expiry. You don't need to exercise your right if it is not in your favour; you may exercise your right only if you find that ABC Limited’s market price is less than ₹1000. In this case, if you don't exercise your right, you will lose the premium to the seller, who will earn it. But suppose ABC Limited does fall below ₹1000, as you expected. Then you can earn a profit from exercising your right to sell the stock at ₹1000. Now that you have a fair idea of what derivatives and options mean, do you think this is a call you want to take?
Videos - Futures & Options
Long and Short Call Options
Take a long call on company X's stock now. This is a tip shared by a trading platform that Rajiv uses. Seeing such tips makes him confused because he's unable to make sense of the advice given out by experts. Sure, Rajiv has taken the right call by signing up for investment advice, but without understanding the meaning of long call and put, there is no way he can trade options properly. Honestly, Rajiv is not alone. While he knows that going long on an option means to buy it, and going short on it means to sell the option, going long on a put option and going long on a call option carry different connotations.
Are you as confused as our friend Rajiv? Don't worry, let us clear up these aspects. We will explain call and put options trade positions. As you know, there are two kinds of options available in the derivatives market: call options and put options. A call option is the right, not the obligation, to buy an underlying asset at an agreed price on a particular date. A put option is the right, not the obligation, to sell an underlying asset at an agreed price on a particular date.
Now, when you go long on call options, you become a buyer of that option. This means that a long call option gives you the right to buy the underlying asset, but not the obligation. Going long or buying a call option means the buyer will have to pay an option premium to the seller of the option. The seller here is going short on the call option; the seller has to sell if the buyer exercises their right.
Now, let's understand each of the option positions in detail.
Understanding Long Call:
If Rajiv is very bullish or positive on the asset, then he should choose a long call position. Let's understand this with an example. Suppose Rajiv has purchased Company X's call option with a strike price of ₹1000 at a premium of ₹50. This means that he has purchased the right to buy Company X's stocks at ₹1000 on expiry and has paid ₹50 to the seller of the option. He may prefer to buy if the market price is favourable, that is, if the price is more than ₹1000.
Let us look at three scenarios within this example:
Scenario One:
Company X closes at ₹1200 on expiry. As you know, all options close at their intrinsic value at expiry. In this case, Rajiv will get an amount equal to the intrinsic value of the call option, that is, spot price minus strike price; ₹1200 - ₹1000 = ₹200. Having paid ₹50 to buy the call option, his net profit will be ₹200 - ₹50 = ₹150. In other words, it is better to exercise the right, as you are getting the stock of X at a price lower than the current market price. In this example, we do not include the transaction cost while calculating the profit or loss.
Scenario Two:
Company X closes at ₹800 on expiry. In this case, it would make sense not to exercise the call option, as the current market price is lower than the agreed price of ₹1000. It would be better to buy the stock from the market rather than from the seller of the call option. Rajiv will lose the premium paid, which is ₹50 in this case. You can also calculate the profit or loss with the help of option buying and selling prices. The selling price of the option on expiry is equal to the intrinsic value of the option: intrinsic value = spot price - strike price; ₹800 - ₹1000 = -₹200. As you know, intrinsic value cannot be negative, so it will be considered as 0, meaning the buyer will receive nothing for this option at expiry, and he loses his buying cost of ₹50. Please note that the loss in the long option position will not be more than the premium paid.
Scenario Three:
Company X closes at ₹1050 on expiry. In this case, Rajiv may prefer to exercise his right and purchase at ₹1000. This will mean a profit of ₹50, but the net profit would be zero as he has paid ₹50 initially to purchase the option. This point is also known as the break-even point.
The payoff in various scenarios is listed down:
Price of Stock on expiry (Rs) |
Call Option Premium Paid (A) (Rs) |
Call Option Premium Received on expiry(B) (Rs) |
Net payoff (B-A) (Rs) |
800 |
50 |
0 |
-50 |
900 |
50 |
0 |
-50 |
1000 |
50 |
0 |
-50 |
1050 |
50 |
50 |
0 |
1100 |
50 |
100 |
50 |
1200 |
50 |
200 |
150 |
Okay, so now that you understand long call, let us look at the flip side, which is the short call. Rajiv knows going short means to take a position to sell, but what does that really mean?
Understanding the Short Call:
A short call is an obligation to sell an underlying asset to a call buyer at the strike price if the call option is exercised by the buyer of the option. A short call position or call option writing is useful when you are somewhat bearish or negative about the market. This means that you expect the underlying asset to stay in a narrow range, that is, either stick to its current price or show slight downside movement.
If Rajiv has to go short on Company X's option, it means he can sell the call option with a strike price of ₹1000 and earn a premium of ₹50. This move means he has an obligation to sell Company X at ₹1000 at expiry if the buyer exercises their right and receives ₹50 from the buyer of the option to fulfil his obligation. The buyer will prefer to exercise his right if it is favourable to him, that is, if the price is more than ₹1000.
Let us look at three scenarios within this context:
Scenario One:
Company X closes at ₹1200 on expiry. In this case, the buyer would prefer to exercise his right and purchase Company X at ₹1000. This means Rajiv will need to sell it at a discounted price of ₹1000 compared to the market price of ₹1200. He will incur a loss of ₹200 minus ₹50 (premium received) = ₹150 on this position. In other words, the option premium on expiry equals the spot price minus the strike price: ₹1200 - ₹1000 = ₹200. As we have a short position to square off, you need to buy the option at ₹200 that you sold at ₹50. This means your loss is ₹200 - ₹50 = ₹150.
Scenario Two:
Company X closes at ₹800 on expiry. In this case, the buyer won't prefer to exercise his right and won't purchase at ₹1000. This means he will lose the premium paid, incurring a loss of ₹50, which Rajiv will gain. Again, let's understand this from the difference in buying and selling prices. The option's intrinsic value, which is 0 in this case, is the buying price, and as the selling price is ₹50, the seller's profit is ₹50 - ₹0 = ₹50. Please note profit here is limited only to the premium received.
Scenario Three:
Company X closes at ₹1050 on expiry. In this case, the buyer will prefer to exercise his right and purchase at ₹1000, which means a loss of ₹50 for Rajiv, but this will be compensated by the premium received, so there won't be any profit or loss in this case.
Now, what do we understand from these scenarios? You should go with a short call when you expect a slight downfall in the market or expect the market to stay at the current level.
The payoff in various scenarios is listed here:
Price of Stock on expiry (Rs) |
Call Option Premium Received (A) (Rs) |
Call Option Premium Paid on expiry (B) (Rs) |
Net payoff (A-B) (Rs) |
800 |
50 |
0 |
50 |
900 |
50 |
0 |
50 |
1000 |
50 |
0 |
50 |
1050 |
50 |
50 |
0 |
1100 |
50 |
100 |
-50 |
1200 |
50 |
200 |
-150 |
1300 |
50 |
300 |
-250 |
If you think the market is going to rise sharply, then a long call would be the best choice. Okay, now you know the difference between long call and short call and when to exercise these options.
Videos - Xpert view
Options Trading at ICICIdirect
options trading, how to do option trading in ICICIdirect, options trading strategies, option, icici direct
Videos - Xpert view
How to Create Stoploss Using Breeze APIs with Salil Shukla
Videos - Xpert view
Options Trading Strategies ft. Abhijit Pathak
options trading, point and figure chart, how to do option trading in ICICIdirect, expert
Videos - Currency Commodity
What is currency option?
A currency option provides you with a right tool but not the obligation to buy or sell currency at a specified rate on a specific future date. In exchange for this right the holder usually pays the cost that is known as the premium for the currency option. Currency market fluctuations can have a lasting impact on cash flow, whether it is buying a property, making an investment, or settling invoices. By utilizing Forex options, businesses can protect themselves against adverse movements in exchange rates.
This feature of Forex options makes them extremely useful for hedging forex risk when the direction of the movements in exchange rates is uncertain. Forex options are also useful tools which can be easily combined with Forex Futures to create bespoke hedging strategies. Forex options can be used to create bespoke solutions and work to remove the uptrend cost of a premium.This involves certain caveats around the structure of the option product.
Now, let us understand some basic terminologies of Forex options:
Premium
The upfront cost of purchasing a currency exchange option is called the premium.
Strike price
The strike or exercise price is the price at which the option holder has a right to buy or sell a currency.
Expiry date
The trades expiry date is the last date on which the rights attached to an option may be exercised.
Exercise
The act of the option buyer notifying the seller that they intend to deliver on the option contract is called exercise.
Delivery date
The date when the currency exchange will take place if the option is exercised.
Videos - Futures & Options
All about Derivatives
What are Derivatives?
Derivatives are financial products which obtain or derive their value from specific underlying assets, whose value keep changing based on market conditions. For example; petrol is a derivative of crude oil.
How does derivative trading work?
Traders trade derivative by predicting future price movements of underlying assets. Derivatives contracts are also used for hedging and arbitrage purposes.
Popular derivatives products in the Indian stock market
-
Future contracts
Futures contracts are standardized contracts between buyers and sellers to buy/sell an underlying asset at a predetermined price, size and date in future. These contracts are traded on stock exchanges. -
Option contracts
Options contracts give buyers the right, but not the obligation to buy or sell an underlying asset at a predetermined price and future date. There are two types of options; call option and put option. A call option gives the right to buy and a put option gives the right to sell to the buyer of an option.
Derivatives are available in selected indices and stocks in India on the stock exchanges.
Derivative market participants
- Hedgers
- Speculators
- Arbitrageurs
Reasons to trade in derivatives
- Protects you against market volatility.
- Allows you to use the leverage by paying a small amount as margin or premium.
- Enables you to take positions in different scenarios including bullish, bearish, volatile, rangebound, etc.
How to trade in derivatives?
Traders should have an active trading account that permits derivative trading. With ICICIdirect traders can place their derivative trading orders online through their trading account.
Videos - Stocks
All about Options Trading
What is Option?
An option is a type of derivative instrument that involves a contract between two parties to buy or sell something on a future date, at predetermined prices. The contract gives the right, but not the obligation, to the buyer of the option, to buy/sell an underlying asset.
How to do Options Trading?
There are two types of options- Call option and Put option.
-
What is Call Option?
The call option gives the right, but not an obligation, to the buyer of the contract to buy an underlying asset at a predetermined price (known as strike price), on the contract expiration date. The buyer typically exercises the call option when the market goes above the strike price.
-
What is Put Option?
The put option gives the right, but not the obligation, to the buyer of the contract to sell an underlying asset at a predetermined price (known as strike price), on the contract expiration date. The owner usually exercises the put option when the market moves below the strike price.
Options Trading Benefits
- Less risky than future trading for an option buyer.
- Helps you to hedge your open position.
- Less margin required for Option buyers, who need to pay only premium as an up-front margin.
Who can trade in Options?
Options trading is open to all new and existing ICICIdirect trading account holders.
How can I trade in Options?
Login to ICICIdirect>F&O>Place your order.

COMMENT (0)