# finlint

Financial math test vectors for Python. Validate that your Decimal arithmetic produces correct, verified results.

## Install

```bash
pip install finlint
```

## Usage

```python
from decimal import Decimal
from finlint.vectors import run_suite

def allocate(amount, parts, method):
    base = amount.quantize(Decimal('0.01'))
    # ... your allocation logic
    return {"splits": splits, "sum": total}

# Run all allocation vectors
run_suite("allocation", allocate)
```

## API

- `load_suite(name)` — Load vectors for a named suite
- `run_vector(vector, impl)` — Run one vector against an implementation
- `run_suite(name, impl)` — Run all vectors in a suite
- `parse_decimal_values(obj)` — Recursively parse string values to Decimal

## Available Suites

allocation, rounding, aggregation, percentage, gain-loss, ratio, weighted-average, serialization

## License

Apache-2.0 — [github.com/kanso-finance/finlint](https://github.com/kanso-finance/finlint)
