A Julia package for quantitative finance.
Find a file
2025-11-17 07:51:08 +01:00
benchmarks benchy 2025-10-22 17:30:49 +02:00
docs md 2025-07-28 00:07:25 +01:00
examples tutanota (wink) 2025-11-14 13:39:53 +01:00
src refresh fotografi 2025-11-17 07:51:08 +01:00
test fixing bugs 2025-11-14 00:40:02 +01:00
.gitignore inin 2025-03-26 14:16:50 +01:00
citation.bib cite me 2025-08-15 18:46:29 +01:00
HISTORY.md refactor S and add tests for IR 2025-10-31 05:25:03 +01:00
LICENSE.md .mding LICENSE 2025-08-26 11:28:14 +02:00
NEWS.md trun the sign-up 2025-10-14 16:34:29 +02:00
Project.toml bump version 2025-10-26 14:36:10 +01:00
README.md readme 2025-10-22 06:38:18 +01:00

Zsofia.jl

license-badge

A Julia Programming Language package for applications in quantitative finance. Various quants, traders, asset managers and financial advisors workflows are implemented in Zsofia for strategy building, asset monitoring, fair valuations assessment of portofolio of financial derivatives as well as their sensitivities and valuation adjustments (xVAs).

Get started

Installation

The package is not yet registered to the General Registry so that one can add it locally by cloning the code from this repo using the following command. From a Julia REPL's, get to the package manager by doing ] from an empty console, then install Zsofia by entering:

add https://codeberg.org/SoelPhilippe/Zsofia.jl#fjur

Still in development, may experience gotchas...

Zsofia (re)exports Dates and StatsBase which are Julia's standard library facilities as well as the very useful DataFrames authored by Pr. Bogùl Kaminski.

Fetch intraday Stocks and Futures

Build YieldCurves and some valuations`

Let's built a 5y-term DiscountCurve and use it to discount some Cashflows:

rawdata = begin
"""
Term,Dfct,What
2025-03-31,1.0,DF
2025-04-01,0.999877949144805,DF
2025-04-07,0.9991455799729398,DF
2025-04-14,0.9982918542612047,DF
2025-04-30,0.9963427397186984,DF
2025-06-02,0.9924624938183659,DF
2025-06-30,0.989236993105479,DF
2025-07-31,0.9856913798669321,DF
2025-09-01,0.9821191855956374,DF
2025-09-30,0.9789441189194495,DF
2025-10-31,0.9755819586938064,DF
2025-12-01,0.9722678817826153,DF
2025-12-31,0.9691144550722521,DF
2026-02-02,0.9656696213924191,DF
2026-03-02,0.9627843072054584,DF
2026-03-31,0.9598218570633291,DF
2026-06-30,0.9506423766560257,DF
2026-09-30,0.941517925110313,DF
2027-03-31,0.9237438426472184,DF
2028-03-31,0.888759851178729,DF
2029-04-03,0.8545059001387839,DF
2030-04-01,0.8214654060005419,DF
"""
end |> (input -> read_csv(IOBuffer(input),DataFrame))

Setting Input Data

tenors = let t0=rawdata.Term[begin]
  map(rawdata.Term[2:end]) do term
    Tenor(term - t0)
  end
end

begin
  dfcts = copy(rawdata.Dfct[2:end])
  ccy   = Currency("GBP")
  inc   = first(rawdata.Term)
end

Instantiate a DiscountCurve

dc = DiscountCurve(tenors,dfcts,inc; title="OIS-GBP");