Installation
edgekit is a source install: a small numpy + pandas core that always imports, plus opt-in extras for the heavy dependencies. Install the lean core in seconds, or pull everything with "[all]".
edgekit is not on PyPI yet. You install it editable (-e) from a local checkout at ~/Documents/edgekit, so edits to the source are picked up without a reinstall. It requires Python 3.10 or newer.
Editable install#
From the repository root, pick the extras you need. The -e flag makes it an editable (development) install; the bracketed name after the dot selects optional-dependency groups.
cd ~/Documents/edgekit
pip install -e ".[all]" # everything: io + viz + ml + dev
pip install -e . # lean core only: numpy + pandasThe lean install is enough to load bars, run a causal backtest, compute trade stats, and run the permutation test — the whole prove-or-kill loop lives in the numpy + pandas core. You only need extras for parquet I/O, charts/HTML reports, or the ML layer.
pip install -e ".[viz]" # + matplotlib (charts + HTML reports)
pip install -e ".[ml]" # + scikit-learn / xgboost / lightgbm
pip install -e ".[io]" # + pyarrow (parquet caches + splits)
pip install -e ".[viz,ml]" # combine groups with a commaThe extras#
Each extra is a group in pyproject.toml. [all] is simply the union of the four. Install only what a given piece of work touches — a research script that never draws a chart does not need matplotlib.
| Extra | Pulls in | Unlocks |
|---|---|---|
[io] | pyarrow ≥ 12 | Parquet: data.load_bars on .parquet splits and data.hashed_parquet_cache. |
[viz] | matplotlib ≥ 3.7 | The viz charts (equity, drawdown, monthly heatmap, MC fan) and every report HTML page. |
[ml] | scikit-learn ≥ 1.3, xgboost ≥ 2.0, lightgbm ≥ 4.0 | The ml layer: triple-barrier labels, purged walk-forward, models, meta-labeling, cloud-safe tree export. |
[dev] | pytest ≥ 7.4, pytest-cov ≥ 4.1, ruff ≥ 0.4 | The test suite and linter — for working on edgekit itself. |
[all] | all four groups above | Everything. The one to install if you are unsure. |
import edgekit only ever needs numpy + pandas — it never imports matplotlib, scikit-learn, xgboost or pyarrow at import time. Those are imported inside the functions that use them, so a missing extra surfaces as a clear error (pip install edgekit[viz]) only when you call the code that needs it — not when you import the package. You can do the entire load → backtest → prove loop on the lean core.Verify the install#
Confirm the package imports and reports its version. This works on the lean core with no extras:
python -c "import edgekit as ek; print(ek.__version__)"
# 0.1.0If you installed [dev] (or [all]), run the suite from the repo root. All 99 tests should pass — the load-bearing ones are the causality property tests (perturb a future bar, assert the past doesn't move), the statistical-validity checks (a no-edge strategy must not score significant), and the tree-export round-trip (cloud-safe inference matches scikit-learn to 1e-6).
pytest # 99 passedpip install -e ../edgekit. New research is written against edgekit; the R-multiple is the shared currency and causality is a tested property on both sides.Next#
- Quickstart — your first validated backtest, step by step.
- The pipeline — load → backtest → prove → size → ship, stage by stage.
- The validation gauntlet — why a good backtest is where skepticism starts.
- API reference — every public function, module by module.