StackSats Documentation¶
Python library for dynamic Bitcoin DCA models
Build dynamic Bitcoin DCA models that robustly acquire more BTC than uniform DCA under fixed-budget, fixed-horizon constraints.
StackSats, developed by Hypertrial, turns research signals and feature pipelines into validated BTC weight schedules, backtests them against uniform DCA, and emits operational daily decisions. It is not a brokerage or generic trading bot. Learn more at www.stackingsats.org.
The Stacking Sats Problem¶
Given a fixed Bitcoin accumulation budget and an allocation horizon longer than six months, can a dynamic dollar-cost averaging (DCA) model robustly acquire more BTC than uniform DCA?
Uniform DCA means equal daily allocation across the same budget and horizon. StackSats measures the dynamic model's edge as sats per dollar (SPD): robustly acquiring more BTC for the same dollars, not short-term USD ROI or CAGR. The framework keeps that comparison honest by enforcing fixed-budget allocation, a fixed horizon that defaults to 365 days, no forward-looking data, locked historical allocations, and a clean boundary where brokerage execution stays outside the library.
See Framework Boundary for the allocation contract and Backtest Runtime for how strategy-vs-uniform outcomes are scored.
Start in 2 Clicks¶
Use this page when you want the fastest path into the hosted docs and need to choose the right next workflow.
Canonical first run:
pip install stacksatsstacksats demo backtest- Inspect
output/<strategy_id>/<version>/<run_id>/
Next steps:
- Quickstart for the offline packaged demo
- System Overview for data flow and production paths
- Full Data Setup for the canonical BRK dataset
- Task Hub for task-first workflows (including compare strategies on one window)
- Troubleshooting for symptom-based links
- First Strategy Run for custom strategy authoring
- Public API for the stable
1.xlibrary surface
What's new¶
- What's New for release highlights
- Changelog on GitHub for full version history
Agent-Native Flow¶
The primary production flow is:
- StackSats computes a validated daily BTC accumulation decision.
- An external AI agent reads the structured decision payload.
- Brokerage-specific execution happens outside StackSats.
Use Task Hub for the shortest path into decide-daily or the Python API.
Canonical Dataset¶
StackSats is anchored on the canonical Bitcoin Research Kit (BRK) merged_metrics*.parquet dataset. StackSats supports BRK at the project and data-workflow level and documents BRK as the upstream project. See bitcoinresearchkit/brk, brk on crates.io, and brk on docs.rs.
This does not mean StackSats embeds the Rust BRK crates or promises crate-level API compatibility. StackSats remains a Python package that consumes documented BRK-derived data artifacts.
Current coverage and scale are documented in the dataset-specific reference pages:
- Merged Metrics Data Guide
- BRK Data Source
- EDA Quickstart
- Merged Metrics Parquet Schema
- Merged Metrics Taxonomy
Core Objects¶
StackSats is built around three fundamental runtime objects:
- FeatureTimeSeries: Validated input to a strategy (feature time series with schema and time-series validation).
- Strategy: User-defined logic for feature engineering, signals, and allocation intent.
- WeightTimeSeries: Framework-validated output data containing normalized weights and prices.
Choose Your Path¶
-
I'm New to StackSats
Start with the offline packaged demo and expected outputs.
-
I Know the Outcome I Want
Jump directly to the workflow you need.
-
I'm Building a Strategy
Build custom hooks and run validate/backtest/export.
-
I Need Full BRK Data
Fetch canonical source data and prepare the managed runtime parquet.
Core Concepts¶
- System Overview sketches BRK data through strategy hooks to weights and artifacts.
- Framework Boundary explains framework-owned invariants versus user-owned strategy logic.
- Strategies documents stable built-ins and experimental reference strategies.
- Command Index is the canonical CLI reference for the stable
stacksatscommand groups. - Migration Guide maps old names and pre-v1 paths to the current
1.xcontract.