Full reference for pip install tailwarp (v1.0).
| Mode | Command | CUDA toolkit required |
|---|---|---|
| CPU (default) | pip install . |
No |
| CUDA extra | pip install ".[cuda]" |
No at install; native wheel optional |
| Dashboard | pip install ".[dashboard]" |
No |
See python/README.md and deployment.md.
from tailwarp import TailWarpClient, WarningStateParams
client = TailWarpClient()
cvar = client.compute_cvar([-0.1, -0.05, 0.0, 0.02, 0.05], alpha=0.95)
print(cvar.value, cvar.method, cvar.device, cvar.elapsed_ms)prefer_cuda: bool | None— readsTAILWARP_PREFER_CUDAwhen omitted (default off).
Historical CVaR (expected shortfall) on sorted ascending returns.
Historical VaR quantile.
Maximum drawdown as a positive decimal (0–1).
CVaR-constrained sizing via Student-t Monte Carlo (CPU NumPy path in v1.0).
Deterministic GREEN/YELLOW/RED/CRITICAL bands matching C++.
- If
tailwarp._nativepybind11 module is importable → host C++ forcompute_cvar,compute_var,compute_warning_state. - Otherwise → NumPy reference in
cpu_fallback.py(always available).
CUDA-not-found at runtime does not break import; methods stay on CPU.
Frozen public surface: python-api-contract.md.
- ARCHITECTURE_BOUNDARY.md
- integrations.md — v2.0 consumer mocks