Script:
~addons/finexec/finexec/options/blackscholes.ijs
Contributor: William Szuch
Updated: 2022 6 26
Depend: ~addon/stats/distribs/distribs.ijs
Definitions: loaded to locale: base
Status: done
Script source:
blackscholes.ijs
Black-Scholes option pricing models.

Definitions
bsGKCurrencyOption (monad)
Black-Scholes/Garman-Kohlhagen currency option
pricing model.
Result is the Call and Put premiums.
Syntax
bsGKCurrencyOption(Sp;Sr;Fp;T;V;F)
St = Strike price (ie: exercise price)
Sp = Spot rate
Fp = Forward outright price
T = Time to expiry of the option as a proportion of a year(365 days)
V = Annualised volatility
F = Yearly force of interest rate (ie: continously compounding)
Example
bsGKCurrencyOption(1.19;1.20;1.21;(91%365);0.09;0.0654)
0.0324408 0.0127642
bsNonDividend (monad)
Black-Scholes option pricing model for a
non-dividend paying asset.
European option
Result is the Call and Put premiums.
Syntax
bsNonDividend(St;Sp;T;V:F)
St = Strike price (ie: exercise price)
Sp = Spot price
T = Time to expiry of the option as a proportion of a year(365 days)
V = Annualised volatility
F = Yearly force of interest rate (ie: continously compounding)
Example
bsNonDividend(1.004;1.0;0.25;0.0298;0.0598505)
0.0129008 0.00199015
bsNonDividend(40;42;0.5;0.2;0.10)
4.75942 0.808599