Skip to main content

Prometheus Quant Engine: Python SDK

PyPI version Python Versions License: MIT

Prometheus Quant Engine is an institutional-grade, High-Performance Computing (HPC) API for pricing path-dependent and exotic derivatives.

This SDK abstracts the complexity of our underlying C++ OpenMP infrastructure, allowing quantitative developers to offload massive stochastic matrices (up to 1,000,000,000 trajectories) directly from Python, completely bypassing the Global Interpreter Lock (GIL) and native memory bottlenecks.

🚀 Key Architectural Features

  • Strict Mathematical Validation: Built on top of Pydantic V2. The SDK catches logical errors (e.g., negative time, invalid barrier boundaries) locally before wasting network latency or compute credits.
  • Deterministic Idempotency: Built-in Double-Spend protection. If a network partition occurs, retrying the exact same request with the same Idempotency-Key yields the cached mathematical matrix at strictly zero cost.
  • Asynchronous Polling Abstraction: Massive workloads ($N \times M > 50\text{M}$ steps) are seamlessly routed to our Celery HPC cluster. The SDK abstracts the long-polling lifecycle—you just call .price() and receive the finalized DataFrame.
  • Pandas Native: Seamless integration with pandas for immediate volatility surface plotting and quantitative analysis.

📦 Installation

pip install prometheus-qengine

🔑 Authentication & Free Compute Ledger

To execute simulations, you need a Master API Key. Register at prometheusquantengine.com to instantly receive 50 Free Compute Credits (equivalent to 12.5 Billion stochastic path evolutions).

💻 Quickstart: European Options

European options are evaluated via highly optimized Control Variates to tighten the Confidence Interval (CI) in record time.

from prometheus_qengine import PrometheusClient, EuropeanOption, OptionType

# 1. Initialize the client
client = PrometheusClient(api_key="pmt_live_your_secure_api_key")

# 2. Define the exact quantitative parameters
option = EuropeanOption(
    s_0=100.0,
    strike=100.0,
    volatility=0.20,
    time_to_maturity=1.0,
    risk_free_rate=0.05,
    option_type=OptionType.CALL,
    n_simulations=10_000_000,
    label="Quickstart_European_Call"
)

# 3. Dispatch to the C++ Engine
result = client.price(option)

# 4. Analyze the output natively in Pandas
df = result.to_pandas()
print(df[["fair_value", "delta", "gamma", "vega", "credits_cost"]])

⚡ Heavy Workloads: Barrier Options (HPC Routing)

When pricing complex path-dependent instruments with step-function discontinuities (like Knock-Out barriers), dense trajectory matrices are required to stabilize the Gamma ($\Gamma$).

If your configuration exceeds 50 million total computational steps, the SDK automatically routes the payload to the asynchronous Celery broker and handles the polling loop silently.

from prometheus_qengine import PrometheusClient, BarrierOption, OptionType, BarrierType

client = PrometheusClient(api_key="pmt_live_your_secure_api_key")

heavy_barrier = BarrierOption(
    s_0=100.0,
    strike=100.0,
    volatility=0.25,
    time_to_maturity=1.0,
    risk_free_rate=0.05,
    option_type=OptionType.PUT,
    n_simulations=1_000_000,       # 1 Million Paths
    m_steps=252,                   # Daily observations
    barrier_type=BarrierType.DOWN_AND_OUT,
    barrier_level=85.0
)

# The SDK detects 252,000,000 total steps.
# It delegates the matrix to the C++ cluster and waits for the resolution.
result = client.price(heavy_barrier)

print(f"Fair Value computed: {result.fair_value}")
print(f"Confidence Interval: [{result.ci_lower}, {result.ci_upper}]")

🛡️ Error Handling & Limits

The SDK translates HTTP status codes into strict Pythonic exceptions:

from prometheus_qengine.exceptions import InsufficientCreditsError, AuthenticationError

try:
    result = client.price(option)
except InsufficientCreditsError as e:
    print("Ledger depleted. Recharge required.")
except AuthenticationError as e:
    print("Invalid API Key.")

📚 Documentation & Research

For in-depth mathematical proofs regarding our Finite Difference implementations, False Sharing mitigation in OpenMP, and structural REST API architecture, visit our Papers and Api-docs.

📄 License

This SDK is distributed under the MIT License. See LICENSE for more information.

Download files

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

Source Distribution

prometheus_qengine-1.0.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

prometheus_qengine-1.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file prometheus_qengine-1.0.0.tar.gz.

File metadata

  • Download URL: prometheus_qengine-1.0.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prometheus_qengine-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0dea1586d0dd8169c94447909c463e41f29936031d9728f387491e24d77f6c8d
MD5 daaa0e8d852fbfa6e0955de10f2a1e69
BLAKE2b-256 684b2b9cc540f91315e016236c3bffb20b41a77bef9461f6a3c452c9dc26908c

See more details on using hashes here.

Provenance

The following attestation bundles were made for prometheus_qengine-1.0.0.tar.gz:

Publisher: pypi-publish.yml on Prometheus-Quant-Engineering/prometheus-quant-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prometheus_qengine-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prometheus_qengine-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72fb2825c7677e884597c3741f98ad32a3ec5490d5097de08671819d2ae8f7df
MD5 169d70c9d9e5cc0bf2f7454a723cb1db
BLAKE2b-256 2af559b43e08c41341b5b8ac67436c8213467b860ddf045d52f4d1746c21b81f

See more details on using hashes here.

Provenance

The following attestation bundles were made for prometheus_qengine-1.0.0-py3-none-any.whl:

Publisher: pypi-publish.yml on Prometheus-Quant-Engineering/prometheus-quant-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

2 files

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