Skip to main content

Deterministic financial maths formula library

Project description

Fina Maths Lib

Deterministic financial mathematics library for FinBench with explicit formula functions and registry-backed lookup.

Library Name

  • PyPI/Package name: fina-maths-lib
  • Python import name: maths_lib

Parent Repository

This library is prepared as a sub-module/component for:

Author

  • Potheesh Vignesh K

Contact

  • Email: kpotheeshvignesh@gmail.com

Highlights

  • Total formulas: 1500
  • Explicit formula functions (no hidden dynamic-only API)
  • Domain-wise module organization
  • Central registry for formula metadata and callable access
  • Deterministic test suite with uniqueness/overlap checks

Project Structure

  • src/maths_lib/ - source package
  • tests/maths_lib/ - exhaustive tests
  • PDR_maths_lib.md - requirement document
  • formula_registry.py - source registry reference

Setup

python -m venv .venv
.\.venv\Scripts\python -m pip install -U pip
.\.venv\Scripts\python -m pip install -r requirements.txt

Build Package

.\.venv\Scripts\python -m build

Note: run only python -m build (do not append extra words like success).

Run Tests

.\.venv\Scripts\python -m pytest tests\ -v

Registry Usage

import maths_lib as ml

print(len(ml.FORMULA_REGISTRY))
result = ml.FORMULA_REGISTRY["gross_margin"](revenue=1000, cogs=600)
print(result.value, result.valid)

Notes

  • Formula IDs are unique across all domains.
  • Expressions are evaluated via deterministic expression engine in base.py.
  • Tests include per-formula deterministic execution and registry integrity checks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fina_maths_lib-0.1.1.tar.gz (137.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fina_maths_lib-0.1.1-py3-none-any.whl (145.4 kB view details)

Uploaded Python 3

File details

Details for the file fina_maths_lib-0.1.1.tar.gz.

File metadata

  • Download URL: fina_maths_lib-0.1.1.tar.gz
  • Upload date:
  • Size: 137.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for fina_maths_lib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f0c2667178432b11728181404c59930f5a16dade0ed2a052fe71b1771ee26bdc
MD5 17c66b0e684c59533ed41f728ebecc69
BLAKE2b-256 35c01794ce5180a53a4290bd46897bcfe516c3f25ea4720bca8255b9e5b8d7a5

See more details on using hashes here.

File details

Details for the file fina_maths_lib-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fina_maths_lib-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 145.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for fina_maths_lib-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3bbf40ad265a26b22bf1a3b5d3fdacc8fae25e430a7abd4c187f8f16625c67e9
MD5 43b8c18403c77eb8ed5d3f6651348f9f
BLAKE2b-256 7cd93c2da5e0915374ec3675f5c00012dcbf72e6cdfd2009105e6c8fe79de6d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page