Algorithm for payoff calculation for option trading strategies using vector terminology



Similar documents
EXERCISES FROM HULL S BOOK

Lecture 6: Portfolios with Stock Options Steven Skiena. skiena

Introduction to Options

Derivatives: Options

9 Basics of options, including trading strategies

Options Trading Strategies

Hedging. An Undergraduate Introduction to Financial Mathematics. J. Robert Buchanan. J. Robert Buchanan Hedging

K 1 < K 2 = P (K 1 ) P (K 2 ) (6) This holds for both American and European Options.

CHAPTER 8: TRADING STRATEGES INVOLVING OPTIONS

Market and Exercise Price Relationships. Option Terminology. Options Trading. CHAPTER 15 Options Markets 15.1 THE OPTION CONTRACT

Trading Strategies Involving Options. Chapter 11

Introduction. Part IV: Option Fundamentals. Derivatives & Risk Management. The Nature of Derivatives. Definitions. Options. Main themes Options

Arbitrage spreads. Arbitrage spreads refer to standard option strategies like vanilla spreads to

Mastering Options Strategies

Chapter 7 - Find trades I

Options: Definitions, Payoffs, & Replications

Session X: Lecturer: Dr. Jose Olmo. Module: Economics of Financial Markets. MSc. Financial Economics. Department of Economics, City University, London

Math 489/889. Stochastic Processes and. Advanced Mathematical Finance. Homework 1

Copyright 2009 by National Stock Exchange of India Ltd. (NSE) Exchange Plaza, Bandra Kurla Complex, Bandra (East), Mumbai INDIA

Hedging Strategies Using

Lecture 12. Options Strategies

Finance 436 Futures and Options Review Notes for Final Exam. Chapter 9

DIFFERENT PATHS: SCENARIOS FOR n-asset AND PATH-DEPENDENT OPTIONS II

Figure S9.1 Profit from long position in Problem 9.9

Options Markets: Introduction

Fin 3710 Investment Analysis Professor Rui Yao CHAPTER 14: OPTIONS MARKETS

Risk Management and Governance Hedging with Derivatives. Prof. Hugues Pirotte

Goals. Options. Derivatives: Definition. Goals. Definitions Options. Spring 2007 Lecture Notes Readings:Mayo 28.

Factors Affecting Option Prices

Underlying (S) The asset, which the option buyer has the right to buy or sell. Notation: S or S t = S(t)

FX, Derivatives and DCM workshop I. Introduction to Options

Some Practical Issues in FX and Equity Derivatives

Exotic Options Trading

Name Graph Description Payoff Profit Comments. commodity at some point in the future at a prespecified. commodity at some point

University of Texas at Austin. HW Assignment 7. Butterfly spreads. Convexity. Collars. Ratio spreads.

Caput Derivatives: October 30, 2003

Lecture 4: Derivatives

Hedging Illiquid FX Options: An Empirical Analysis of Alternative Hedging Strategies

Trading Dashboard Tutorial

FIN FINANCIAL INSTRUMENTS SPRING 2008

Option Properties. Liuren Wu. Zicklin School of Business, Baruch College. Options Markets. (Hull chapter: 9)

Option Premium = Intrinsic. Speculative Value. Value

DATA ANALYSIS II. Matrix Algorithms

Chapter 5 Option Strategies

A comparison between different volatility models. Daniel Amsköld

