Powered: Price of a Powered Option

View source: R/Powered.R

PoweredR Documentation

Price of a Powered Option

Description

Compute the price of a powered option

Usage

Powered(s, K, r, b, v, p, t, type)

Arguments

s

price of the underlying

K

strike price

r

risk free rate

b

cost of carrying rate

v

volatility

p

power

t

maturity of the option

type

type of option "C" or "P"

Details

Esser (2003) describes how to value these options

Value

price of a powered option given the underlying price s, the strike price K, the risk free ratem the cost of carrying ratem the volatility v, the power p, the time to maturity of the option t and the type of option call "C" or put "P"

Author(s)

Colzani Luca, Magni Marta, Mancassola Gaia, Kakkanattu Jenson

References

Espen Gaarder Haug(2007):The Complete Guide to Option Pricing Formulas

Examples

Powered(100,100,0.1,0.07,0.1,2,0.5,"C")
## The function is currently defined as
function (s, K, r, b, v, p, t, type) 
{
    price <- 0
    if (type == "C") {
        for (j in 1:p) {
            d <- (log(s/K) + (b + (p - j - 0.5) * v^(2)) * t)/(v * 
                sqrt(t))
            price <- price + choose(p, j) * s^(p - j) * (-K)^(j) * 
                exp((p - j - 1) * (r + (p - j) * v^(2)/2)*t - 
                  (p - j) * (r - b) * t) * pnorm(d)
        }
    }
    if (type == "P") {
        for (j in 1:p) {
            d <- (log(s/K) + (b + (p - j - 0.5) * v^(2)) * t)/(v * 
                sqrt(t))
            price <- price + choose(p, j) * (-s)^(p - j) * (K)^(j) * 
                exp((p - j - 1) * (r + (p - j) * v^(2)/2)*t - 
                  (p - j) * (r - b) * t) * pnorm(-d)
        }
    }
    return(round(price, 2))
  }

Lcolzani98/OptionPricingFunctions documentation built on June 13, 2022, 5:46 a.m.