options functions

option pricing and the greeks — deepcalc originals, no excel equivalent.

functionsignaturewhat it doestests
ASIAN.CALL ASIAN.CALL(S, K, T, r, sigma, n_avg) Asian call on the geometric average of n_avg observations (exact closed form; approximates the arithmetic Asian) 2
BARRIER.CALL BARRIER.CALL(S, K, T, r, sigma, H, barrier_type) barrier call option: type 1=down-and-out, 2=down-and-in, 3=up-and-out, 4=up-and-in (Hull ch. 26 formulas) 3
BINOMIAL.AMERICAN.PUT BINOMIAL.AMERICAN.PUT(S, K, T, r, sigma, steps) binomial tree American put option price 1
BINOMIAL.CALL BINOMIAL.CALL(S, K, T, r, sigma, steps) binomial tree call option price 3
BINOMIAL.PUT BINOMIAL.PUT(S, K, T, r, sigma, steps) binomial tree put option price 3
BS.CALL BS.CALL(S, K, T, r, sigma) Black-Scholes call option price 14
BS.CALL.DIVIDEND BS.CALL.DIVIDEND(S, K, T, r, sigma, q) Black-Scholes call option with dividend yield 3
BS.IMPLIED_VOL.CALL BS.IMPLIED_VOL.CALL(price, S, K, T, r) implied volatility from call option price 1
BS.IMPLIED_VOL.PUT BS.IMPLIED_VOL.PUT(price, S, K, T, r) implied volatility from put option price 1
BS.PUT BS.PUT(S, K, T, r, sigma) Black-Scholes put option price 5
BS.PUT.DIVIDEND BS.PUT.DIVIDEND(S, K, T, r, sigma, q) Black-Scholes put option with dividend yield 2
DELTA.CALL DELTA.CALL(S, K, T, r, sigma, [q]) delta of call option (rate of change with respect to underlying price) 3
DELTA.PUT DELTA.PUT(S, K, T, r, sigma, [q]) delta of put option 1
DIGITAL.CALL DIGITAL.CALL(S, K, T, r, sigma) digital (binary) call option that pays fixed amount 2
OPT.GAMMA OPT.GAMMA(S, K, T, r, sigma, [q]) gamma of option (rate of change of delta) 1
OPT.VEGA OPT.VEGA(S, K, T, r, sigma, [q]) vega of option (sensitivity to volatility) 1
RHO.CALL RHO.CALL(S, K, T, r, sigma, [q]) rho of call option (sensitivity to interest rate) 2
RHO.PUT RHO.PUT(S, K, T, r, sigma, [q]) rho of put option (sensitivity to interest rate) 1
THETA.CALL THETA.CALL(S, K, T, r, sigma, [q]) theta of call option (time decay) 2
THETA.PUT THETA.PUT(S, K, T, r, sigma, [q]) theta of put option (time decay) 1