PlainVanillaOptions         package:fOptions         R Documentation

_V_a_l_u_a_t_i_o_n _o_f _P_l_a_i_n _V_a_n_i_l_l_a _O_p_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     This is a collection of functions to valuate plain vanilla
     options. Included are functions for the Generalized Block-Scholes
     option  pricing model, for options on futures, approximative
     formulas for American options, some utility functions, and print
     and summary methods for options.

     The functions are:

       1-3  'GBS*'                     Generalized Block-Scholes option,
         4  'BlackScholesOption'       a synonyme for GBSOption,
         5  'Black76Option'            options on Futures,
         6  'MiltersenSchwartzOption'  options on commodity futures,
       7-9  'NDF, CND, CBND'           distribution functions,
        10  'print'                    print method for Options,
        11  'summary'                  summary method for Options.

_U_s_a_g_e:

     GBSOption(TypeFlag, S, X, Time, r, b, sigma)
     GBSGreeks(Selection, TypeFlag, S, X, Time, r, b, sigma)
     GBSCharacteristics(TypeFlag, S, X, Time, r, b, sigma)
     GBSVolatility(price, TypeFlag, S, X, Time, r, b, tol, maxiter)
     BlackScholesOption(...)

     Black76Option(TypeFlag, FT, X, Time, r, sigma)

     MiltersenSchwartzOption(TypeFlag, Pt, FT, X, time, Time, 
             sigmaS, sigmaE, sigmaF, rhoSE, rhoSF, rhoEF, KappaE, KappaF)

     NDF(x)
     CND(x)
     CBND(x1, x2, rho)

     ## S3 method for class 'option':
     print(x, ...)
     ## S3 method for class 'option':
     summary(object, ...)

_A_r_g_u_m_e_n_t_s:

       b: the annualized cost-of-carry rate, a numeric value;  e.g. 0.1
          means 10% pa. 

      FT: 

KappaE, KappaF: [MiltersenSchwartz*] - the speed of mean reversion of
          the forward interest rate (E), the speed of mean reversion of
          the convenience yield (F),  a numeric value. 

maxiter, tol: [GBSVolatility*] - the maximum number of iterations and
          the tolerance to compute the root of the GBS volatility
          equation, see 'uniroot'. 

  object: an object of class '"option"'. 

   price: [GBSVolatility*] - the price of the GBS option, a numerical
          value. 

      Pt: [MiltersenSchwartz*] - the zero coupon bond that expires on
          the option maturity; a numeric value. 

       r: the annualized rate of interest, a numeric value;  e.g. 0.25
          means 25% pa. 

rhoSE, rhoSF, rhoEF: [MiltersenSchwartz*] - the correlations  between
          the spot commodity price and the future convenience yield
          (SE), between the spot commodity price and the forward
          interest rate (SF), between the forward interest rate and the
          future convenience yield (EF),  a numeric value. 

       S: the asset price, a numeric value. 

Selection: [GBSGreeks] - sensitivity to be computed, one of '"delta"',
          '"gamma"', '"vega"', '"theta"', '"rho"', or '"CoC"',  a
          string value. 

   sigma: the annualized volatility of the underlying security,  a
          numeric value; e.g. 0.3 means 30% volatility pa. 

sigmaS, sigmaE, sigmaF: [MiltersenSchwartz*] -  numeric values, the
          annualized volatility  of the spot commodity price (S), of
          the future convenience yield (E), and of the forward interest
          rate (F), e.g. 0.25 means 25% pa. 

time, Time: the time to maturity measured in years, a numeric value. 

TypeFlag: a character string either '"c"' for a call option or  a '"p"'
          for a put option. 

x, x1, x2, rho: [NDF][CND][CBND] - the function argument 'x' for the
          normal distribution  function 'NDF' and the cumulated normal
          distribution  'CND'. The arguments for the bivariate function
          are named 'x1' and 'x2'; 'rho' is the correlation
          coefficient. 
           [print] - the object 'x' to be printed. 

       X: the exercise price, a numeric value. 

     ...: arguments to be passed. 

