Python API reference
Import the package as openquant. Modules marked compiled are Rust bindings; help() on any of their functions prints the same signature and text as below, and type checkers read the shipped .pyi stubs. For the Rust crate itself see the rustdoc reference.
Modules
| Module | Kind | Items | Summary |
|---|---|---|---|
openquant.adapters | python | 8 | |
openquant.backtest_stats | compiled | 10 | |
openquant.backtesting_engine | python | 3 | CPCV backtest paths from out-of-sample results you computed (AFML chapters 11 and 12). |
openquant.bars | python | 5 | |
openquant.bet_sizing | compiled | 28 | |
openquant.cla | compiled | 1 | |
openquant.codependence | compiled | 7 | |
openquant.cross_validation | python | 11 | Purged k-fold, walk-forward and combinatorial purged cross-validation (AFML chapters 7, 12). |
openquant.data | python | 14 | |
openquant.dynamic_allocation | compiled | 5 | |
openquant.ef3m | compiled | 4 | |
openquant.ensemble | compiled | 9 | |
openquant.evaluation | python | 11 | Research evaluation: is a backtest's Sharpe ratio evidence of skill? |
openquant.fast_ewma | compiled | 1 | |
openquant.feature_diagnostics | python | 6 | |
openquant.feature_importance | python | 5 | MDI, MDA and SFI feature importance (AFML chapter 8) for any scikit-learn-style model. |
openquant.filters | compiled | 4 | |
openquant.fracdiff | compiled | 4 | |
openquant.hcaa | compiled | 1 | |
openquant.hrp | compiled | 1 | |
openquant.hyperparameter_tuning | python | 4 | Hyperparameter search on purged k-fold splits (AFML chapter 9), for any Python model. |
openquant.labeling | compiled | 7 | |
openquant.microstructural | compiled | 22 | |
openquant.onc | compiled | 1 | |
openquant.pipeline | python | 4 | |
openquant.portfolio | compiled | 6 | |
openquant.research | python | 5 | |
openquant.risk | compiled | 7 | |
openquant.sample_weights | compiled | 2 | |
openquant.sampling | compiled | 7 | |
openquant.sb_bagging | compiled | 3 | |
openquant.strategy_risk | compiled | 7 | |
openquant.streaming_hpc | compiled | 2 | |
openquant.structural_breaks | compiled | 3 | |
openquant.synthetic_bt | compiled | 6 | |
openquant.viz | python | 6 | |
openquant.volatility | compiled | 4 |
Compiled modules behind the wrappers
These compiled modules have a pure-Python module of the same name in front of them (for example openquant.bars wraps openquant._core.bars). The wrappers are the supported interface; the compiled functions are listed for completeness.