AmericanCallOpt-package: Pricing of selected American call options with payoff from...

Description Details Author(s) References Examples

Description

This package includes pricing function for selected American call options with underlying assets that generate payouts. The functions cover the cases of binomial pricing for American options with continuous payout from the underlying asset or commodity and with an underlying stock that pays proportional dividends in discrete t. There are also functions for American calls on futures using a binomial approximation, for futures currency option using a binomial approximation, and for American perpetual call options. Each type of option is dealt with in a corresponding R function.

Details

Package: AmericanCallOpt
Type: Package
Version: 0.95
Date: 2012-03-02
License: GPL-3

This package includes a set of pricing functions for American call options. The following cases are covered: (1) Pricing of American call option using the standard binomial approximation; (2) Hedge parameters for an American call option with a standard binomial tree; (3) Binomial pricing of American option with continuous payout from the underlying asset; (4) Binomial pricing of American option with an underlying stock that pays proportional dividends in discrete time; (5) Pricing of American call option on futures using a binomial approximation; (6) Pricing of futures currency option using a binomial approximation; (7) Pricing of American perpetual call option. The user should kindly notice that this material is for educational purposes only. The codes are not optimized for computational efficiency as they are meant to represent standard cases of analytical and numerical solution.

Author(s)

Paolo Zagaglia

Maintainer: Paolo Zagaglia <paolo.zagaglia@gmail.com>

References

John Hull, "Options, Futures and other Derivative Securities", Prentice-Hall, second edition, 1993.

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
#--------------------------------------------------------------------------
#
#  Example program for pricing different American call options using 
#  alternative methods
#
#  IMPORTANT: 
#  These programs are educational purpose only. The codes are not 
#  optimized for computational efficiency as they are meant to 
#  represent standard cases of anaytical and numerical solution. 
#
#--------------------------------------------------------------------------


rm(list=ls())


#--------------------------------------------------------------------------
# Price of American call option using a binomial approximation
S<-100
K<-100
r<-0.1
sigma<-0.25
t<-1
steps<-100

call_price_am_bin<-am_call_bin(S, K, r, sigma, t, steps)
#--------------------------------------------------------------------------


#--------------------------------------------------------------------------
# Hedge parameters for an American call option using a binomial tree
S<-100 
K<-100
r<-0.1 
sigma<-0.25
t<-1.0 
steps<-100

hedge<-am_call_partials(S, K, r, sigma, t, steps)
#--------------------------------------------------------------------------


#--------------------------------------------------------------------------
# Binomial American option price with continous payout from the 
# underlying commodity
S<-100 
K<-100
r<-0.10 
y<-0.02
sigma<-0.25
t<-1
steps<-100

call_price_bin_contpay<-am_call_bin_contpay(S, K, r, y, sigma, t, steps)
#--------------------------------------------------------------------------


#--------------------------------------------------------------------------
# Binomial price of an American option with an underlying stock that 
# pays proportional dividends in discrete t
S<-100 
K<-100
r<-0.10 
sigma<-0.25
t<-1
steps<-100
dividend_times<-matrix( c(0.25, 0.75) )
dividend_yields<-matrix( c(0.025, 0.025) )

call_price_bin_propdiv<-am_call_bin_propdiv(S, K, r, sigma, t, 
				steps, dividend_times, dividend_yields)
#--------------------------------------------------------------------------


#--------------------------------------------------------------------------
# Pricing an american call option on futures using a binomial approximation
F<-50 
K<-45
r<-0.08 
sigma<-0.2
t<-0.5
steps<-100

call_price_bin_futures<-am_call_bin_futures(F, K, r, sigma, t, steps)
#--------------------------------------------------------------------------


#--------------------------------------------------------------------------
# Pricing a futures currency option using a binomial approximation
S<-50 
K<-52
r<-0.08 
r_f<-0.05
sigma<-0.2 
t<-0.5
steps<-100

call_price_bin_currency<-am_call_bin_currency(S, K, r, r_f, sigma, t, steps)
#--------------------------------------------------------------------------


#--------------------------------------------------------------------------
# Price for an American perpetual call option
S<-50.0 
K<-40.0
r<-0.05 
y<-0.02
sigma<-0.05

call_price_perpetual<-am_call_perpetual(S, K, r, y, sigma)
#--------------------------------------------------------------------------

AmericanCallOpt documentation built on May 2, 2019, 6:35 a.m.