Skip to main content

mathema-mcp

Python pricing library for Mathema MCP. Build market objects and trades from dicts, then compute prices and Greeks. pip installs one wheel for your OS and Python version. Excel is not included.

Docs: https://help.mathema.com.cn/

Features

  • Build calendars, rates/credit/FX curves, and volatility surfaces, then attach them to options, swaps, and bonds
  • Load the same objects from a standard market-data snapshot (JSON): mcp_marketdata
  • Vanilla closed-form, barrier/digital, American, and path-dependent structures (Monte Carlo)
  • Volatility: implied surfaces, historical vol, LocalVol, Heston
  • Greeks and related risk measures

User API: mcp.tools / mcp.tool.tools_main. Underlying classes: mcp.wrapper.

Market-data objects

Layer Objects Role
Conventions McpCalendar, McpSchedule, McpRateConvention Holidays, payment schedules, rate conventions
Rates curves McpYieldCurve / McpYieldCurve2, McpSwapCurve, McpForwardCurve, McpParametricCurve Discount, zero, swap, forward
Bond curves McpBondCurve, McpBondSpreadCurve Bond discount and spread
FX curves McpFXForwardPointsCurve / 2, McpXccyBasisCurve Forward points, cross-currency basis
Credit curves McpCreditCurve Hazard rates, default probabilities
Curve building blocks Overnight / Bill / FRA / Swap / Bond *CurveData Instruments used to bootstrap a curve
Volatility McpVolSurface, McpFXVolSurface, McpMktVolSurface (and *2) Equity/commodity, FX, and quoted market surfaces
Rates volatility McpSwaptionCube, McpCapVolStripping Swaption cube, cap stripping
Vol models McpHistVols, McpLocalVol, McpHestonModel Historical, Dupire, stochastic vol
Snapshots McpRawMarketManager, McpMarketDataJsonReader, McpLiveMarketDataStore Standard JSON → the objects above

Asset coverage

The same option shapes (vanilla / barrier / digital / double-digital / Asian) attach to FX, equity, and commodity.

Asset Coverage
FX Spot, forward, NDF, swap; vanilla/barrier/digital/Asian; strategies; structured forwards
Rates IRS, basis swap, cross-currency swap; deposits/loans, FRA; cap/floor, swaption
Credit CDS, CLN; discounting on a credit curve
Bonds Fixed, amortizing, callable; repo, securities lending, bill discount; bond forward/future; ABS tranches
Equity Spot, future, fund; vanilla/barrier/digital; snowball, phoenix, autocall, range accrual
Commodity Futures, options; commodity lending
TRS Equity TRS, bond TRS

Convertible bonds are priced on the structured-product path.

Install

pip install mathema-mcp

For table-style APIs (FixedLegs / McpPayoff and similar):

pip install "mathema-mcp[data]"

Or install a downloaded wheel:

pip install path/to/mathema_mcp-1.6.1-cp39-cp39-win_amd64.whl

Usage

The main entry is dict arguments, not SWIG positional args:

from mcp.tools import McpCalendar, McpVersion
from mcp.tool.tools_main import McpYieldCurve
from mcp.utils.enums import DayCounter, Frequency, InterpolatedVariable, InterpolationMethod

print(McpVersion())
cal = McpCalendar()
yc = McpYieldCurve({
    "ReferenceDate": "2024-12-13",
    "Tenors": ["1M", "1Y"],
    "ZeroRates": [0.03, 0.035],
    "Calendar": cal,
    "DayCounter": DayCounter.Act365Fixed,
    "Frequency": Frequency.Continuous,
    "Variable": InterpolatedVariable.SIMPLERATES,
    "InterpolationMethod": InterpolationMethod.LINEARINTERPOLATION,
})

Dict construction does not require numpy or pandas. Those are only needed for the table APIs ([data]).

Supported wheels

Platform Python Tag
Windows x64 3.9–3.13 win_amd64
Linux x64 (glibc ≥ 2.28) 3.9–3.13 manylinux_2_28_x86_64

Runtime

Public wheels are built without CUDA. A local CUDA toolkit or runtime is not required. Structured products use CPU multithreading. GPU Monte Carlo is not included.

Metadata

Release files for mathema-mcp 1.6.2

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

Built distributions (wheels)

