BS_call

0th

Percentile

European Call Option Price and the Inverse

Computes the European call option and the inverse. All vectors with length greater than one needs to have the same length.

Usage
BS_call(V, D, T., r, vol)

get_underlying(S, D, T., r, vol, tol = 1e-12)

Arguments
V

numeric vector or scalar with price of the underlying asset.

D

numeric vector or scalar with debt due in T..

T.

numeric vector or scalar with time to maturity.

r

numeric vector or scalar with risk free rates.

vol

numeric vector or scalar with volatilities, \(\sigma\)s.

S

numeric vector with observed stock prices.

tol

numeric scalar with tolerance to get_underlying. The difference is scaled if the absolute of S is large than tol as in the tolerance argument to all.equal.numeric.

Value

Numeric vector or scalar with price of the underlying asset or equity price.

See Also

BS_fit

Aliases
  • BS_call
  • get_underlying
Examples
# NOT RUN {
library(DtD)
set.seed(58661382)
sims <- BS_sim(
  vol = .2, mu = .03, dt = .1, V_0 = 100, T. = 1, D = rep(80, 20), r = .01)

stopifnot(with(
  sims, isTRUE(all.equal(V, get_underlying(S, D, T, r, vol)))))
stopifnot(with(
  sims, isTRUE(all.equal(S, BS_call(V, D, T, r, vol)))))

# }
Documentation reproduced from package DtD, version 0.2.1, License: GPL-2

Community examples

Looks like there are no examples yet.