ACCOUNTING AND FINANCE DIVISION (

2. How is a fund manager motivated to behave with this type of renumeration package?

EQUITY LINKED NOTES: An Introduction to Principal Guaranteed Structures Abukar M Ali October 2002

Warshall s Algorithm: Transitive Closure

Call and Put. Options. American and European Options. Option Terminology. Payoffs of European Options. Different Types of Options

Chapter 21: Options and Corporate Finance

Binary options. Giampaolo Gabbi

Chapter 11 Options. Main Issues. Introduction to Options. Use of Options. Properties of Option Prices. Valuation Models of Options.

Manual for SOA Exam FM/CAS Exam 2.

An Option In the security market, an option gives the holder the right to buy or sell a stock (or index of stocks) at a specified price ( strike

Pricing Interest Rate Derivatives Using Black-Derman-Toy Short Rate Binomial Tree

11 Option. Payoffs and Option Strategies. Answers to Questions and Problems

n(n + 1) n = 1 r (iii) infinite geometric series: if r < 1 then 1 + 2r + 3r 2 1 e x = 1 + x + x2 3! + for x < 1 ln(1 + x) = x x2 2 + x3 3

Exercise 1.12 (Pg )

Buying Call or Long Call. Unlimited Profit Potential

The Term Structure of Interest Rates CHAPTER 13

CHAPTER 20 Understanding Options

1 Portfolio mean and variance

Option Spread and Combination Trading

Using Excel s Data Table and Chart Tools Effectively in Finance Courses

4. ANNEXURE 3 : PART 3 - FOREIGN EXCHANGE POSITION RISK

Session IX: Lecturer: Dr. Jose Olmo. Module: Economics of Financial Markets. MSc. Financial Economics

Introduction to Equity Derivatives

Computational Finance Options

Chapter 2 An Introduction to Forwards and Options

AMATH 352 Lecture 3 MATLAB Tutorial Starting MATLAB Entering Variables

The Complete Guide to Option Strategies

CHAPTER 20. Financial Options. Chapter Synopsis

Learning Curve An introduction to the use of the Bloomberg system in swaps analysis Received: 1st July, 2002

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

About Volatility Index. About India VIX

CHAPTER 20: OPTIONS MARKETS: INTRODUCTION

Factors Affecting Option Prices. Ron Shonkwiler shenk

Four of the precomputed option rankings are based on implied volatility. Two are based on statistical (historical) volatility :

Advanced Derivatives:

CHAPTER 20: OPTIONS MARKETS: INTRODUCTION

Basics of Spreading: Butterflies and Condors

Linear Programming. March 14, 2014

Understanding Profit and Loss Graphs

Vanna-Volga Method for Foreign Exchange Implied Volatility Smile. Copyright Changwei Xiong January last update: Nov 27, 2013

Introduction to Options. Derivatives

FIN FINANCIAL INSTRUMENTS SPRING Options

CRUDE OIL HEDGING STRATEGIES An Application of Currency Translated Options

Introduction to Mathematical Finance

American and European. Put Option

Options. Moty Katzman. September 19, 2014

α = u v. In other words, Orthogonal Projection

London Stock Exchange Derivatives Market Strategies in SOLA

Lecture 7: Bounds on Options Prices Steven Skiena. skiena

Option Values. Option Valuation. Call Option Value before Expiration. Determinants of Call Option Values

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS Instructor: Michael Gelbart

2015 Exam 2 Syllabus Financial Mathematics Exam

Financial Mathematics Exam

Transcription:

MPRA Munich Personal RePEc Archive Algorithm for payoff calculation for option trading strategies using vector terminology Pankaj Sinha and Archit Johar Faculty of Management Studies, University of Delhi, Delhi 15. May 2009 Online at http://mpra.ub.uni-muenchen.de/15264/ MPRA Paper No. 15264, posted 17. May 2009 00:29 UTC

Algorithm for payoff calculation for option trading strategies using vector terminology Pankaj Sinha Faculty of Management Studies, University of Delhi, Delhi and Archit Johar Department of Computer Engineering, Netaji Subhas Institute of Technology, New Delhi Abstract The aim of this paper is to develop an algorithm for calculating and plotting payoff of option strategies for a portfolio of path independent vanilla and exotic options. A general algorithm for calculating the vector matrix for any arbitrary combination strategy is also developed for some of the commonly option trading strategies. 1.0 Introduction Hull [1] discusses the payoffs for long and short positions in Call and Put options by using algebraic techniques. J.S. Chaput & L.H. Ederington [3], Natenberg[2] and Hull[1] contain the bibliographies and survey of literature on the theoretical background of option strategies for path independent vanilla and exotic options such as European, Bermuda, Forward Start, Digital/Binary and Quanto options. There are various open source option strategy calculators like Option [4] that only rely on algebraic analytical and graph superposition techniques to plot graphs for overall profit/loss. We in this paper develop an algorithm using vector terminology to plot final profit/loss graph of various option strategies. 1

2.1 Option strategies using vector notation For a spot price S T at time T and a strike price K, the payoff for a long position in call option is given by Max(S T -K,0) and the payoff is Min(S T -K,0) for the short position in the call option. Similarly the payoff for a long position in put is Max (K-S T, 0) whereas it is Min (S T -K, 0) for a short position in the put option. We can represent a vector payoff matrix for any option strategy as a 2xN matrix. Vector V 1 V 2. V n Strike Price K 1 K 2.. K n In the above matrix the strike prices K 1, K 2,..K n for combination of options are in the ascending order, i.e., K 1 <K 2 <..<K n.. The vector V i can be interpreted as slope of the payoff graph of option strategy.by default the smallest strike price is always taken to be zero i.e. K 1 =0.The vector is always an integer in the interval (, ).We can interpret the above matrix in terms of slope of the profit/loss curve obtained for option strategies. Vi, for Ki < K < Ki+ 1 and i < n slope = V i, for K > K i and i = n Vector matrix for long and short position is given by Long Position Short Position V 1 V 2. V n -V 1 -V 2. -V n K 1 K 2.. K n K 1 K 2.. K n Using the above vector notation we can represent long and short position in call option as under Long call Short Call 0-1 For long position in call, profit/loss curve has two slopes 0 and +1 whereas for a short position the slope of profit/loss curve has two slopes 0 and 1.. Figure1:Long Position in Call Option 2

Figure 2:Short position in Call Option Similarly, the vector matrix for long and short position in put options are: Long Put Short Put +1 0 For long position in stock, the slope of profit/loss curve is +1 and strike price is assumed to be zero whereas for short position in stock, the slope of profit/loss curve is -1 and strike price is assumed to be zero. The vector matrix notation is given as: Long Stock +1 0 Short Stock -1 0 When we trade in n units of options using a particular option strategy, the entire vector row is multiplied by n. n*v 1 n*v 2. n*v n K 1 K 2.. K n The data set for a portfolio using n option strategies can be represented as Strategy 1 V 11 V 12 K 11 K 12 Strategy 2 V 21 V 22 K 21 K 22 Strategy i V i1 V i2. V ij. K i1 K i2.. K ij.... Strategy n V n1 V n2 V nm K n1 K n2. K nm 3

Note that the number of columns in each option strategy can be different. We can use the above derived vector matrices to form profit/loss function for any combination of option strategies using the following algorithm: Algorithm To plot the overall payoff strategy we need the initial Y intercept of the strategy apart from the resultant vector matrix. This Y intercept can be calculated using matrices of length greater than one using the formula Yint = ( -1*Vector(A[j])*Strike_price(A[j+1]) ) Yint = Yint + Net_Premium_Paid Step 1 For I 1 to no_of_options For j 1 to length_of_option_matrix Insert A[j] in Result_matrix in sorted increasing order on the basis of Strike_price(A[j]). Step 2 For k 1 to length_of_result_matrix Vector(B[k])=0 For I 1 to no_of_options For j 1 to length_of_option_matrix If Strike_price(B[k]) = Strike_price(A[j]) Vector(B[k]) = Vector(B[k])+ Vector(A[j]) ElseIf j < length_of_option_matrix If Strike_price(A[j]) < Strike_price(B[k]) < Strike_price(A[j+1]) Vector(B[k]) = Vector(B[k])+ Vector(A[j]) Else Vector(B[k]) = Vector(B[k])+ Vector(A[j]) Step 3 For I 1 to no_of_options j=1 If length_of_option_matrix > 1 Yint = Yint + -1 * Vector(A[j]) * Strike_price(A[j+1]) Yint = Yint + NetPremium Step 4 For k 1 to length_of_result_matrix 1 Plot line with slope Vector(B[k]) & Y Intercept Yint between points Strike_price(B[k]) & Strike_price(B[k+1]) ypoint=vector(b[k])*( Strike_price(B[k+1]) Strike_price(B[k]) ) + Yint Yint = ypoint - Vector(B[k+1])* Strike_price(B[k+1] k = length_of_result_matrix Plot line with slope Vector(B[k]) between points Strike_price(B[k]) & infinity The source code for the above algorithm is written and implemented on VC++.Net 2005 using open source graph plotting utility Gnuplot. 4

Illustration 1: An investor buys $3 put with strike price $35 and sells for $1 a put with a strike price of $30. (Example 10.2, page 224 given in Hull [1]) The above data can be represented as Buy Put + 0 35 Sell Put = +1 0 0 30 Initial Y intercept is -1*(-1*35) + -1*(1*30) 3 + 1 = 35-30 -3 + 1 = 3 One can use the following form to input the data of his/her option strategy: Payoff(Bear Spread) 0 0 30 35 Figure 3: Input Screen The following is the output of the final payoff of combination of option strategy in vector notation as discussed above. Figure 4: Vector Payoff Matrix 5

The algorithm gives the following resultant profit/loss graph of the above combination of option strategies in the form of a bear put spread. Figure 5: Payoff Graph The loss is $2 if stock price is above $35 and the profit is $3 if stock price below $30. 2.2 Some More Complex Strategies The following are the vector matrices for some of the commonly traded strategies: Long Combo (0<K 1 <K 2 ) Sell Put + +1 0 Long Straddle Buy Put + Buy Call = Buy Call = Long Combo +1 K 2 Long Straddle -1 +1 Short Straddle The vector matrix of short straddle is negative of that of long straddle +1-1 6

Strip Buy call + Strap Buy 2 calls + 0 +2 Long Strangle (0<K 1 <K 2 ) Buy put + Buy 2 puts = -2 0 Buy put = Buy call = Strip -2 +1 Strap -1 +2 Long Strangle -1 K 2 Short Strangle The vector matrix of short strangle is negative of that of short strangle. (0<K 1 <K 2 ) +1 0-1 K 2 Collar (0<K 1 <K 2 ) Long Stock + +1 0 Buy Put + Collar 0 K 2 Sell call = 0-1 Box Spread (0<K 1 <K 2 ) Buy Call + Sell call + 0-1 Sell Put + +1 0 Buy Put = Long Call Butterfly (0<K 1 <K 2 <K 3 ) Buy Call + Box Spread 0 0 0 K 2 Sell 2 call + 0-2 Long Call Butterfly K 2 K 3 Buy Call = 0 K 3 7

Short Call Butterfly The vector matrix of short call butterfly is negative of that of long call butterfly (0<K 1 <K 2 <K 3 ) 0-1 +1 0 K 2 K 3 Long Call Condor (0<K 1 <K 2 <K 3 <K 4 ) Buy Call + Sell call + 0-1 Sell Call + 0-1 0 K 3 Buy Call 0 K 4 Long Call Condor 0 K 2 K 3 K 4 Short Call Condor The vector matrix of short call condor is negative of that of long call condor (0<K 1 <K 2 <K 3 <K 4 ) 0-1 0 K 2 K 3 K 4 Illustration 2: Let a certain stock is selling at $77. An investor feels that significant change in price is un-likely in the next 3 months. He observes market price of 3 month calls as Strike Price($) Call Price($) 75 12 80 8 85 5 The investor decided to go long in two calls each with strike price $75 and $85 and writes two calls with strike price $80. Payoff for different levels of stock prices is given as Figure 6: Payoff Graph 8

Figure 7: Vector Payoff Matrix The profit /loss when stock price is at maturity is Stock Price($) Profit/Loss($) 65-1 68-1 73-1 78 2 83 1 References [1] Hull, J.C.(2009) Options, Futures, and Other Derivatives,Prentice Hall. [2] Natenberg,S.(1994) Option Volatility and Pricing Strategies: Advanced Trading Techniques for Professionals McGraw-Hill Professional Publishing. [3] Chaput, J. S. and Ederington L. H., Option Spread and Combination Trading Journal of Derivatives, 10, 4(Summer 2003):70-88. [4] http://sourceforge.net/projects/option 9