Popularity
83 Stars
Updated Last
5 Months Ago
Started In
March 2019

Miletus.jl

Stable version

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