Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-kit-minio-s3-docker/llms.txt

Use this file to discover all available pages before exploring further.

backtest-kit MinIO S3 Docker replaces the default ./dump/ file-based persistence in backtest-kit with MinIO (S3) as the source of truth and Redis as a time-ordered index. It ships 16 custom persist adapters that implement the full IPersist*Instance contract — strategy code, runners, and the CLI entry point stay completely unchanged.

Quickstart

Start MinIO and Redis, build your strategy bundle, and run your first backtest in minutes.

Architecture Overview

Understand how MinIO, Redis, and the 16 persist adapters work together.

Persist Adapters

Browse all 16 adapters — from Candle OHLCV storage to Session and Memory.

Configuration

Configure MinIO endpoints, Redis credentials, and Docker environment variables.

Why MinIO + Redis?

The default file adapter writes JSON blobs to ./dump/ on the local disk — simple for local runs, but it offers no durability guarantees, no remote access, and no efficient newest-first listing. A full relational database works great at scale but requires schema management and migrations. This project sits deliberately between the two:
Default ./dump/MinIO + Redis (this project)Mongo / Postgres
Infrastructurenone2 containersdatabase + cache
Source of truthJSON on local diskJSON objects in S3 bucketrows / documents
Durabilitysingle host, manual backupS3 semantics: versioning, replication, lifecycleDB tooling: dumps, replicas
Newest-first readsfull directory scanRedis minute-index, O(limit)ORDER BY … LIMIT, O(log n)
Sweet spotlocal runs, CIfat JSON snapshots, S3-native infrahundreds of millions of candles
Pick this variant when you want S3-grade durability and zero schema management. If your candle set grows into the hundreds of millions, consider the @backtest-kit/pg or @backtest-kit/mongo packages instead.

Key Features

16 Persist Adapters

Every backtest-kit IPersist*Instance interface is implemented on top of MinIO + Redis — no custom glue code needed.

Single Bucket, Key Prefixes

All adapters share one backtest-kit MinIO bucket. Each entity gets its own key prefix (candle-items/, signal-items/, …).

Redis Time Index

Log, Notification, and Storage use a per-minute Redis SET index for O(limit) newest-first reads without scanning the whole bucket.

Docker Compose

Spin up MinIO and Redis with a single command. A full-stack compose file bundles the strategy runner container too.

Three Trading Modes

Run backtests against historical OHLCV data, paper-trade against live feeds, or switch to fully live mode — same codebase.

Cold-Index Fallback

If Redis is flushed, listings fall back to bucket LIST (inverted-timestamp keys are already newest-first) and re-warm the index automatically.

Getting Started

1

Start infrastructure

Launch MinIO and Redis containers:
docker-compose -f docker/minio/docker-compose.yaml up -d
docker-compose -f docker/redis/docker-compose.yaml up -d
2

Configure credentials

Copy .env.example to .env and adjust MinIO/Redis endpoints if needed:
cp .env.example .env
3

Build and run a backtest

npm run start -- --entry --backtest --ui ./build/index.cjs
4

View results

Open the backtest-kit web UI at http://localhost:60050 to inspect signals, logs, and performance metrics.
See the Quickstart for a complete walkthrough, including full Docker deployment.

Build docs developers (and LLMs) love