black_scholes: Black-Scholes pricing for call and put options

Description Usage Arguments Value Author(s) References Examples

View source: R/VarSwap.R

Description

This function computes the analytical prices of call and put options using the formulas obtained by Black and Scholes (1973).

Usage

1
black_scholes(S, X, r, t, vol)

Arguments

S

spot price

X

strike price

r

risk-free interest rate

t

time to maturity

vol

volatility

Value

CallPrice

price of a call option

PutPrice

price of a put option

Author(s)

Paolo Zagaglia, paolo.zagaglia@gmail.com

References

Fischer Black and Myron Scholes (1973), "The Pricing of Options and Corporate Liabilities", Journal of Political Economy, 81(3), 637-654.

Examples

1
2
3
4
5
6
S      <- c( 100 )
X      <- c( 70 )
r      <- c( 0.05 )
t      <- c( 50 )
vol    <- c( 0.2 )
prices <- black_scholes(S, X, r, t, vol) 

Example output



VarSwapPrice documentation built on May 2, 2019, 5:50 a.m.