Multi-method forecasting
Naive, ARIMA, GARCH with AIC-selected orders, and a shared multi-asset LSTM — swappable per run with a single flag.
A production-grade Python framework for cryptocurrency portfolio construction. Consensus Louvain clustering, Ledoit-Wolf shrinkage, and Sharpe-ascent optimisation — packaged for quant teams who ship.
❯
pip install crypto-portfolio-system
Successfully installed crypto-portfolio-system-0.1.0
❯
crypto-portfolio --source yfinance \
--symbols BTC-USD,ETH-USD,SOL-USD,ADA-USD \
--period 6mo --consensus-runs 20
▸ Ingested 1,834 price points across 4 symbols
▸ Fitted ARIMA(2,1,2) · horizon 7d
▸ Building rolling correlation networks · 60d window
▸ Running consensus Louvain (20 runs, τ=0.5)
✓ 5 stable communities · Jaccard 0.81
▸ Ledoit-Wolf shrinkage · λ=0.42
▸ Sharpe ascent · cap=0.35 · ceil=1.20
✓ weights {
BTC: 0.34, ETH: 0.28, SOL: 0.21, ADA: 0.17 }
✔ Run 4abf12c8 complete → outputs/
trades.csv · summary.csv · log_returns.csv · events.jsonl
Built on the shoulders of
A single, opinionated pipeline. Each stage is observable, deterministic, and independently testable.
Wide price frames via synthetic, CSV, yfinance, or live ccxt polling.
Calendar alignment, missing-value handling, and log-returns computation.
Naive, ARIMA, GARCH (AIC), and shared multi-asset LSTM with governance drift detection.
Rolling correlation matrices → graph edges with NetworkX.
Stable clusters extracted across N runs with majority co-occurrence threshold τ.
Ledoit-Wolf shrinkage, per-asset caps, vol ceiling, transaction & slippage.
Persistent, idempotent artefacts: trades, summary, log-returns, events, metrics.
Designed for serious work — observable, testable, and built on the research literature.
Naive, ARIMA, GARCH with AIC-selected orders, and a shared multi-asset LSTM — swappable per run with a single flag.
Stable community detection across N independent Louvain runs, with co-occurrence threshold and Jaccard stability metrics.
Ledoit-Wolf covariance shrinkage, per-asset caps, asset-count and volatility ceilings — all in one objective.
Transaction costs and slippage applied to net returns; per-rebalance turnover surfaced in every artefact.
Forecast drift detection and MSE tracking over time. Pipeline emits events, metrics, and structured logs.
Hexagonal architecture. Domain is pure Python; infrastructure is swappable. Ships CLI, REST, Docker, and ccxt poller.
CLI for scripting, Python API for notebooks and services, REST for stateless backends, and a live poller for real-time research.
Two scripts. One for batch runs, one for live ingestion. Flags map 1:1 to PipelineConfig — no surprises.
$ pip install crypto-portfolio-system
$ crypto-portfolio \
--source yfinance \
--symbols BTC-USD,ETH-USD,SOL-USD,ADA-USD \
--period 6mo \
--forecast-method arima \
--consensus-runs 20 \
--weight-cap 0.35 \
--max-volatility-annual 1.20 \
--output-dir outputs --run-dir runs
MIT licensed. Pay nothing. Add capabilities as you need them.
The default install. Naive + ARIMA forecasting, FileArtifactStore, structured logging.
$ pip install crypto-portfolio-system Everything in Core, plus GARCH volatility and a multi-asset LSTM forecaster.
$ pip install crypto-portfolio-system[forecast-lstm,forecast-garch] Studio + live ccxt polling, yfinance ingest, and the FastAPI REST surface.
$ pip install crypto-portfolio-system[all] If something's missing, open an issue on GitHub. Or read the full README.
Install CPS, point it at any source — CSV, yfinance, or live ccxt — and ship a deterministic, risk-aware crypto portfolio.
MIT license · v0.1.0 · Tested on 3.10 / 3.11 / 3.12