Conformal recalibration audit for tail quantile forecasters
Project description
conformal-oracle
Conformal recalibration audit for tail quantile forecasters.
Given any black-box probabilistic forecaster and a return series,
conformal-oracle computes a one-parameter conformal correction
(static or rolling), classifies the forecaster as signal-preserving
or replacement, and reports a full backtest panel.
Implements the methodology from:
Pele, D.T., Bolovăneanu, V., Ginavar, A.T., Lessmann, S., Härdle, W.K. "Recalibrating Tail Event Forecasts under Temporal Dependence" (2026).
Install
pip install conformal-oracle
For TSFM wrappers:
pip install conformal-oracle[chronos] # Chronos
pip install conformal-oracle[lag_llama] # Lag-Llama
pip install conformal-oracle[tsfm_all] # all four TSFMs
For development:
git clone https://github.com/QuantLet/Conformal_Oracle.git
cd Conformal_Oracle/python
pip install -e ".[dev]"
Quickstart — static audit
import pandas as pd
from conformal_oracle import audit_static
from conformal_oracle.forecasters import GJRGARCHForecaster
returns = pd.read_csv("returns.csv", index_col=0, parse_dates=True).squeeze()
result = audit_static(returns, GJRGARCHForecaster(), alpha=0.01)
print(result.summary())
Quickstart — rolling audit
from conformal_oracle import audit_rolling
from conformal_oracle.forecasters import GJRGARCHForecaster
result = audit_rolling(returns, GJRGARCHForecaster(), alpha=0.01, window=250)
print(result.summary())
Quickstart — benchmark comparison
from conformal_oracle import audit_with_benchmarks
comp = audit_with_benchmarks(returns, my_forecaster, benchmarks=["gjr_garch", "hist_sim"])
print(comp.comparison_table())
print(comp.diebold_mariano(baseline="gjr_garch"))
print(comp.comparison_table_latex())
Custom forecaster
Any object implementing fit(returns) and forecast(returns, t) works:
from conformal_oracle._types import SampleDistribution
class MyForecaster:
def fit(self, returns): pass
def forecast(self, returns, t):
hist = returns.iloc[max(0, t-250):t]
return SampleDistribution(samples=hist.values)
result = audit_static(returns, MyForecaster(), alpha=0.01)
See examples/04_custom_forecaster.py for a full example.
Worked examples
- Quickstart (S&P 500) —
Static and rolling conformal audits with GJR-GARCH and Lag-Llama.
- Reproduce Table 4 (Full replication) —
9 forecasters × 24 assets, full master evaluation table with checkpointing.
Documentation
- API Reference
- Methodology
- Conventions (return units, VaR sign, alpha)
Requirements
Python 3.10+, numpy, pandas, scipy, statsmodels, arch, matplotlib.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file conformal_oracle-0.2.2.tar.gz.
File metadata
- Download URL: conformal_oracle-0.2.2.tar.gz
- Upload date:
- Size: 39.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e921e2b551314a9a8fa51ff1512a18165892d7c528c3580b182a20fced2c88f0
|
|
| MD5 |
a4fb91e39770c608d9d8d2d7cb3bb538
|
|
| BLAKE2b-256 |
84a7e5f3a56ce7380c96b814e6603f4a07d70dc875711a3d42877537c70712f1
|
Provenance
The following attestation bundles were made for conformal_oracle-0.2.2.tar.gz:
Publisher:
release.yml on danpele/Conformal_Oracle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
conformal_oracle-0.2.2.tar.gz -
Subject digest:
e921e2b551314a9a8fa51ff1512a18165892d7c528c3580b182a20fced2c88f0 - Sigstore transparency entry: 1518891819
- Sigstore integration time:
-
Permalink:
danpele/Conformal_Oracle@cedd13c9c27781b948d03a0cb8d89f3cbaa4a547 -
Branch / Tag:
refs/tags/v0.2.2-python - Owner: https://github.com/danpele
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cedd13c9c27781b948d03a0cb8d89f3cbaa4a547 -
Trigger Event:
push
-
Statement type:
File details
Details for the file conformal_oracle-0.2.2-py3-none-any.whl.
File metadata
- Download URL: conformal_oracle-0.2.2-py3-none-any.whl
- Upload date:
- Size: 58.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35840796ca8b1b10591107b30a104dede7ff6c067281aa069cd307ed9141c643
|
|
| MD5 |
784e18b9262e3c122bb56663fa40efb9
|
|
| BLAKE2b-256 |
e9e35540a6bb6830c4f935c18caffbbdc487e0a8366866c041c383e95cd3d8b1
|
Provenance
The following attestation bundles were made for conformal_oracle-0.2.2-py3-none-any.whl:
Publisher:
release.yml on danpele/Conformal_Oracle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
conformal_oracle-0.2.2-py3-none-any.whl -
Subject digest:
35840796ca8b1b10591107b30a104dede7ff6c067281aa069cd307ed9141c643 - Sigstore transparency entry: 1518891850
- Sigstore integration time:
-
Permalink:
danpele/Conformal_Oracle@cedd13c9c27781b948d03a0cb8d89f3cbaa4a547 -
Branch / Tag:
refs/tags/v0.2.2-python - Owner: https://github.com/danpele
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cedd13c9c27781b948d03a0cb8d89f3cbaa4a547 -
Trigger Event:
push
-
Statement type: