Skip to main content

IRJET- Algorithmic Approach to Options Trading

Page 1

International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 08 Issue: 05 | May 2021

p-ISSN: 2395-0072

www.irjet.net

Algorithmic Approach to Options Trading Shubham Horambe1, Ketan Khanolkar1, Dhairya Dixit1, Huzaifa Shaikh1, Prof. Manasi U. Kulkarni2 1B. Tech Student, Dept of Computer Engineering and IT, VJTI College, Mumbai, Maharashtra, India 2 Assistant Professor, Dept of Computer Engineering and IT, VJTI College, Mumbai, Maharashtra, India

----------------------------------------------------------------------***---------------------------------------------------------------------

Abstract - Majority of the traders lose money whilst trading

sitting in front of the screen for hours. Due to this continuous monitoring requirement, the performance of Manual Trading is limited to the amount of time of the day the trader can dedicate to trading. Other than this, Manual Trading also suffers from time delays, which is the ability to execute trades in a small-time window. Also, for predicting unprecedented non-random changes that take place in trade prices, a trader must delve into and analyze more and more information which is more powerful than information available on open-sources like news platforms. This is very difficult to do for humans, as unlike computers, we can handle only a few parameters simultaneously. Another limitation of this approach is slippages, which refers to the difference a trader gets in the expected price and the price at the execution time of the trade. They are caused due to the time delays caused by processing of the orders and trades at different levels after they are filed. The last and major limitation of the traditional approach is the fact that human beings cannot completely remove emotional biases from hindering trade performances and decision making.

in options owing to market speculation, emotional trading and lack of risk management. The purpose of this research paper is to introduce an automated way of trading in options in order to tackle these problems. To achieve this, we have adopted some basic option strategies namely Covered Call, Protective Put and Covered Strangle. These strategies have been tested over a period of 5 years (2015-2019) for a set of stocks in the U.S options market.

Key Words: Options, Algorithmic Trading, Call Option, Put Option.

1. INTRODUCTION Algorithmic trading involves making use of machines which have been programmed so as to follow pre-fed steps of instructions, allowing the users to place orders or trades for generating profits at a faster rate than a human trader. Algorithmic trading also helps us in making the markets more liquid and widens the horizons for systematic trading. This is because Algorithmic Trading rules out human emotions from hindering trade performances. Algorithmic Trading is also sometimes quoted as Black Box trading, High Frequency Trading and Quantitative Trading.

B. Options Trading A derivative can be defined as a financial security item having a value that has been derived from an asset or a group of assets. It acts as a contract which binds two or more financial parties. The underlying assets mentioned above can be interest rates, bonds, etc. An option can be stated as a derivative which provides the buyer with the right, but does not make him obligated to sell or buy the asset at a decided price on or the contract expiry date.

Benefits of Algorithmic Trading include: • Accurate placement of trade orders and instant execution of instructions. • Execution of trades placed at best available prices. • Rules out human emotions from trading and in turn reduces mistakes in executing trades. • Allows back-testing of the developed algorithm, on historical data.

The different participants of the derivatives market can be categorized as one of the following three types - hedgers, traders and arbitrageurs.

A. Traditional Approach

1) Hedgers: Hedgers form the group of participants which are affected by the various price associated risks of the underlying assets and make use of derivatives, such as options to reduce this risk. 2) Speculators/Traders: Speculators form the group of participants which work their way by predicting future movements of the asset's price and accordingly buy or sell derivative contracts.

The traditional approach for options trading (Manual Trading) involved human decision-making. It involved people entering trades and exiting them through different ways, such as through a broker, websites or apps made for trading. Human attributes like time constraints, computational power and emotions limit the performance of this traditional approach. Identification of opportunities which would lead to profits requires studying economic announcements and making notes about technical indicators. In order to identify these announcements and indicators, one has to continuously monitor the market by

© 2021, IRJET

|

Impact Factor value: 7.529

|

ISO 9001:2008 Certified Journal

|

Page 2605


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 08 Issue: 05 | May 2021

p-ISSN: 2395-0072

www.irjet.net

3) Arbitrageurs: Arbitrageurs form the group of participants which induce profit by exploiting differing prices of a given item in different markets. These transaction opportunities sealed by the arbitrageurs do not persist for long as they are acted upon immediately by the arbitrageurs. This leads to the difference of cost between the two locations to reduce.