_D_e_t_a_i_l_s:

     *Generalized Black Scholes Options:* 

      'GBSOption' calculates the option price, 'GBSGreeks' calculates
     option sensitivities delta, theta, vega, rho, lambda  and gamma,
     and 'GBScharacterisitics' does both. 'GBSVolatility' computes the
     implied volatility. 
      Note, that setting 'b = r' we get Black and Scholes' stock option
      model, 'b = r-q' we get Merton's stock option model with
     continuous  dividend yield 'q', 'b = 0' we get Black's futures
     option  model, and 'b = r-rf' we get Garman and Kohlhagen's
     currency  option model with foreign interest rate 'rf'. 

     *Options on Futures:* 

      The 'Black76Option' pricing formula is applicable for valuing 
     European call and European put options on commodity futures. The 
     exact nature of the underlying commodity varies and may be
     anything  from a precious metal such as gold or silver to
     agricultural products. 
      The 'Miltersen Schwartz Option' model is a three factor model 
     with stochastic futures prices, term structures and convenience 
     yields, and interest rates. The model is based on lognormal 
     distributed commodity prices and normal distributed continuously 
     compounded forward interest rates and future convenience yields. 

     *Miltersen Schwartz Options:* 

      The 'MiltersenSchwartzOption' function allows for pricing 
     options on commodity futures. The model is a three factor model
     with stochastic futures prices, term structures of convenience 
     yields, and interest rates. The model is based on lognormal
     distributed commodity prices and normal distributed continuously
     compounded forward interest rates and futures convenience yields. 

     *Distribution Functions:* 

      The functions 'NDF', 'CND', and 'CBND' compute  vlues for the
     Normal density functions, for the normal  probability function,
     and for the bivariate normal probability functions. The functions
     are implemented as described in the book of E.G. Haug. 

     *Print and Summary Method:* 

      Thes are two methods to print and sumarize an object of class
     '"option"'.

_V_a_l_u_e:

     'GBSOption'
      'BlackScholesOption' 
      returns the option price, a numeric value.  

     'GBSGreeks' 
      returns the option sensitivity for the selected Greek, a  numeric
     value. 

     'GBSCharacteristics' 
      returns a list with the following entries: 'premium', the option
     price, 'delta', the delta sensitivity,  'gamma', the gamma
     sensitivity, 'theta', the theta sensitivity, 'vega', the vega
     sensitivity,  'rho', the rho sensitivity, 'lambda', the lambda
     sensitivity. 

     'GBSVolatility' 
      returns the GBS option implied volatility for a given price. 

     'Black76Option',
       'MiltersenSchwartzOption' 
      returns the option price, a numeric value.

_N_o_t_e:

     The functions implement algorithms to valuate plain vanilla 
     options and to compute option Greeks as described in Chapter 1  of
     Haug's Option Guide (1997).

_A_u_t_h_o_r(_s):

     Diethelm Wuertz for this R-Port.

_R_e_f_e_r_e_n_c_e_s:

     Black F., Scholes M. (1973); _The Pricing of Options and Corporate
     Liabilities_, Journal of Political Economy 81, 637-654.

     Haug E.G. (1997);  _The Complete Guide to Option Pricing
     Formulas_,  Chapter 1, McGraw-Hill, New York.

     Hull J.C. (1998); _Introduction to Futures and Options Markets_,
     Prentice Hall, London.

     Miltersen K., Schwartz E.S. (1998); _Pricing of Options on
     Commodity Futures with Stochastic Term Structuures of Convenience
     Yields and  Interest Rates_, Journal of Financial and Quantitative
     Analysis 33, 33-59.

