FinancialDerivatives.jl
Financial derivatives modeling and pricing in Julia.
Install / Use
/learn @JuliaQuant/FinancialDerivatives.jlREADME
FinancialDerivatives.jl
| Documentation |Status |License |
|:-----------------:|:----------------------------:|:-----------:|
| |
|
|
💾 Installing
FinancialDerivatives.jl is a registered Julia package and as such you can install it by activating the pkg mode (type ], and to leave it, type <backspace>),
followed by
pkg> add FinancialDerivatives
📓 Usage
To price an European option, simply create a new EuropeanOption and pass it to evaluate with the desired valuation model:
julia> eu_put = EuropeanOption(100.0, 90.0, 0.05, 0.01, 0.3, 180 / 365, false)
EuropeanOption{Float64, Float64, Float64, Float64, Float64, Float64}(100.0, 90.0, 0.05, 0.01, 0.3, 0.4931506849315068, false)
julia> eu_md = EquityMarketData(; spot_price=100.0, risk_free_rate=0.05, dividend_yield=0.01, volatility=0.3)
EquityMarketData{Float64, Float64, Float64, Float64}(100.0, 0.05, 0.01, 0.3)
julia> price(AnalyticEngine(), eu_put, BlackScholes(), eu_md)
3.3455749727441635
