Financial math test vector validation
Project description
finlint
Financial math test vectors for Python. Validate that your Decimal arithmetic produces correct, verified results.
Install
pip install finlint
Usage
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 suiterun_vector(vector, impl)— Run one vector against an implementationrun_suite(name, impl)— Run all vectors in a suiteparse_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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
finlint-1.0.0.tar.gz
(36.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
finlint-1.0.0-py3-none-any.whl
(35.3 kB
view details)
File details
Details for the file finlint-1.0.0.tar.gz.
File metadata
- Download URL: finlint-1.0.0.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3139478275dc62eec9003dd07319e0c922a2952499217f92f59de766552bee48
|
|
| MD5 |
59c51eaa15d7bf360f9fd90d95969d05
|
|
| BLAKE2b-256 |
db94d70839273b4d255e1b1103faad5e68326b1bc0188a02a27935791b80cbee
|
File details
Details for the file finlint-1.0.0-py3-none-any.whl.
File metadata
- Download URL: finlint-1.0.0-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d9294c24587a4e7fd62912e9de0404205c77caa5ef415f45712036b5053db0c
|
|
| MD5 |
da494ec9f677858b8a2eb53006f807c2
|
|
| BLAKE2b-256 |
11dda2c85b12f5c17ed2464f1be18ce64f4504de737fd4b7bafb21cacf8ffffe
|