Learn R Programming

RTL (version 1.3.7)

GBSOption: Generalized Black-Scholes (GBS) Option Pricing Model

Description

Computes the price and Greeks of European call and put options using the Generalized Black-Scholes model.

Usage

GBSOption(S, X, T2M, r, b, sigma, type = "call")

Value

A list containing the following elements:

  • price: The price of the option.

  • delta: The sensitivity of the option's price to a change in the price of the underlying asset.

  • gamma: The rate of change in the delta with respect to changes in the underlying price.

  • vega: The sensitivity of the option's price to the volatility of the underlying asset.

  • theta: The sensitivity of the option's price to the passage of time.

  • rho: The sensitivity of the option's price to the interest rate.

Arguments

S

numeric, the current stock price (also known as the underlying asset price).

X

numeric, the strike price of the option.

T2M

numeric, the time to maturity (in years). Previously denoted as T.

r

numeric, the risk-free interest rate (annualized).

b

numeric, the cost of carry, b = r - q for dividend paying assets, where q is the dividend yield rate.

sigma

numeric, the volatility of the underlying asset (annualized).

type

character, the type of option to evaluate, either "call" or "put". Default is "call".

Examples

Run this code
GBSOption(S = 100, X = 100, T2M = 1, r = 0.05, b = 0.02, sigma = 0.2, type = "call")

Run the code above in your browser using DataLab