price value. A put option is classified as an ITM option if its strike price value is greater than its spot price value. At the money (ATM) option: An ATM option contract is the one in which the decided assets strike price value equals its spot price value. Out of the money (OTM) option: A call option is classified as an OTM option if its strike price value is greater than its spot price value. A put option is classified as an OTM option if its strike price value is smaller than its spot price value. Bid price: Price paid to buy a call or put option. Ask price: Price demanded to sell a call or put option.

Options Trading can help us with creating strong portfolios with unique features. Options help us get a stable earning and security support with protection and leverage. They can also be used for generating a recurring income over a long period of time. Finally, they are often used by traders for speculative purposes to earn money by buying and selling contracts so as to wager on the direction of a stock.

2. LITERATURE REVIEW Giuseppe Nuti et al. researched algorithmic trading (AT) and described its different stages as Pre-trade analysis, Trading signal and Trade execution. The paper further explains the different system components of AT which includes alpha model, risk model and transaction cost model. [1]

Types of Options American Options: An American option allows the traders to use the option contract rights any time before and including the day of expiration. A weekly American option can be exercised last by expiry weeks Friday. A monthly American option can be exercised last by the month's third Friday. European Options: A European option allows the traders to use the option contract rights only on the expiration date. A monthly European option can be exercised on the Thursday before month's third Friday.

Philip Treleaven et al. has described algorithmic trading (AT) as trading which involves algorithms to automate the entire trade cycle or any particular part of it. Some important steps in Algorithmic Trading include pre-trade analysis, signal generation, post-trade analysis, trade execution, asset allocation and risk management. Importance of cleaning and back-testing of data is also described in the paper. [2] Rajan Lakshmi A et al. did a survey on algorithmic trading (AT) particularly, high frequency trading. The paper has the objective to study the impact of algorithmic trading strategies in emerging markets. The author back-tested results of both Long and Short positions between March 2007 to September 2013 with 80% winning trades. [3]

C. Basic Terminologies of Options Trading Call Option: A Call Option allows the option holder to purchase the underlying asset mentioned in the trade contract at the decided price. Put Option: A Put Option allows the option holder to sell/give-away the underlying asset mentioned in the trade contract at the decided price. Stock option: The stock option makes use of a specific stock as its underlying asset. An example here is GOOG or AAPL. Option Buyer/Holder: The buyer of an option pays a premium to purchase the right of buying/selling the underlying asset mentioned in the trade contract. Option Seller/Writer: The seller of an option receives a premium paid by the option buyer to purchase the right of buying/selling the underlying asset. This makes him obligated to the buyer to buy/sell the underlying asset mentioned in the trade contract if the buyer decides to exercise his right. Lot size: The Lot size of a call or put option contract refers to the total number of the decided underlying asset’s units in the mentioned trade contract. Spot price: Spot Price refers to the underlying asset’s trading price in the spot market. Strike price: Strike Price refers to price which has been decided in the trade contract as the price for exercising the option contract. In the money (ITM) option: A call option is classified as an ITM option if its strike price value is smaller than its spot

© 2021, IRJET

|

Impact Factor value: 7.529

Ramasamy. V et al studied the different strategies of options trading on the National Stock Exchange (NSE) in India. In their study, they highlighted that the risks involved in options trading can be minimized and the return from options trading can be improved by designing suitable investment strategies. Their experimentation concluded that the Long Straddle and Strangle strategies yielded profits for huge swings in either direction from the strike price and the Short Straddle and Strangle strategies yielded profits when the stock price remained stable or would not move much around the strike price. [4] Shalini H S et al made an attempt at finding effective option trading strategies which are cost effective in terms of option premiums. The experiments showcased that the Bull Call Ladder and Bear Put Ladder were not able to optimize the returns as they had a negative net premium whereas the Short Put Synthetic Straddle and Long Iron Butterfly strategies gave a positive net premium. [5] Ronald W. Shonkwiler presented a study about the various concepts associated with option trading. The author also reflects on how combinations of the basic options provide various and unique investment possibilities by talking about combinations that take advantage of changes in volatility independent of the direction of the market. The author

|

ISO 9001:2008 Certified Journal

|

Page 2606


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 08 Issue: 05 | May 2021

p-ISSN: 2395-0072

