Skip to content

Tour the repository

This page is a map of the hello-chelis repository: where each topic lives. The five lessons and Read a larger calculation teach the calls themselves. Nearly every module under src/ has a test of the same name under tests/ with fixed inputs and expected values. To run any module, follow the setup on the capstones page and call its exported functions from a file in the checkout's root.

src/basics/ has one small module per feature:

ModuleWhat it shows
hellotensorDimensions in the type, and no implicit broadcasting.
pipeandmatchAn algebraic data type, an exhaustive match, and the |> pipe.
modulesandimportsSelective and glob imports.
dimpolyFunctions polymorphic over dimensions.
precisioncastExplicit cast between precisions.
effectsrandomExplicit random keys, deterministic replay, and split_key.
linearityOwned tensors, &tensor borrows, and copy.
gradbasicgrad(f, wrt=w).
vmapLifting a per-example function over a batch.
jitrealizerealize beside an eager baseline.
macrobasicA macro that expands to typed Deep.

src/std/ covers elementwise math, normalization, axis reductions, exact Decimal arithmetic, dates, collections and iteration, and effect-typed file I/O. The runtime and standard library reference teaches these calls, with signatures, argument domains and failure behavior.

src/coral/ uses Coral: typed columns, group_by, joins, rolling windows, reshape, and CSV and JSON I/O. The Coral docs teach each of these calls.

src/nautilus/ calls Nautilus: special functions, distributions, linear algebra, ODE and SDE solvers, optimization, hypothesis tests and curve fitting. The Nautilus docs give their signatures and worked calls.

Beside the three modules on Read a larger calculation, src/capstone/ has three calculations built on Shoals, the Chelis library for quantitative finance (curves, option pricing and risk):

  • yieldcurve bootstraps a zero curve from par yields, prices a bond on it, and computes DV01 and key-rate risk.
  • americanput prices one American put three ways: a binomial tree, a Crank-Nicolson grid, and Barone-Adesi-Whaley solved with a Nautilus root finder.
  • varbacktest computes historical and parametric VaR and CVaR, and runs Kupiec and Christoffersen backtests of a rolling and an EWMA model.

The Shoals docs teach the curve, pricing and risk calls these modules use.

verify/ holds standalone programs that chelis build compiles to native code, links against the Chelis runtime, and runs.