Skip to main content

Standard financial flow models

Project description

finance flow

Standard financial flow models

Build Status codecov License PyPI

Overview

finance-flow provides reusable finance-specific callable models, schemas, and transformations. It owns provider-neutral research and portfolio workflow logic: normalize market data, validate finance structures, build universes, calculate signals, produce target positions, backtest, and generate reports.

It does not own extraction credentials, provider clients, storage destinations, or application orchestration. Those concerns belong in finance-etl, connector packages, or downstream applications.

Quick Start

Normalize provider-shaped daily aggregate rows into typed daily bars:

from finance_flow import normalize_massive_daily_bars

bars = normalize_massive_daily_bars(
    {
        "results": [
            {"T": "AAPL", "o": 184.22, "h": 185.88, "l": 183.43, "c": 184.95, "v": 58414500}
        ]
    },
    ticker="AAPL",
    session_date="2024-01-03",
)

Use the callable wrapper when composing the transform inside a ccflow graph:

from finance_flow import MassiveDailyBarsNormalizeContext, MassiveDailyBarsNormalizeModel

result = MassiveDailyBarsNormalizeModel()(
    MassiveDailyBarsNormalizeContext(
        payload=[{"ticker": "AAPL", "open": 1, "high": 2, "low": 1, "close": 2, "volume": 100}],
        ticker="AAPL",
        session_date="2024-01-03",
    )
)

Documentation

Dependency Contract

  • Depends on ccflow for callable model integration and may depend on dataframe and validation libraries needed for finance transformations.
  • May be consumed by finance-etl and application-specific packages.
  • Must not depend on connector packages unless a transformation genuinely needs optional I/O support, and must not depend on application-specific packages.

Test Convention

Default tests should use small synthetic finance datasets and run without external services or provider credentials.

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

finance_flow-0.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

finance_flow-0.1.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: finance_flow-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for finance_flow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c0ea996a0a3340b5e626eed151eeb630b18c24295f65a721584e108676320f0
MD5 ea34a938cab416786bef972cd454f9d1
BLAKE2b-256 935145b2e28e700b042670bd3fb71401056fe0a8d79dea6601bf44e737a0da61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: finance_flow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for finance_flow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1982f900f51a2acdc83bf8974d54668241072101b2e118ab89196e403e5880d7
MD5 068410d2ecc667402f293627ff6cd6dc
BLAKE2b-256 aefe4e7b7d554bd74f980f48fc3a8d3d538857fbd734c95c2fb49120454b00e9

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