API
Derivatives
AmericanOption(s, k, r, σ, t, call)Arguments
s: underlying pricek: strike pricer: risk-free interest rateσ: volatilityt: time to expirationcall: 1 if call, -1 if put
FinancialDerivatives.AsianOption — Type.AsianOption(s, k, r, σ, t, call)Arguments
s: underlying pricek: strike pricer: risk-free interest rateσ: volatilityt: time to expirationcall: 1 if call, -1 if put
EuropeanOption(s, k, r, σ, t, call)Arguments
s: underlying pricek: strike pricer: risk-free interest rateσ: volatilityt: time to expirationcall: 1 if call, -1 if put
FinancialDerivatives.FXOption — Type.FXOption(s, k, r_d, r_f, σ, t, call)Arguments
s: underlying pricek: strike pricer_d: domestic risk-free interest rater_f: foreign risk-free interest rateσ: volatilityt: time to expirationcall: 1 if call, -1 if put
InterestRateDerivative(k, r, σ, θ, t)Arguments
k: speed of reversionr: initial interest rateσ: instantaneous volatilityθ: long term mean levelt: time interval
Models
BlackKarasinski()BlackScholes()BrennanSchwartz()CoxIngersollRoss()CoxRossRubinstein()Cox-Ross-Rubinstein binomial model (aka Binomial options pricing model).
GarmanKohlhagen()FinancialDerivatives.JarrowRudd — Type.JarrowRudd()LeisenReimer()LongstaffSchwartz()RendlemanBartter()FinancialDerivatives.Tian — Type.Tian()FinancialDerivatives.Vasicek — Type.Vasicek()Evaluation
FinancialDerivatives.evaluate — Function.evaluate(IRD, BlackKarasinski(), n = 12)Evaluate interest rate derivative using BlackKarasinski model.
Arguments
IRD::InterestRateDerivative: interest rate derivativen: number of paths to simulate
evaluate(O, BlackScholes())Evaluate option O using BlackScholes model.
Arguments
O::Option: Option
evaluate(o)Evaluate option o using Back-Scholes model as default valuation model.
evaluate(IRD, BrennanSchwartz(), n = 12)Evaluate interest rate derivative IRD using BrennanSchwartz model.
Arguments
IRD::InterestRateDerivative: interest rate derivativen: number of paths to simulate
evaluate(IRD, CoxIngersollRoss(), n)Evaluate interest rate derivative IRD using CoxIngersollRoss model.
Arguments
IRD::InterestRateDerivative: interest rate derivativen: number of paths to simulate
evaluate(O, CoxRossRubinstein(), N = 1000)Evaluate option O using CoxRossRubinstein.
Arguments
O::Option: optionN: number of paths to simulate
evaluate(O::FXOption, GarmanKohlhagen())Evaluate FX Option using GarmanKohlhagen model.
Arguments
O::FXOption
evaluate(O, JarrowRudd(), risk_neutral = true, N = 1000)Evaluate option O using JarrowRudd binomial model (defaults to the risk-neutral version).
Arguments
O::Option: optionrisk_neutral:trueif risk neutral,falseif equal probability.N: number of paths to simulate
evaluate(O, LeisenReimer(), N = 1001)Evaluate option O using LeisenReimer binomial model.
Arguments
N: number of paths to simulate, must be odd
evaluate(O, LongstaffSchwartz(), N = 1000, P = 10000)Evaluate option O using LongstaffSchwartz binomial model.
Arguments
N: number of paths to simulateP: number of periods
evaluate(IRD, RendlemanBartter(), n = 12)Evaluate interest rate derivative IRD using RendlemanBartter model.
Arguments
n: number of paths to simulate
evaluate(O, RendlemanBartter(), k = 1, N = 1000)Evaluate option O using RendlemanBartter model.
Arguments
k:N:
evaluate(O, Tian(), N = 1000)Evaluate option O using Tian binomial model.
Arguments
N: number of paths to simulate
evaluate(IRD, Vasicek(), n = 12)Evaluate interest rate derivative IRD using Vasicek model.
Arguments
n: number of paths to simulate
Private
FinancialDerivatives.Derivative — Type.Abstract type for derivative contract.
FinancialDerivatives.Forward — Type.Abstract type for forward contract.
FinancialDerivatives.Future — Type.Abstract type for futures contract.
FinancialDerivatives.Option — Type.Abstract type for option.
FinancialDerivatives.Swap — Type.Abstract type for swap.
FinancialDerivatives.Swaption — Type.Abstract type for swaption.