FinancialDerivatives.FinancialDerivatives
— ModuleThe FinancialDerivatives
module provides convenient models for pricing financial derivatives in Julia.
FinancialDerivatives.AmericanOption
— TypeAmericanOption(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
— TypeAsianOption(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.BlackKarasinski
— TypeBlackKarasinski()
FinancialDerivatives.BlackScholes
— TypeBlackScholes()
FinancialDerivatives.BrennanSchwartz
— TypeBrennanSchwartz()
FinancialDerivatives.CoxIngersollRoss
— TypeCoxIngersollRoss()
FinancialDerivatives.CoxRossRubinstein
— TypeCoxRossRubinstein()
Cox-Ross-Rubinstein binomial model (aka Binomial options pricing model).
FinancialDerivatives.EuropeanOption
— TypeEuropeanOption(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
— TypeFXOption(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
FinancialDerivatives.GarmanKohlhagen
— TypeGarmanKohlhagen()
FinancialDerivatives.InterestRateDerivative
— TypeInterestRateDerivative(k, r, σ, θ, t)
Arguments
k
: speed of reversionr
: initial interest rateσ
: instantaneous volatilityθ
: long term mean levelt
: time interval
FinancialDerivatives.JarrowRudd
— TypeJarrowRudd()
FinancialDerivatives.LeisenReimer
— TypeLeisenReimer()
FinancialDerivatives.LongstaffSchwartz
— TypeLongstaffSchwartz()
FinancialDerivatives.RendlemanBartter
— TypeRendlemanBartter()
FinancialDerivatives.Tian
— TypeTian()
FinancialDerivatives.Vasicek
— TypeVasicek()
FinancialDerivatives.evaluate
— Functionevaluate(IRD, BrennanSchwartz(), n = 12)
Evaluate interest rate derivative IRD
using BrennanSchwartz
model.
Arguments
IRD::InterestRateDerivative
: interest rate derivativen
: number of paths to simulate
FinancialDerivatives.evaluate
— Functionevaluate(IRD, CoxIngersollRoss(), n)
Evaluate interest rate derivative IRD
using CoxIngersollRoss
model.
Arguments
IRD::InterestRateDerivative
: interest rate derivativen
: number of paths to simulate
FinancialDerivatives.evaluate
— Functionevaluate(O, RendlemanBartter(), k = 1, N = 1000)
Evaluate option O
using RendlemanBartter
model.
Arguments
k
:N
:
FinancialDerivatives.evaluate
— Functionevaluate(O, Tian(), N = 1000)
Evaluate option O
using Tian
binomial model.
Arguments
N
: number of paths to simulate
FinancialDerivatives.evaluate
— Functionevaluate(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
:true
if risk neutral,false
if equal probability.N
: number of paths to simulate
FinancialDerivatives.evaluate
— Functionevaluate(O, CoxRossRubinstein(), N = 1000)
Evaluate option O
using CoxRossRubinstein
.
Arguments
O::Option
: optionN
: number of paths to simulate
FinancialDerivatives.evaluate
— Functionevaluate(O, LeisenReimer(), N = 1001)
Evaluate option O
using LeisenReimer
binomial model.
Arguments
N
: number of paths to simulate, must be odd
FinancialDerivatives.evaluate
— Functionevaluate(IRD, RendlemanBartter(), n = 12)
Evaluate interest rate derivative IRD
using RendlemanBartter
model.
Arguments
n
: number of paths to simulate
FinancialDerivatives.evaluate
— Functionevaluate(IRD, BlackKarasinski(), n = 12)
Evaluate interest rate derivative using BlackKarasinski
model.
Arguments
IRD::InterestRateDerivative
: interest rate derivativen
: number of paths to simulate
FinancialDerivatives.evaluate
— Functionevaluate(O, LongstaffSchwartz(), N = 1000, P = 10000)
Evaluate option O
using LongstaffSchwartz
binomial model.
Arguments
N
: number of paths to simulateP
: number of periods
FinancialDerivatives.evaluate
— Functionevaluate(IRD, Vasicek(), n = 12)
Evaluate interest rate derivative IRD
using Vasicek
model.
Arguments
n
: number of paths to simulate
FinancialDerivatives.evaluate
— Methodevaluate(O, BlackScholes())
Evaluate option O
using BlackScholes
model.
Arguments
O::Option
: Option
FinancialDerivatives.evaluate
— Methodevaluate(o)
Evaluate option o
using Back-Scholes model as default valuation model.
FinancialDerivatives.evaluate
— Methodevaluate(O::FXOption, GarmanKohlhagen())
Evaluate FX Option using GarmanKohlhagen
model.
Arguments
O::FXOption
FinancialDerivatives.Derivative
— TypeAbstract type for derivative contract.
FinancialDerivatives.Forward
— TypeAbstract type for forward contract.
FinancialDerivatives.Future
— TypeAbstract type for futures contract.
FinancialDerivatives.Option
— TypeAbstract type for option.
FinancialDerivatives.Swap
— TypeAbstract type for swap.
FinancialDerivatives.Swaption
— TypeAbstract type for swaption.