www.irjet.net

further explains how an option can be considered as a trade between two parties as except for the commission (a payment to the broker) and the bid-ask spread (essentially a payment to the market maker and the exchange), what one party makes from the trade, the other party pays. In reference to the above explanation, the author also sheds some light on reverse trades and dual trades by using option trading examples. This research study also discusses about the different Greeks, which are the mathematical derivatives of the value of a portfolio with respect to the Black-Scholes variables: stock price S, time to expiration T, volatility σ, and the risk-free rate r; and how they play an important role in helping us predict how strongly the option price will change for a unit change in its variable and in which direction. The first Greek Delta (δ), is the Derivative with Respect to S and is the most important Greek. It represents the partial derivative of the option price; thus, its prediction pertains when there is a change in stock price. The other Greeks are Gamma (Γ), Theta (θ), Vega (ν) and Rho (ρ). [6]

Data Properties of Algoseek Resolutions Available

Minute

Data Providers

AlgoSeek

Start Date

January 1st 2010

Symbol Universe

≈ 4,000 Tickers

4. IMPLEMENTATION: 4.1 Covered Call A covered call is a popular options strategy which involves buying the underlying asset whilst simultaneously selling an OTM call option for the same asset. The maximum profit from a covered call is equal to (Strike Price - Stock entry price) + Option Premium; here stock entry price refers to the price at which the stock is purchased. The maximum loss happens when the stock price goes to zero. A covered call is a neutral strategy wherein the person who employs this strategy is of the view that the stock price will not move much in the near-term. It is generally employed by long-term investors who have a short-term neutral view for a particular stock.

Huang-Ming Chen et al studied the performance of different trading strategies by back-testing it with long-term market data and employed spread strategies for risk control from an option-sellers point of view. This paper proposed a method developed by the authors to simulate different trading strategies. The authors used exponential moving average (EMA) and Volatility Index (VIX) and integrated it with spread strategy to make a unique strategy. [7]

3. PROPOSED SYSTEM 3.1 PROBLEM STATEMENT “To develop various comprehensive algorithms for trading in the stock markets by incorporating technical analysis to return maximized profit using various models, and comparing the outcomes obtained by different models.”

3.2 DATASET DESCRIPTION Dataset used for our back testing was implicitly provided by QuantConnect, which was the platform on which we performed all our Backtesting. The Dataset providers for QuantConnect are QuantQuote (Equity), AlgoSeek (Options). Data Properties of QuantQuote Resolutions Available

Tick, Minute, Second, Hourly, Daily

Data Providers

QuantQuote

Start Date

January 1st 1998

Symbol Universe

≈ 19,700 Tickers

© 2021, IRJET

|

Impact Factor value: 7.529

|

ISO 9001:2008 Certified Journal

|

Page 2607


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 08 Issue: 05 | May 2021

p-ISSN: 2395-0072

www.irjet.net

4.2 Protective Put A protective put is a famous options strategy generally employed by investors to protect a significant downside risk to their portfolio. It involves buying an OTM put option for the stock already present in the portfolio of the investor. The quantity of options bought is the same as the underlying asset. The maximum loss in a protective put is equal to the premium paid to buy the put option. The protective put acts as a hedge against a sudden downfall in the stock price. The investor employing a protective put can still participate in any upside in the stock price.

5. RESULTS: The following results for our research topic were obtained by backtesting the above-mentioned algorithms on Quantconnect Platform over a period of 5 years i.e., from 2015 to 2019.

4.3 Covered Strangle

Covered Call (Percentage Returns)

A covered strangle is a technique which involves buying the underlying equity and selling a strangle. The covered strangle is generally employed when an investor has a neutral to moderately bullish view on the underlying asset. The call and put which are written have the same expiration date. The potential for profit is limited to the premium collected from selling the call and put options whereas the downside risk is significant. The loss is multiplied by a factor of two when the stock price falls. This happens because of simultaneously holding the stock and writing a put option.

© 2021, IRJET

|

Impact Factor value: 7.529

|

Ticker

201 5

2016

2017

2018

2019

C.A.G.R

AMZN

37.5 5

15.71

37.58

21.69

26.78

27.56

GOOG

0.26

4.43

20.51

-0.11

21.63

8.88

NVDA

13.1 0

13.10

13.10

13.10

130.22

30.38

