Metadata-Version: 2.4
Name: halley
Version: 0.0.1
Summary: Actuarial projection engine in Python: models are checked before they run and compiled when they do.
Keywords: actuarial,insurance,projection,cash flow,IFRS 17
Author: Sahil Haridas
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Dist: numpy>=2.0
Requires-Dist: pyarrow>=17
Requires-Python: >=3.12
Project-URL: Homepage, https://halley.kndra.co.za
Project-URL: Documentation, https://halley.kndra.co.za
Description-Content-Type: text/markdown

# Halley

Actuarial projection engine in Python. Models are checked before they run and compiled when they do.

A model is a Python class. Building it traces the formulas into a typed dependency graph, checks
units, time references and calculation order, then generates vectorised code that runs over every
policy and scenario. Every run writes a manifest so any result can be reproduced exactly.

Status: prototype, milestone M0 (repository skeleton). Nothing runs a model yet.

Documentation: <https://halley.kndra.co.za>. Install with `pip install halley` (Python 3.12+).

## Development

Requires [uv](https://docs.astral.sh/uv/). Python 3.12 is pinned in `.python-version`.

```bash
uv sync
uv run pytest
uv run ruff check .
uv run pyright
```

## Layout

| Path | Role |
|---|---|
| `src/halley/authoring` | `Product`, `@var`, `where()`, `Static[...]`, unit types |
| `src/halley/tracing` | runs model methods once with symbolic `t` to capture the graph |
| `src/halley/ir` | typed graph: variables, time offsets, dimensions, source locations |
| `src/halley/checker` | units, time references, recursion direction, cycles, data contracts |
| `src/halley/scheduler` | orders strongly connected components, assigns time direction |
| `src/halley/codegen` | NumPy reference backend, then Numba |
| `src/halley/runtime` | data loading, batches, outputs, run manifest |
| `src/halley/aggregation` | group-level stage; IFRS 17 CSM roll-forward first |

## Licence

Apache 2.0. See `LICENSE`.
