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.0.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.0-py3-none-any.whl (145.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fina_maths_lib-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 4147e40996e30bdfbe609174b87b204a8a714ed54a9ff913df6e6070a4938645
MD5 ead5b2ec1cc9bf7902dd97304d491f4a
BLAKE2b-256 ece6c83f7064efdf10c124411c52e248babcbdb7d393b8a5b881bd859b46b8cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fina_maths_lib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 145.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52feb1d79f96b032a7de01f93ef45b07196c49f5872e6a3df8434209e3fdde9c
MD5 deed9027b6f21762c3a3b3c9a23b8a99
BLAKE2b-256 e7d8846dd860b62bb67feb55b0a4e3e0a6b9b4c49cc5d5050603063978d5d4e3

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