MSFT

12.6 7

12.67

12.67

12.67

40.34

17.73

ISO 9001:2008 Certified Journal

|

Page 2608


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 08 Issue: 05 | May 2021

p-ISSN: 2395-0072

www.irjet.net

Protective Put (Percentage Returns) Ticker

201 5

2016

2017

2018

2019

C.A.G.R

AMZN

33.2 7

0.92

32.27

30.69

8.07

20.23

GOOG

14.5 1

-3.52

14.99

-0.26

11.19

7.09

NVDA

15.0 0

122.82

60.28

-10.44

45.31

39.82

MSFT

9.24

3.32

16.51

9.09

32.65

9.59

The Protective Put is also a famous strategy used by hedge fund managers to protect their portfolio in the case of a major correction in the markets. Buying a put act an insurance for the underlying equity. If there is a major down move then the downside is protected & if the markets do well then, the premium paid is the only loss incurred. The Covered Strangle is a popular strategy for moderately bullish trend expectation. Here with the underlying stock, we write (sell) both Out-the-money (OTM) call and put options. So, if the stock does not move much, we benefit from writing both the call and put options. In case of a downward move the potential loss can be huge. Therefore, choosing fundamentally sound stocks is paramount to the success of this strategy. Machine Learning and Artificial Learning can be surely incorporated in Algorithmic trading. For determining the various hyperparameters for a particular Stock option we can use ML & AI. Also, they can be used for stock price prediction. All of these strategies form the future scope of our research.

Covered Strangle (Percentage Returns) Ticker

201 5

2016

2017

2018

2019

C.A.G.R

AMZN

62.8 7

12.41

28.91

17.49

16.83

31.91

GOOG

17.2 4

3.51

18.95

-0.84

20.09

11.44

NVDA

16.5 0

46.48

84.88

-24.86

26.89

34.57

MSFT

12.0 3

9.53

20.93

13.38

41.42

18.92

7. REFERENCES [1]

[2]

[3]

[4]

6. CONCLUSION & FUTURE SCOPE: [5]

Recently the finance industry has witnessed a tremendous importance from algorithmic trading and probably this trend will continue in the near future. In Contrast to human Traders there are numerous advantages to Algo trading and many different possibilities become available as automated trading becomes widely available. Also, the electronic trading platforms have greatly attracted algorithmic traders because of their tariffs and extremely fast reaction.

[6] [7]

The Covered Call strategy which is covered under the Option Strategies is one of the most famous and profitable option strategies out there. The equity in the portfolio when not generating any returns can be made profitable by writing a call over the equity. Similar to earning rent on a property which is not appreciating in value.

© 2021, IRJET

|

Impact Factor value: 7.529

|

Nuti, Giuseppe & Mirghaemi, Mahnoosh & Treleaven, Philip & Yingsaeree, Chaiyakorn. (2011). Algorithmic Trading. Computer. 44. 61 - 69. 10.1109/MC.2011.31. Treleaven, Philip & Galas, Michal & Lalchand, Vidhi. (2013). Algorithmic Trading Review. Communications of the ACM. 56. 76-85. 10.1145/2500117. Lakshmi, A. & Vedala, Sailaja. (2017). Survey of algorithmic trading strategies in equities and derivatives. International Journal of Mechanical Engineering and Technology. 8. 817-825. Ramasamy, Venkatachalam & Prabakaran, G. (2018). OPTIMAL TRADING STRATEGIES AND PERFORMANCE OF OPTIONS AT NSE. International Journal of Advanced Research. 6. 1337-1344. 10.21474/IJAR01/7164. Shalini H S, Dr. R. Duraipandian "Optimizing Returns through Developing Effective Option Trading strategy: With Reference to Stock Options Traded in National Stock Exchange," Shonkwiler, Ronald. (2013). Finance with Monte Carlo. 10.1007/978-1-4614-8511-7. Chen, Huang-Ming & Chang, Hao-Hsuan & Fang, ShenWei & Teng, Wei-Guang. (2019). Options Trading and Hedging Strategies Based on Market Data Analytics. 3143. 10.5121/csit.2019.90804.

ISO 9001:2008 Certified Journal

|

Page 2609


Turn static files into dynamic content formats.

Create a flipbook
IRJET- Algorithmic Approach to Options Trading by IRJET Journal - Issuu