_E_x_a_m_p_l_e_s:

     ## All the examples are from Haug's Option Guide (1997)

     ## CHAPTER 1.1: ANALYTICAL FORMULAS FOR EUROPEAN OPTIONS:

     ## Black Scholes Option [Haug 1.1.1]
        xmpOptions("\nStart: Generalized Black Scholes Option > ")
        GBSOption(TypeFlag = "c", S = 60, X = 65, Time = 1/4, r = 0.08, 
          b = 0.08, sigma = 0.30)
             
     ## European Option on a Stock with Cash Dividends [Haug 1.1.2]
        xmpOptions("\nNext: Stock Option with Cash Dividends > ")
        S0  =  100; r  =  0.10; D1  =  D2  =  2; t1  =  1/4; t2  =  1/2
        S  =  S0 - 2*exp(-r*t1) - 2*exp(-r*t2)
        GBSOption(TypeFlag = "c", S = S, X = 90, Time = 3/4, r = r, b = r, 
              sigma = 0.25)
        
     ## Options on Stock Indexes [Haug 1.2.3]
        xmpOptions("\nNext: Options on Stock Indexes > ")
        GBSOption(TypeFlag = "p", S = 100, X = 95, Time = 1/2, r = 0.10, 
          b = 0.10-0.05, sigma = 0.20)  
             
     ## Option on Futures [Haug 1.1.4]
        xmpOptions("\nNext: Option on Futures > ")
        FuturesPrice  =  19
        GBSOption(TypeFlag = "c", S = FuturesPrice, X = 19, Time = 3/4, 
              r = 0.10, b = 0, sigma = 0.28)  
             
     ## Currency Option [Haug 1.1.5]
        xmpOptions("\nNext: Currency Option > ")
        r  =  0.06; rf  =  0.08
        GBSOption(TypeFlag = "c", S = 1.5600, X = 1.6000, 
          Time = 1/2, r = 0.06, b = 0.06-0.08, sigma = 0.12)
             
     ## Delta of GBS Option [Haug 1.3.1]
        xmpOptions("\nNext: Delta of GBS Option > ")
        GBSGreeks(Selection = "delta", TypeFlag = "c", S = 105, X = 100, 
          Time = 1/2, r = 0.10, b = 0, sigma = 0.36)

     ## Gamma of GBS Option [Haug 1.3.3]
        xmpOptions("\nNext: Gamma of GBS Option > ")
        GBSGreeks(Selection = "gamma", TypeFlag = "c", S = 55, X = 60, 
          Time = 0.75, r = 0.10, b = 0.10, sigma = 0.30)
        
     ## Vega of GBS Option [Haug 1.3.4]
        xmpOptions("\nNext: Vega of GBS Option > ")
        GBSGreeks(Selection = "vega", TypeFlag = "c", S = 55, X = 60, 
          Time = 0.75, r = 0.10, b = 0.10, sigma = 0.30)
        
     ## Theta of GBS Option [Haug 1.3.5]
         xmpOptions("\nNext: Theta of GBS Option > ")
         GBSGreeks(Selection = "theta", TypeFlag = "p", S = 430, X = 405, 
          Time = 0.0833, r = 0.07, b = 0.07-0.05, sigma = 0.20)
        
     ## Rho of GBS Option [Haug 1.3.5]
        xmpOptions("\nNext: Rho of GBS Option > ")
        GBSGreeks(Selection = "rho", TypeFlag = "c", S = 72, X = 75, 
          Time = 1, r = 0.09, b = 0.09, sigma = 0.19)
        
     ## CHAPTER 1.3 OPTIONS SENSITIVITIES:
        
     ## The Generalized Black Scholes Option Formula
        xmpOptions("\nNext: Generalized Black Scholes Formula > ")
        GBSCharacteristics(TypeFlag = "p", S = 1.5600, X = 1.6000, 
          Time = 1, r = 0.09, b = 0.09, sigma = 0.19)
       
     ## CHAPTER 1.5: RECENT DEVELOPMENTS IN COMMODITY OPTIONS 

     ## Miltersen Schwartz Option
     ## vs. Black76 Option on Futures:
        xmpOptions("\nNext: Miltersen Schwartz Option > ")
        MiltersenSchwartzOption(TypeFlag = "c", Pt = exp(-0.05/4), FT = 95, 
              X = 80, time = 1/4, Time = 1/2, sigmaS = 0.2660, sigmaE = 0.2490, 
              sigmaF = 0.0096, rhoSE = 0.805, rhoSF = 0.0805, rhoEF = 0.1243, 
              KappaE = 1.045, KappaF = 0.200)
        Black76Option(TypeFlag = "c", FT = 95, X = 80, Time = 1/2, r = 0.05, 
              sigma = 0.266)  

