black's approximation for american options

16
Black’s Approximation for a Dividend Paying American Call Option Andile Ndiweni, David Brown, Polite Mpofu 14 October 2015

Upload: polite-mpofu

Post on 21-Jan-2017

75 views

Category:

Documents


0 download

TRANSCRIPT

Black’s Approximation for a Dividend PayingAmerican Call Option

Andile Ndiweni, David Brown, Polite Mpofu

14 October 2015

Abstract

As the complexity in financial products and the large amount of data required to computethese, the use of computer power is important in getting accurate results in an expedient manner.Numerous computer programming packages have been employed namely:

• Mathworks Matlab,

• Oracle’s Java,

• C++,

• Python.

In this paper we plan to showcase the use of Java as a tool for calculating financial products in general and American Call options with dividends in particular.

Contents

1 Introduction 1

2 Black’s Approximation 12.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.2 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.3 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

3 Application in Java 33.1 CDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.2 Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.3 Seminar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 Results 94.1 Theoretical Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.2 Real World Scenario 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.3 Real World Scenario 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5 Conclusion 11

6 References 12

List of Figures

1 Main input window for Textbook Example . . . . . . . . . . . . . . . . . . . . . . . . . 92 Dividend input window for Textbook Example . . . . . . . . . . . . . . . . . . . . . . 93 Price of Option window for Textbook Example . . . . . . . . . . . . . . . . . . . . . . 94 Main input window for Real World Scenario 1 . . . . . . . . . . . . . . . . . . . . . . . 105 Dividend input window for Real World Scenario 1 . . . . . . . . . . . . . . . . . . . . 106 Price of Option window for Real World Scenario 1 . . . . . . . . . . . . . . . . . . . . 107 Main input window for Real World Scenario 2 . . . . . . . . . . . . . . . . . . . . . . . 118 Dividend input window for Real World Scenario 2 . . . . . . . . . . . . . . . . . . . . 119 Price of Option window for Real World Scenario 2 . . . . . . . . . . . . . . . . . . . . 11

1 Introduction

Java is a general-purpose computer programming language that was created in 1991 by Sun Microsys-tems. Java was initially unsuccessful under the name OAK and in 1995 the name was changed to itscurrent name. It has taken advantage of the strong growth that has been seen in the use of the internetand today according to Oracle 9 million java developers are there globally. Java is an object-orientedlanguage similar to C++, but simplified to eliminate language features that cause common program-ming errors. Compiled Java code can run on most computers because Java interpreters and runtimeenvironments, known as Java Virtual Machines (VMs), exist for most operating systems, includingUNIX, the Macintosh OS, and Windows.

2 Black’s Approximation

2.1 Background

In 1975 Fischer Black described the an approximate method for computing an American call optionon a stock paying a single dividend. The Black–Scholes formula provides an explicit equation for thevalue of a European call option on a stock that does not pay a dividend. In case the stock pays one ormore discrete dividend(s) no closed formula is known, though several approximations can be used, orelse the Black–Scholes PDE will have to be solved numerically. One such approximation is the Black’sApproximation.

2.2 Method

To compute Black’s Approximation the Black-Scholes formula to compute the value of n (where n isnumber of dividend payments) European call options:

1. A European call with the same maturity as the American call being valued, but with the stockprice reduced by the present value of the dividend, and

2. A European call that expires on the day before the dividend is to be paid and done for alldividend paying periods. Now take the largest of the values (1) and (2) above as the desiredBlack’s approximation for the American call.

The resulting value is sometimes called the ”pseudo American” value of the call.

2.3 Example

Consider an American call option with ex-dividend dates in 3 months and 5 months, and has anexpiration date of 6 months. The dividend on each ex-dividend date is expected to payout $0.70.Additional information is presented below. Find the value of the American call option.

• S0 = $40.00,

• K = $40.00,

• σ = 30%p.a,

• r = 10%p.a,

• T = 6months,

• D = $0.70.

where,

• S0 is the current price of the underlying asset,

• K is the strike price,

1

• σ is the volatility of returns of the underlying asset,