Table of built distributions (wheels) for mathema-mcp 1.6.2
File Actions
mathema_mcp-1.6.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for mathema_mcp-1.6.2-cp313-cp313-win_amd64.whl
mathema_mcp-1.6.2-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for mathema_mcp-1.6.2-cp313-cp313-manylinux_2_28_x86_64.whl
mathema_mcp-1.6.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for mathema_mcp-1.6.2-cp312-cp312-win_amd64.whl
mathema_mcp-1.6.2-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for mathema_mcp-1.6.2-cp312-cp312-manylinux_2_28_x86_64.whl
mathema_mcp-1.6.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for mathema_mcp-1.6.2-cp311-cp311-win_amd64.whl
mathema_mcp-1.6.2-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for mathema_mcp-1.6.2-cp311-cp311-manylinux_2_28_x86_64.whl
mathema_mcp-1.6.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for mathema_mcp-1.6.2-cp310-cp310-win_amd64.whl
mathema_mcp-1.6.2-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for mathema_mcp-1.6.2-cp310-cp310-manylinux_2_28_x86_64.whl
mathema_mcp-1.6.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for mathema_mcp-1.6.2-cp39-cp39-win_amd64.whl
mathema_mcp-1.6.2-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details for mathema_mcp-1.6.2-cp39-cp39-manylinux_2_28_x86_64.whl

Total release size: 436.2 MB

Release files / mathema_mcp-1.6.2-cp313-cp313-win_amd64.whl

Download URL mathema_mcp-1.6.2-cp313-cp313-win_amd64.whl
Size 69.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
cce24ffebc3fe54b1a2a84040e8fe34e8884d1832c17e3b4d7b390341aa08cab
BLAKE2b-256 checksum
How to use checksums
078fba0806827c256e84be5a78f634d8d147bc5861ddf2916087992a66c6a762
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL mathema_mcp-1.6.2-cp313-cp313-manylinux_2_28_x86_64.whl
Size 17.5 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
58b2ebbaeca1351ff589f808fd11f6ebb31017a458a03c0163fd6673aed33e1f
BLAKE2b-256 checksum
How to use checksums
64d4741f78b993671b59d45843451360e59472612ea515f53f0d20312fdce4e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp312-cp312-win_amd64.whl

Download URL mathema_mcp-1.6.2-cp312-cp312-win_amd64.whl
Size 69.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
5c4f8fc244d77610a2028a134bcc33de99c5afb219431ac78317b6691f4eb30a
BLAKE2b-256 checksum
How to use checksums
cd0703ca9cb0d8c4aab3a52b328e5a10a5231a96802d920c13fd65f176c00646
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL mathema_mcp-1.6.2-cp312-cp312-manylinux_2_28_x86_64.whl
Size 17.5 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
350cbf50b57d07bb1130f10f2c0147b3175c2921ed7d12c376f3a70dde6088e7
BLAKE2b-256 checksum
How to use checksums
c4b2923c74ee41e7ef2d57db855549289284fd304397126439e2cb283939373b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp311-cp311-win_amd64.whl

Download URL mathema_mcp-1.6.2-cp311-cp311-win_amd64.whl
Size 69.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
ed9c9a9cddae5703698701bb287292d4f8392793a577353cba9ad5bbe3e69def
BLAKE2b-256 checksum
How to use checksums
353eb5a6f318f588e3d1d701a68a165185fd34c097d51e92917fa875dfebba32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL mathema_mcp-1.6.2-cp311-cp311-manylinux_2_28_x86_64.whl
Size 17.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d54c142948a9a623aded349c2ec970c9727791a545312bc0de20f5f4bcd03d32
BLAKE2b-256 checksum
How to use checksums
6408e45bda7a6abf61c06edc6358ac1c88d50b7658f05d61016bf93b94bf146c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp310-cp310-win_amd64.whl

Download URL mathema_mcp-1.6.2-cp310-cp310-win_amd64.whl
Size 69.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
21abc830a2b6cfc420396a85714f725bb644433fc91a39ce8bbc46ceca306a1d
BLAKE2b-256 checksum
How to use checksums
3f192b07ba2bb433c009cd20916ff3aa493b51a8394fad9ed50837234cca4546
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL mathema_mcp-1.6.2-cp310-cp310-manylinux_2_28_x86_64.whl
Size 17.5 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7ac449e24b9c0041b4542f9358e5460e7e48c0e8edf69b2a511b7bec405545fa
BLAKE2b-256 checksum
How to use checksums
ab6558d6c7ae82db7e21159fe4292c1627596ed3f520b6d5286a0a5c6e1c6684
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp39-cp39-win_amd64.whl

Download URL mathema_mcp-1.6.2-cp39-cp39-win_amd64.whl
Size 69.7 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
99b3fa8adaab0f5a940cbc94e35a573cf3bf19fae812a2356b7f1b6c839fc1c8
BLAKE2b-256 checksum
How to use checksums
c5ed5d9b3e2b821df6d5ff9739a5cdb434c02760b246e649d60587cf0246d067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Release files / mathema_mcp-1.6.2-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL mathema_mcp-1.6.2-cp39-cp39-manylinux_2_28_x86_64.whl
Size 17.5 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
94c28ccc588b8e7b8fd4b279b7f5db8472714a262da8ceec5f09d0653aaa517e
BLAKE2b-256 checksum
How to use checksums
54526a2fa74f25b7ae1939f44fd4b6f9786e566800a6bbad670d355306230d2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.12

Security for mathema-mcp 1.6.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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