Miletus.jl

Writing financial contracts in Julia
Author JuliaComputing
Popularity
54 Stars
Updated Last
1 Year Ago
Started In
March 2019

Miletus.jl

Stable

Miletus is a financial contract modelling language written in Julia, based on papers by Peyton Jones and Eber [PJ&E2000],[PJ&E2003] (more closely modelled on the second one).

using Miletus
using Dates: today, Day

s = SingleStock()

d1 = today()
d2 = d1 + Day(120)

# Arguments: Date, Stock, Strike
eucall = EuropeanCall(d2, s, 100.00)
euput  = EuropeanPut(d2, s, 100.00)
amcall = AmericanCall(d2, s, 100.00)
amput  = AmericanPut(d2, s, 100.00)

m = GeomBMModel(d1, 100.00, 0.05, 0.0, 0.1)
value(m, eucall)
value(m, euput)

m = CRRModel(d1,d2,100, 100.00, 0.05, 0.0, 0.1)
value(m, eucall)
value(m, euput)
value(m, amcall)
value(m, amput)

References

Used By Packages

No packages found.