• r is the risk free rate( annual rate, expressed in terms of continuous compounding),

• T is the time to maturity,

• D is the divident paid out on the underlying stock.

Step 1

A European call with the same maturity as the American call being valued, but with the stock pricereduced by the present value of the dividend.

PV = D1e−r

∆t1m +D2e

−r∆t2m (1)

where,

• PV is the net present value of the dividends at the ex-dividend dates,

• D1,2 are the dividends on the ex-dividend dates,

• r is the risk-free rate of the market, which we will assume to be constant for this example,

• ∆t1,2 amount of time until the ex-dividend date,

• m a division factor to bring the ∆t to a full year,

• e is the exponential function.

Applying equation 1 gives:

1.3541 = 0.7e(−0.1) 312 + 0.7e(−0.1) 5

12 (2)

Step 2

The new value of the underlying security is then obtained

S′0 = S0 − PV (3)

where,

• S′0 is value of with dividends removed

Inputting our values we obtain40− 1.3541 = 38.6459 (4)

Step 3

The option price can therefore be calculated using the Black-Scholes model

C = S0N(d1)−Ke−r(T )N(d2) (5)

Inputting the values and calculating d1 and d2

C = 38.6459(0.5712)− 40e(−0.1)(0.5)(0.4870) ≈ $3.54 (6)

Step 4

This process is replecated with one less dividend and compared to the first value calculated

C = 39.3173(0.5883)− 40e(−0.1)(0.4167)(0.5117) ≈ $3.50 (7)

Step 5

When compared the first price $3.54 ¿ $3.50 is the greater of the two and therefore the price of theoption is $3.54.

2

3 Application in Java

The code used to implement the Black’s Approximation was split into three parts these are:

• Creating a class to calculate the Normal distribution fuction and called N(.) its file name isCDF.java,

• Creating a class to calculate the option its file name is Option.java,

• Creating a main class to price the option and user interface with a filename Seminar.java.

3.1 CDF

Code for CDF.java with comments.

