Skip to main content

Advanced finance algorithm registry and implementation library for FinBench

Project description

fina-algo-lib

Advanced financial algorithm library for FinBench.

Package Metadata

  • Package: fina-algo-lib
  • Import: fina_algo_lib
  • Version: 0.2.0
  • Author: Potheesh Vignesh K
  • Parent Project: FinBench

What It Provides

  • Retrieval: BM25, RRF, cosine similarity, overlap rerank scoring
  • ML helpers: kmeans, weighted ensemble, model contribution scoring
  • Statistics: regression, Newton solver, IRR, CAGR, z-score
  • Valuation: NPV, DCF, WACC, scenario/sensitivity analysis
  • Fixed income: bond pricing, YTM, duration, convexity
  • Risk: rolling/EWMA vol, Sharpe, Sortino, VaR/CVaR, drawdown
  • Time-series: smoothing, trend, outliers, anomaly detection, corr/cov
  • Optimization: projected gradient step, mean-variance score, risk parity
  • Central domain registry for algorithm lookup

Install (Development)

python -m venv .venv
.venv\\Scripts\\python -m pip install --upgrade pip
.venv\\Scripts\\pip install -r requirements-dev.txt
.venv\\Scripts\\pip install -e .

Install (Standard)

python -m venv .venv
.venv\\Scripts\\python -m pip install --upgrade pip
.venv\\Scripts\\pip install .

Install (Wheel)

python -m build
python -m venv .venv
.venv\\Scripts\\python -m pip install --upgrade pip
.venv\\Scripts\\pip install dist\\fina_algo_lib-0.2.0-py3-none-any.whl

Usage

from fina_algo_lib.registry import get_algorithm

wacc = get_algorithm("wacc")
print(wacc(60, 40, 0.12, 0.08, 0.25))

CLI

fina-algo
fina-algo --format json
python -m fina_algo_lib --format json

Release Artifacts

python -m build

This generates:

  • dist/fina_algo_lib-0.2.0.tar.gz
  • dist/fina_algo_lib-0.2.0-py3-none-any.whl

Quality Gates

.venv\\Scripts\\ruff check src tests
.venv\\Scripts\\mypy src
.venv\\Scripts\\pytest tests/ -v

Benchmark

.venv\\Scripts\\python benchmarks\\benchmark_registry.py

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_algo_lib-0.2.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

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

fina_algo_lib-0.2.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file fina_algo_lib-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for fina_algo_lib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9e9659834066b32a93e71120d8d1d9525cdf9bba34ab86ae20eddb7c65139d8a
MD5 a8f55b7984a0cfaf11663415bfaa4664
BLAKE2b-256 448daf2cbfd28727d6bd40c7d06b7e38883a49652379bb95dd74b483df2fdcd5

See more details on using hashes here.

File details

Details for the file fina_algo_lib-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for fina_algo_lib-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6adce82989ca21a03d0479aa8b235c039c385665ae5671ca53b5b421ec235693
MD5 d3d3ff29c6f46f3b892ce6b88a4ae1f6
BLAKE2b-256 dbe7b673afde117fd86392f1aa53192e68a5b577b1746ebecb00068833734756

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