Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

XXFIN

Install

Install the consumer package only:

pip install py10x-fin-base
# or: uv pip install py10x-fin-base

That pulls py10x-fin-base-cxx transitively (import cxxfin). Do not depend on the cxx dist directly. Requires Python >=3.11,<3.14 and a published py10x-core (plus its kernel/infra).

In this monorepo the packaging root is xx_fin/. Domain developers typically use uv-sync py10x-dev --all-extras --with-downstream from the py10x repo root — see CONTRIBUTING.md.

from xxfin.ccy import Ccy
import cxxfin  # native extension from py10x-fin-base-cxx

About

The xxfin package of the 10x project serves a dual purpose:

  • to illustrate the capabilities of the 10x system by implementing a sufficiently rich example solving an important problem in an important subject domain
  • to provide a complete working implementation of the most foundational valuation problem in the financial domain: calculating today's price of a fixed amount of a future cash flow denominated in any currency.

To achieve this goal, one needs to determine the relevant currency/foreign exchange (FX) rates and discount factors in a manner consistent with the current market data. Hence, we define all the necessary data structures for market data, including:

  • an ingestion/translation facility for collecting market data from any chosen data providers
  • generation/population/storage objects for standard quoted market data
  • models for calibrating complex/"synthetic" objects (forward curves), allowing calculation of rates/values that are not directly observable but are consistent with all the relevant markets

The sequence of the valuation steps is as follows:

  • We create market data objects ("quotables") that contain the market quotes and are stored in a user-specified market data store.
  • The user specifies an external market data provider.
  • An adapter is needed to translate the market data from the provider's format and populate our quotables.
    • We may provide such an adapter for a commonly used provider (e.g., Bloomberg), and, at a later date, add more adapters if demand warrants it.
    • We create a sample set of quotables which allow us to illustrate the use of market data.
  • Each piece of market data is quoted as a number (or a collection of numbers) representing values/parameters of certain standard financial contracts, and the set of specifications sufficient to describe and value such standardized contracts is saved in "market convention" objects.

The subset of all market quotables used to build/calibrate synthetic market data (forward curves) is called a market assembly. It usually consists of the most liquid contracts that provide the most precise view of market participants on the market (e.g., the most liquid swap or FX forward quotes). Once we ingest the market quotes from the data provider(s) into the quotables, we use a market assembly to build/calibrate the forward curve using a chosen calibration procedure. The subsequent use of the curves built this way is completely agnostic to the curve calibration choices. Hence, the market assembly, as well as the calibration analytics, can be replaced by the user's preferred choices.

The discount curve for a discount rate in a given currency is built using that currency-denominated standard cash deposit and fixed-floating swap market quotes, with that rate as the underlying/reference floating rate for the instruments listed in a market assembly (e.g., for the SOFR curve we use USD cash deposits and SOFR standard annual fixed/floating swap quotes).

For FX forward curve construction, we currently use FX spot and FX forward (point) quotes for rates funded/collateralized in the same currency (e.g., USD). We build an FX curve for a market assembly-specified set of FX spot and FX USD-collateralized forwards consistent with the funding currency's discount curve.

Such an FX forward curve allows us to calculate the present value, in any given currency, of a cash flow denominated in any other currency.

Optional JIT acceleration via AADC

xxfin/jit_aadc/ optionally records curve/valuation code into a JIT-compiled adjoint differentiation kernel using MatLogica's AADC (Adjoint Algorithmic Differentiation Compiler), enabled via the use_cxxfin/aadc_license settings in xxfin_env_vars.py. aadc installs freely from PyPI where MatLogica publishes wheels; it is a required dependency except on macOS (no published build) and on Windows under Python 3.13 (no wheel yet). It ships with a time-limited trial license out of the box, but continued or production use requires a license key obtained from MatLogica. xxfin itself works fully without it — AADC only accelerates the JIT-compiled code path.

An easy setup to start playing with xxfin package

  • install mongodb on your machine and run without authentication (default)
  • set environment variables:
    • XX_MAIN_TS_STORE_URI=mongodb://localhost/xx_fin (or any other MongoDb)
    • XXFIN_DEFAULT_PRICING_CONTEXT_NAME=Abu Dhabi 20251010
  • run xxfin/dev_data_helpers/RUN_ME.py (it will store a number of objects)
  • you are ready to go!

Release files for py10x-fin-base 0.1.2rc7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py10x-fin-base 0.1.2rc7
File Size Uploaded
py10x_fin_base-0.1.2rc7.tar.gz 90.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py10x-fin-base 0.1.2rc7
File Interpreter ABI Platform
py10x_fin_base-0.1.2rc7-py3-none-any.whl Python 3 none any Details

Total release size: 184.8 kB

Release files / py10x_fin_base-0.1.2rc7.tar.gz

Download URL py10x_fin_base-0.1.2rc7.tar.gz
Size 90.3 kB
Tags Source
SHA-256 checksum
How to use checksums
772f4d9571d5445bbf85fe7c3d91e28af86ed67b46aff72d0755b3083d6b3949
BLAKE2b-256 checksum
How to use checksums
ea7220ca5fb6d42d48807868a3dc6b03dd9c5c0265f9fe7fe01c7827acea59e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release files / py10x_fin_base-0.1.2rc7-py3-none-any.whl

Download URL py10x_fin_base-0.1.2rc7-py3-none-any.whl
Size 94.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffb194aef69ca9d2cc3c9fc7c42a36d7d941089e902db70ff5e08779dad06534
BLAKE2b-256 checksum
How to use checksums
b3ed462bc0822a754e2df9b43df87fc84542f0a70ce64195884cd5ea0b637012
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page