1 class CDF{2 private stat ic double e r f (double x ){3 /∗Handbook o f Mathematical Functions , With Formulas ,4 Graphs , and Mathematical Tab les .5 ∗Abramowitz and Steagun . Dover P u b l i a t i o n s . 19746 ∗/7 double a1 = 0.254829592 ;8 double a2 = −0.284496736;9 double a3 = 1.421413741 ;

10 double a4 = −1.453152027;11 double a5 = 1.061405429 ;12 double p = 0 .3275911 ;13 x = Math . abs ( x ) ;14 double t = 1 / (1 + p ∗ x ) ;15 // Horner ’ s method o f coding po lynomia l s16 return 1 − ( ( ( ( ( ( a5 ∗ t + a4 ) ∗ t ) + a3 ) ∗ t + a2 ) ∗ t ) + a1 )17 ∗ t ∗ Math . exp(−1 ∗ x ∗ x ) ;18 }19 public stat ic double NORMSDIST(double z ){20 double s i gn = 1 ;21 i f ( z < 0) s i gn = −1;2223 double r e s u l t =0.5 ∗ ( 1 . 0 + s i gn ∗ e r f (Math . abs ( z )/Math . s q r t ( 2 ) ) ) ;24 return r e s u l t ;25 }26 }

3

3.2 Option

Code for Option.java with comments.

1 class Option{2 // F i e l d s3 double s t r i k e P r i c e = 0 ;4 double timeToMaturity = 0 ;5 double currentPr iceOfUnder ly ingAsset = 0 ;6 double r i skFreeRate = 0 ;7 double v o l a t i l i t y = 0 ;8 int numberOfDividends ;9 double [ ] [ ] myArray ;

10 double [ ] mySecondArray ;11 double div idend = 0 ;12 double timeToDividend = 0 ;13 // methods14 void s e t S t r i k e P r i c e (double newValue ){15 s t r i k e P r i c e = newValue ;16 }17 double [ ] c o l l e c t C l a i m P r i c e s ( ){18 mySecondArray = new double [ numberOfDividends ] ;19 return mySecondArray ;20 }21 void setTimeToMaturity (double newValue ){22 timeToMaturity = newValue ;23 }24 void setCurrentPr iceOfUnder ly ingAsset (double newValue ){25 currentPr iceOfUnder ly ingAsset = newValue ;26 }27 void setRiskFreeRate (double newValue ){28 r i skFreeRate = newValue ;29 }30 void s e t V o l a t i l i t y (double newValue ){31 v o l a t i l i t y = newValue ;32 }33 double [ ] [ ] setNumberOfDividends ( int newValue ){34 numberOfDividends = newValue ;35 myArray = new double [ 2 ] [ numberOfDividends +1] ;36 return myArray ;37 }38 double [ ] [ ] s e tDiv idend (double . . . newValue ){39 for ( int i =0; i<numberOfDividends ; i ++){40 myArray [ 0 ] [ i ] = newValue [ i ] ;41 }42 return myArray ;43 }44 double [ ] [ ] setTimeToDividend (double . . . newValue ){45 for ( int n=0; n<newValue . l ength ; n++){46 myArray [ 1 ] [ n ] = newValue [ n ] ;47 myArray [ 1 ] [ newValue . l ength ] = timeToMaturity ;48 }49 return myArray ;50 }51 }

4

3.3 Seminar

Code for Seminar.java with comments.

12 package seminar ;34 import javax . swing . ∗ ;5 import java . awt . ∗ ;6 import java . awt . event . ∗ ;78 public class SeminarFinal implements Act ionL i s t ene r {9 // Create an Option Object

10 Option aO = new Option ( ) ;11 // Create a CDF Object12 CDF firstCDF = new CDF( ) ;13 // I n i t i a t e s my Frames and Panels and my f i r s t frames T e x t F i e l d s e t c14 JFrame optionFrame , dividendFrame ;15 JPanel optionPanel , dividendPanel , timePanel , buttonPanel ;16 JTextFie ld p , n , a , b , j , k ;17 int w;1819 JLabel i n i t S t o c k P r i c e , s t r i k e P r i c e , timeToMaturity , spotRate ,20 r i s k V o l a t i l i t y , numOfDivs ;21 JButton dividendButton , ca l cu la teButton2 ;2223 // Constructor24 public SeminarFinal ( ){25 optionFrame = new JFrame ( ” Black ’ s Approximation” ) ;26 opt ionPanel = new JPanel ( ) ;27 opt ionPanel . setLayout (new GridLayout (7 , 2 ) ) ;2829 //add the w i d g e t s30 addWidgets ( ) ;3132 //add the pane l to the frame33 optionFrame . getContentPane ( ) . add ( optionPanel ,34 BorderLayout .CENTER) ;3536 // e x i t when the window i s c l o s e d37 optionFrame . s e tDe fau l tC lo seOperat ion ( JFrame .EXIT ON CLOSE ) ;3839 //show the Options Frame40 optionFrame . pack ( ) ;41 optionFrame . se tLocat ionRe lat iveTo ( null ) ;42 optionFrame . s e t V i s i b l e ( true ) ;43 }4445 // c r e a t e and add the w i d g e t s f o r the Panels .46 private void addWidgets ( ){47 // c r e a t e w i d g e t s48 a = new JTextFie ld ( ”40” ) ; // I n i t i a l Stock Price49 i n i t S t o c k P r i c e = new JLabel ( ” I n i t i a l Stock Pr i ce ” ) ;50 b = new JTextFie ld ( ”40” ) ; // S t r i k e Price51 s t r i k e P r i c e = new JLabel ( ” S t r i k e Pr i ce ” ) ;

5

52 p = new JTextFie ld ( ”182” ) ; //Time To Maturi ty53 timeToMaturity = new JLabel ( ”Time To Maturity ” ) ;54 n = new JTextFie ld ( ”10” ) ; // Rate55 spotRate = new JLabel ( ” Risk ” ) ;56 j = new JTextFie ld ( ”30” ) ; // V o l a t i l i t y57 r i s k V o l a t i l i t y = new JLabel ( ” V o l a t i l i t y ” ) ;58 k = new JTextFie ld ( ”2” ) ; //Number o f Dividends59 numOfDivs = new JLabel ( ”Number o f Dividends ” ) ;6061 dividendButton = new JButton ( ” Enter Dividends ” ) ;6263 // L i s t e n to e v e n t s from the div idendBut ton64 dividendButton . addAct ionLis tener ( this ) ;6566 //Add w i d g e t s to my opt ion Panel67 opt ionPanel . add ( a ) ;68 opt ionPanel . add ( i n i t S t o c k P r i c e ) ;69 opt ionPanel . add (b ) ;70 opt ionPanel . add ( s t r i k e P r i c e ) ;71 opt ionPanel . add (p ) ;72 opt ionPanel . add ( timeToMaturity ) ;73 opt ionPanel . add (n ) ;74 opt ionPanel . add ( spotRate ) ;75 opt ionPanel . add ( j ) ;76 opt ionPanel . add ( r i s k V o l a t i l i t y ) ;77 opt ionPanel . add ( k ) ;78 opt ionPanel . add ( numOfDivs ) ;79 opt ionPanel . add ( dividendButton ) ;80 opt ionPanel . se tBorder ( BorderFactory . createEmptyBorder (30 , 30 ,81 30 , 3 0 ) ) ;82 }83 // Implementation o f Act i onLi s t ener i n t e r f a c e84 public void act ionPerformed ( ActionEvent e ){8586 double l = Double . parseDouble ( a . getText ( ) ) ;87 double m = Double . parseDouble (b . getText ( ) ) ;88 double q = Double . parseDouble (p . getText ( ) ) ;89 double r = Double . parseDouble (n . getText ( ) ) ;90 double v = Double . parseDouble ( j . getText ( ) ) ;91 int w = I n t e g e r . pa r s e In t ( k . getText ( ) ) ;9293 // C a l l s my Option methods94 aO. setCurrentPr iceOfUnder ly ingAsset ( l ) ;95 aO. s e t S t r i k e P r i c e (m) ;96 aO. setTimeToMaturity ( q /365) ;97 aO. setRiskFreeRate ( r /100 ) ;98 aO. s e t V o l a t i l i t y ( v /100) ;99 aO. setNumberOfDividends (w) ;

100 aO. myArray [ 1 ] [ w]=q /365 ;101102 // Creates my Enter Dividends Frame with a d i v i d e n d s pane l and103 //a time to d i v i d e n d s pane l104 dividendFrame = new JFrame ( ” Enter Dividends ” ) ;

6

105 div idendPanel = new JPanel ( ) ;106 timePanel = new JPanel ( ) ;107 buttonPanel = new JPanel ( ) ;108 div idendPanel . setLayout (new GridLayout (1 , w) ) ;109 timePanel . setLayout (new GridLayout (1 , w) ) ;110 buttonPanel . setLayout (new GridLayout (1 , 1 ) ) ;111112 // Creates an array o f JTex tF ie lds to use in my f o r s ta tements113 JTextFie ld [ ] [ ] myJArray = new JTextFie ld [ 2 ] [ w+1] ;114115 // Organizes my d i v i d e n d s pane l116 dividendFrame . getContentPane ( ) . add ( dividendPanel ,117 BorderLayout .NORTH) ;118 dividendFrame . getContentPane ( ) . add ( timePanel ,119 BorderLayout .CENTER) ;120 dividendFrame . getContentPane ( ) . add ( buttonPanel ,121 BorderLayout .SOUTH) ;122123 // Creates and p o p u l a t e s my c a l c u l a t e but ton124 ca l cu la teButton2 = new JButton ( ” Ca l cu la te ” ) ;125 buttonPanel . add ( ca l cu la teButton2 ) ;126127 //My c a l c u l a t e b u t t o n a c t i o n s which makes my d i v i d e n d s frame v i s i b l e ,128 // c r e a t e s f i e l d s f o r my div idends , and129 // p o p u l a t e s my Option myArray [ ] [ ] to be used on a c t i o n o f the but ton130 for ( int i =0; i<w; i ++){131 JLabel d ivLabe l s = new JLabel ( ” Dividend ” ) ;132 myJArray [ 0 ] [ i ] = new JTextFie ld ( ”0” , 5 ) ;133 div idendPanel . add ( d ivLabe l s ) ;134 div idendPanel . add ( myJArray [ 0 ] [ i ] ) ;135 }136 for ( int i =0; i<w; i ++){137 JLabel t imeLabels = new JLabel ( ” Time ” ) ;138 myJArray [ 1 ] [ i ] = new JTextFie ld ( ”0” , 5 ) ;139 timePanel . add ( t imeLabels ) ;140 timePanel . add ( myJArray [ 1 ] [ i ] ) ;141 }142 dividendFrame . pack ( ) ;143 dividendFrame . se tLocat ionRe lat iveTo ( null ) ;144 dividendFrame . s e t V i s i b l e ( true ) ;145146 // Def ines the a c t i o n s o f my C a l c u l a t e button ,147 // i t g e t s the t e x t from my d i v i d e n d frame , parses the s t r i n g s to148 // d o u b l e s and a s s i g n s them to my o b j e c t myArray [ ] [ ] f o r c a l c u l a t i o n s149 ca l cu la teButton2 . addAct ionLis tener (new Act ionL i s t ene r ( ){150 public void act ionPerformed ( ActionEvent e ){151 for ( int i =0; i<w; i ++){152 aO. myArray [ 0 ] [ i ] =153 Double . parseDouble ( myJArray [ 0 ] [ i ] . getText ( ) ) ;154 aO. myArray [ 1 ] [ i ] =155 Double . parseDouble ( myJArray [ 1 ] [ i ] . getText ( ) ) / 3 6 5 ;156 }157

7

158 //Some v a l u e s needed f o r my BS approximation c a l c u l a t i o n s159 double pVDs = 0 ;160 double Cs ;161 aO. c o l l e c t C l a i m P r i c e s ( ) ;162163 //My Black S c h o l e s approximation f u n c t i o n which i s a c t i o n a b l e when164 // the c a l c u l a t e bu t ton i s p res sed .165 for ( int y=0; y<w; y++){166 pVDs += aO. myArray [ 0 ] [ y ]∗Math . exp(−aO. r i skFreeRate ∗(aO . myArray [ 1 ] [ y ] ) ) ;167 double SPrimes = aO. currentPr i ceOfUnder ly ingAsset − pVDs ;168 double DOnes = (Math . l og ( SPrimes/aO. s t r i k e P r i c e )+169 (aO. r i skFreeRate+(Math . pow(aO. v o l a t i l i t y , 2 ) / 2 ) ) ∗170 aO. myArray [ 1 ] [ y +1])/(aO . v o l a t i l i t y ∗Math . s q r t (aO . myArray [ 1 ] [ y + 1 ] ) ) ;171 double DTwos = DOnes − (aO . v o l a t i l i t y ∗Math . s q r t (aO . myArray [ 1 ] [ y + 1 ] ) ) ;172 double NDOnes = firstCDF .NORMSDIST(DOnes ) ;173 double NDTwos = firstCDF .NORMSDIST(DTwos ) ;174 Cs = SPrimes∗NDOnes − m∗Math . exp(−aO. r i skFreeRate ∗175 aO. myArray [ 1 ] [ y+1])∗NDTwos ;176 aO. mySecondArray [ y ] = Cs ;177 }178179 // Assign f i r s t e lement o f an array to l a r g e s t180 double l a r g e s t = aO. mySecondArray [ 0 ] ;181182 //Compares array e lements to determine the l a r g e s t183 for ( int l l =1; l l <aO. mySecondArray . l ength ; l l ++){184 i f (aO . mySecondArray [ l l ] > l a r g e s t ){185 l a r g e s t = aO. mySecondArray [ l l ] ;186 }187 }188189 //Pops out the answer c e n t e r screen190 JOptionPane . showMessageDialog (null , ” According to Black ’ s Approximation ”191 + ” f o r an American Cal l the p r i c e f o r the opt ion i s : ” + l a r g e s t192 + ” . ” , ”Your So lu t i on ” , JOptionPane .PLAIN MESSAGE) ;193194 // Pr in t s out my winning claim p r i c e so not l o s t when GUI frame c l o s e s195 System . out . p r i n t l n ( ”Ding ! Ding ! Ding ! And the winner i s : ” + l a r g e s t ) ;196 }197 } ) ;198 }199200 //main method201 public stat ic void main ( St r ing [ ] a rgs ){202 SeminarFinal gameApp = new SeminarFinal ( ) ;203 }204 }

8

4 Results

4.1 Theoretical Example

The program was then run based on the parameters of our example leading to the following results:

1 run :2 Ding ! Ding ! Ding ! And the winner i s : 3 .5392442135444284

To enable easy use a Graphic User Interface was then applied giving the following figures as results:

Figure 1: Main input window for Textbook Example

Figure 2: Dividend input window for Textbook Example

Figure 3: Price of Option window for Textbook Example

The example had given us a value of $3.54 which compares well to our value of $3.54.

4.2 Real World Scenario 1

To further test our program we ran real world scenarios and compared the results with those onlinecalculators. The first stock was Exxon Mobil that was modelled on the following data

• S0 = $94.60 where S0 is the price of an Exxon Mobil share as at 01 January 2014,

• K = $95.00 where K is the strike price,

• σ = 21.80%p.a where σ is the volatility,

• r = 0.75%p.a where r is the US Federal Reserve interest rate,

• T = 12months where T is the time to maturity,

• D1 = $0.63 where D1 is dividend payment on 06 February,

9

• D2 = $0.69 where D2 is dividend payment on 09 May,

• D3 = $0.69 where D3 is dividend payment on 06 August,

• D4 = $0.69 where D4 is dividend payment on 06 November.

The program output was as follows:

1 run :2 Ding ! Ding ! Ding ! And the winner i s : 6 .945982594774698

Figure 4: Main input window for Real World Scenario 1

Figure 5: Dividend input window for Real World Scenario 1

Figure 6: Price of Option window for Real World Scenario 1

The online calculator found on the following site http://www.fintools.com/resources/online-calculators/options-calcs/options-calculator/ was employed and gave a theoretical price of $6.9341 ≈ $6.9458.

4.3 Real World Scenario 2

The second stock was Royal Ducth Shell that was modelled on the following data

• S0 = £94.60 where S0 is the price of a Royal Dutch Shell share as at 01 January 2014,

• K = £95.00 where K is the strike price,

• σ = 21.80%p.a where σ is the volatility,

• r = 0.5%p.a where r is the Bank of England interest rate,

• T = 12months where T is the time to maturity,

10

• D1 = £0.2687 where D1 is dividend payment on 12 February,

• D2 = £0.2803 where D2 is dividend payment on 14 May,

• D3 = £0.2909 where D3 is dividend payment on 13 August,

• D4 = £0.3016 where D4 is dividend payment on 13 November.

1 run :2 Ding ! Ding ! Ding ! And the winner i s : 1 .3813603476393475

Figure 7: Main input window for Real World Scenario 2

Figure 8: Dividend input window for Real World Scenario 2

Figure 9: Price of Option window for Real World Scenario 2

The online calculator found on the following site http://www.fintools.com/resources/online-calculators/options-calcs/options-calculator/ was employed and gave a theoretical price of £1.8489 ≈ $1.8523.

5 Conclusion

This seminar has shown the applicability of Java in the financial industry. The program that has beendeveloped can:

• Be used to calculate a European Call option,

• Be turned into an applet that allows it to be used online.

The calculation output shows low deviation when compared to other online calculators as well handcalculations. The graphic user interface also allows for a simpler use by the end user which is a keyadvantage of Java.

11

6 References

[1] John C. Hull, Options, Futures and Other Derivatives. 322-324 [2] Abramowotz and Steagun,Handbook of Mathematical Functions, Formulas, Graphs and Mathematical Tables.

12