@backtest-kit/cli 8.3.1 → 8.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -13
- package/build/index.cjs +6 -3
- package/build/index.mjs +6 -3
- package/docker/README.md +122 -0
- package/docker/docker-compose.yaml +17 -9
- package/docker/package.json +6 -6
- package/package.json +13 -13
- package/template/project/README.md +15 -1
- package/template/project/package.mustache +5 -5
package/README.md
CHANGED
|
@@ -1371,7 +1371,7 @@ npm run sync:lib
|
|
|
1371
1371
|
|
|
1372
1372
|
## 🐳 Running in Docker (`--docker`)
|
|
1373
1373
|
|
|
1374
|
-
CLI can
|
|
1374
|
+
CLI can create a ready-to-use Docker workspace: self-contained directory with `docker-compose.yaml` and a strategy entry point.
|
|
1375
1375
|
|
|
1376
1376
|
### CLI Flags
|
|
1377
1377
|
|
|
@@ -1396,20 +1396,48 @@ npx @backtest-kit/cli --docker --output my-docker-workspace
|
|
|
1396
1396
|
|
|
1397
1397
|
The target directory must not exist or must be empty — the command aborts if it contains any files.
|
|
1398
1398
|
|
|
1399
|
-
###
|
|
1399
|
+
### Two Launch Modes
|
|
1400
1400
|
|
|
1401
|
+
The Docker image entrypoint supports two ways to run a strategy:
|
|
1402
|
+
|
|
1403
|
+
#### 1. `command:` in `docker-compose.yaml`
|
|
1404
|
+
|
|
1405
|
+
Pin mode and flags directly in the compose file. The entrypoint forwards all arguments to the CLI unchanged:
|
|
1406
|
+
|
|
1407
|
+
```yaml
|
|
1408
|
+
command:
|
|
1409
|
+
- --live
|
|
1410
|
+
- --symbol
|
|
1411
|
+
- TRXUSDT
|
|
1412
|
+
- --strategy
|
|
1413
|
+
- feb_2026_strategy
|
|
1414
|
+
- --exchange
|
|
1415
|
+
- ccxt-exchange
|
|
1416
|
+
- ./content/feb_2026/feb_2026.strategy.ts
|
|
1417
|
+
- --ui
|
|
1401
1418
|
```
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1419
|
+
|
|
1420
|
+
#### 2. Inline environment variables
|
|
1421
|
+
|
|
1422
|
+
Pass `MODE` and `STRATEGY_FILE` on the command line — no file edits needed:
|
|
1423
|
+
|
|
1424
|
+
```bash
|
|
1425
|
+
MODE=live SYMBOL=TRXUSDT UI=1 docker-compose up -d
|
|
1426
|
+
```
|
|
1427
|
+
|
|
1428
|
+
| Variable | Required | Default | Description |
|
|
1429
|
+
|----------|----------|---------|-------------|
|
|
1430
|
+
| `MODE` | yes | — | `backtest` \| `live` \| `paper` \| `walker` |
|
|
1431
|
+
| `STRATEGY_FILE` | yes | — | Path to strategy entry point (relative to `working_dir`) |
|
|
1432
|
+
| `SYMBOL` | no | `BTCUSDT` | Trading pair |
|
|
1433
|
+
| `STRATEGY` | no | first registered | Strategy name |
|
|
1434
|
+
| `EXCHANGE` | no | first registered | Exchange name |
|
|
1435
|
+
| `FRAME` | no | first registered | Frame name (backtest only) |
|
|
1436
|
+
| `UI` | no | — | Any non-empty value enables `--ui` |
|
|
1437
|
+
| `TELEGRAM` | no | — | Any non-empty value enables `--telegram` |
|
|
1438
|
+
| `VERBOSE` | no | — | Any non-empty value enables `--verbose` |
|
|
1439
|
+
| `NO_CACHE` | no | — | Any non-empty value enables `--noCache` |
|
|
1440
|
+
| `NO_FLUSH` | no | — | Any non-empty value enables `--noFlush` |
|
|
1413
1441
|
|
|
1414
1442
|
## 🌍 Environment Variables
|
|
1415
1443
|
|
package/build/index.cjs
CHANGED
|
@@ -3026,7 +3026,7 @@ const main$f = async () => {
|
|
|
3026
3026
|
if (MODES.some((mode) => values[mode])) {
|
|
3027
3027
|
return;
|
|
3028
3028
|
}
|
|
3029
|
-
process.stdout.write(`@backtest-kit/cli ${"8.
|
|
3029
|
+
process.stdout.write(`@backtest-kit/cli ${"8.4.1"}\n`);
|
|
3030
3030
|
process.stdout.write("\n");
|
|
3031
3031
|
process.stdout.write(`Run with --help to see available commands.\n`);
|
|
3032
3032
|
process.stdout.write("\n");
|
|
@@ -3706,6 +3706,9 @@ const main$2 = async () => {
|
|
|
3706
3706
|
}
|
|
3707
3707
|
console.log(`Creating Docker workspace in ${projectPath}`);
|
|
3708
3708
|
await copyDir(templatePath, projectPath);
|
|
3709
|
+
console.log(`Installing env...`);
|
|
3710
|
+
await fs$1.copyFile(path.join(projectPath, ".env.example"), path.join(projectPath, ".env"));
|
|
3711
|
+
console.log(` -> ${path.join(projectPath, ".env")}`);
|
|
3709
3712
|
console.log(`Installing dependencies...`);
|
|
3710
3713
|
await runNpmInstall(projectPath);
|
|
3711
3714
|
console.log(`Done! Docker workspace created at ${projectPath}`);
|
|
@@ -3904,7 +3907,7 @@ const main$1 = async () => {
|
|
|
3904
3907
|
if (!values.help) {
|
|
3905
3908
|
return;
|
|
3906
3909
|
}
|
|
3907
|
-
process.stdout.write(`@backtest-kit/cli ${"8.
|
|
3910
|
+
process.stdout.write(`@backtest-kit/cli ${"8.4.1"}\n\n`);
|
|
3908
3911
|
process.stdout.write(HELP_TEXT);
|
|
3909
3912
|
process.exit(0);
|
|
3910
3913
|
};
|
|
@@ -3918,7 +3921,7 @@ const main = async () => {
|
|
|
3918
3921
|
if (!values.version) {
|
|
3919
3922
|
return;
|
|
3920
3923
|
}
|
|
3921
|
-
process.stdout.write(`@backtest-kit/cli ${"8.
|
|
3924
|
+
process.stdout.write(`@backtest-kit/cli ${"8.4.1"}\n`);
|
|
3922
3925
|
process.exit(0);
|
|
3923
3926
|
};
|
|
3924
3927
|
main();
|
package/build/index.mjs
CHANGED
|
@@ -2997,7 +2997,7 @@ const main$f = async () => {
|
|
|
2997
2997
|
if (MODES.some((mode) => values[mode])) {
|
|
2998
2998
|
return;
|
|
2999
2999
|
}
|
|
3000
|
-
process.stdout.write(`@backtest-kit/cli ${"8.
|
|
3000
|
+
process.stdout.write(`@backtest-kit/cli ${"8.4.1"}\n`);
|
|
3001
3001
|
process.stdout.write("\n");
|
|
3002
3002
|
process.stdout.write(`Run with --help to see available commands.\n`);
|
|
3003
3003
|
process.stdout.write("\n");
|
|
@@ -3677,6 +3677,9 @@ const main$2 = async () => {
|
|
|
3677
3677
|
}
|
|
3678
3678
|
console.log(`Creating Docker workspace in ${projectPath}`);
|
|
3679
3679
|
await copyDir(templatePath, projectPath);
|
|
3680
|
+
console.log(`Installing env...`);
|
|
3681
|
+
await copyFile(join(projectPath, ".env.example"), join(projectPath, ".env"));
|
|
3682
|
+
console.log(` -> ${join(projectPath, ".env")}`);
|
|
3680
3683
|
console.log(`Installing dependencies...`);
|
|
3681
3684
|
await runNpmInstall(projectPath);
|
|
3682
3685
|
console.log(`Done! Docker workspace created at ${projectPath}`);
|
|
@@ -3875,7 +3878,7 @@ const main$1 = async () => {
|
|
|
3875
3878
|
if (!values.help) {
|
|
3876
3879
|
return;
|
|
3877
3880
|
}
|
|
3878
|
-
process.stdout.write(`@backtest-kit/cli ${"8.
|
|
3881
|
+
process.stdout.write(`@backtest-kit/cli ${"8.4.1"}\n\n`);
|
|
3879
3882
|
process.stdout.write(HELP_TEXT);
|
|
3880
3883
|
process.exit(0);
|
|
3881
3884
|
};
|
|
@@ -3889,7 +3892,7 @@ const main = async () => {
|
|
|
3889
3892
|
if (!values.version) {
|
|
3890
3893
|
return;
|
|
3891
3894
|
}
|
|
3892
|
-
process.stdout.write(`@backtest-kit/cli ${"8.
|
|
3895
|
+
process.stdout.write(`@backtest-kit/cli ${"8.4.1"}\n`);
|
|
3893
3896
|
process.exit(0);
|
|
3894
3897
|
};
|
|
3895
3898
|
main();
|
package/docker/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<img src="https://github.com/tripolskypetr/backtest-kit/raw/refs/heads/master/assets/square_compasses.svg" height="45px" align="right">
|
|
2
|
+
|
|
3
|
+
# 🧿 Backtest Kit Docker
|
|
4
|
+
|
|
5
|
+
> A TypeScript framework for backtesting and live trading strategies on multi-asset, crypto, forex or [DEX (peer-to-peer marketplace)](https://en.wikipedia.org/wiki/Decentralized_finance#Decentralized_exchanges), spot, futures with crash-safe persistence, signal validation, and AI optimization.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
[](https://deepwiki.com/tripolskypetr/backtest-kit)
|
|
10
|
+
[](https://npmjs.org/package/backtest-kit)
|
|
11
|
+
[]()
|
|
12
|
+
|
|
13
|
+
A self-contained Docker workspace for running [backtest-kit](https://github.com/tripolskypetr/backtest-kit) strategies with automatic restarts and zero-downtime trading.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 📂 Strategy Index
|
|
18
|
+
|
|
19
|
+
| Strategy | Ticker | Period | Signal source | Net PNL | Sharpe |
|
|
20
|
+
|---|---|---|---|---|---|
|
|
21
|
+
| [DOTUSDT Feb 2021 — Python EMA Crossover](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/feb_2021.strategy) | DOTUSDT | Feb 2021 | Python EMA(9)/EMA(21) crossover via WebAssembly | **+5.52%** | **0.09** |
|
|
22
|
+
| [BTCUSDT Oct 2021 — TensorFlow Neural Network](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/oct_2021.strategy) | BTCUSDT | Oct 2021 | TensorFlow NN predicting next candle close | **+18.26%** | **0.31** |
|
|
23
|
+
| [BTCUSDT Dec 2025 — Pine Script Range Breakout](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/dec_2025.strategy) | BTCUSDT | Dec 2025 | Pine Script BB + range detector + volume spike | **+2.40%** | **0.06** |
|
|
24
|
+
| [TRXUSDT Jan 2026 — Liquidity Harvesting](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content//jan_2026.strategy) | TRXUSDT | Jan 2026 | Telegram channel signals (inverted) | **+8.58%** | **1.14** |
|
|
25
|
+
| [BTCUSDT Feb 2026 — AI News Sentiment](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/feb_2026.strategy) | BTCUSDT | Feb 2026 | LLM forecast on live news (Tavily + Ollama) | **+16.99%** | **0.25** |
|
|
26
|
+
| [BTCUSDT Mar 2026 — SHORT DCA Ladder](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/mar_2026.strategy) | BTCUSDT | Mar 2026 | Fixed SHORT gravebag signal + DCA ladder up (up to 10 rungs) | **+37.83%** | **0.35** |
|
|
27
|
+
| [BTCUSDT Apr 2026 — DCA Ladder](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/apr_2026.strategy) | BTCUSDT | Apr 2026 | Fixed LONG moonbag signal + DCA ladder down (up to 10 rungs) | **+67.85%** | **0.12** |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🚀 Quick Start
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
MODE=backtest STRATEGY_FILE=./content/feb_2026/feb_2026.strategy.ts docker-compose up -d
|
|
35
|
+
docker-compose logs -f
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 🏃 Running Modes
|
|
41
|
+
|
|
42
|
+
The container entrypoint reads `MODE` and `STRATEGY_FILE` from environment variables. Pass them inline — no file edits needed.
|
|
43
|
+
|
|
44
|
+
### 🧪 Backtest
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
MODE=backtest \
|
|
48
|
+
STRATEGY_FILE=./content/feb_2026/feb_2026.strategy.ts \
|
|
49
|
+
SYMBOL=BTCUSDT \
|
|
50
|
+
STRATEGY=feb_2026_strategy \
|
|
51
|
+
EXCHANGE=ccxt-exchange \
|
|
52
|
+
UI=1 \
|
|
53
|
+
docker-compose up -d
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 📄 Paper Trading
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
MODE=paper \
|
|
60
|
+
STRATEGY_FILE=./content/feb_2026/feb_2026.strategy.ts \
|
|
61
|
+
SYMBOL=BTCUSDT \
|
|
62
|
+
docker-compose up -d
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 📈 Live Trading
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
MODE=live \
|
|
69
|
+
STRATEGY_FILE=./content/feb_2026/feb_2026.strategy.ts \
|
|
70
|
+
SYMBOL=BTCUSDT \
|
|
71
|
+
UI=1 \
|
|
72
|
+
docker-compose up -d
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### ⚖️ Walker — A/B Comparison
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
command:
|
|
79
|
+
- --walker
|
|
80
|
+
- --symbol
|
|
81
|
+
- BTCUSDT
|
|
82
|
+
- --noCache
|
|
83
|
+
- ./content/feb_2026_v1.strategy.ts
|
|
84
|
+
- ./content/feb_2026_v2.strategy.ts
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 🌍 Environment Variables
|
|
90
|
+
|
|
91
|
+
| Variable | Required | Default | Description |
|
|
92
|
+
|----------|----------|---------|-------------|
|
|
93
|
+
| `MODE` | yes | — | `backtest` \| `live` \| `paper` \| `walker` |
|
|
94
|
+
| `STRATEGY_FILE` | yes | — | Path to strategy entry point (relative to `working_dir`) |
|
|
95
|
+
| `SYMBOL` | no | `BTCUSDT` | Trading pair |
|
|
96
|
+
| `STRATEGY` | no | first registered | Strategy name from `addStrategySchema` |
|
|
97
|
+
| `EXCHANGE` | no | first registered | Exchange name from `addExchangeSchema` |
|
|
98
|
+
| `FRAME` | no | first registered | Frame name from `addFrameSchema` (backtest only) |
|
|
99
|
+
| `UI` | no | — | Any non-empty value enables `--ui` dashboard at `http://localhost:60050` |
|
|
100
|
+
| `TELEGRAM` | no | — | Any non-empty value enables `--telegram` notifications |
|
|
101
|
+
| `VERBOSE` | no | — | Any non-empty value enables `--verbose` candle logging |
|
|
102
|
+
| `NO_CACHE` | no | — | Any non-empty value enables `--noCache` (skip cache warming) |
|
|
103
|
+
| `NO_FLUSH` | no | — | Any non-empty value enables `--noFlush` (keep report folders) |
|
|
104
|
+
|
|
105
|
+
Connection strings, API keys, and other secrets go in `.env` — it is loaded automatically by `docker-compose.yaml`.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 🗂️ Project Structure
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
├── docker-compose.yaml # service definition — edit to pin command: or add resources
|
|
113
|
+
├── .env # secrets: DB connection strings, API keys, Telegram token
|
|
114
|
+
├── .env.example # reference copy of .env
|
|
115
|
+
├── package.json # dependencies for editing strategies locally
|
|
116
|
+
├── tsconfig.json # TypeScript config for content/
|
|
117
|
+
└── content/
|
|
118
|
+
└── feb_2026/
|
|
119
|
+
├── feb_2026.strategy.ts # strategy entry point
|
|
120
|
+
└── modules/
|
|
121
|
+
└── backtest.module.ts # CCXT Binance exchange + frame schema
|
|
122
|
+
```
|
|
@@ -13,12 +13,20 @@ services:
|
|
|
13
13
|
volumes:
|
|
14
14
|
- ./:/workspace
|
|
15
15
|
working_dir: /workspace
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
env_file:
|
|
17
|
+
- .env
|
|
18
|
+
healthcheck:
|
|
19
|
+
test: ["CMD", "curl", "-f", "http://localhost:60050/api/v1/health/health_check"]
|
|
20
|
+
interval: 30s
|
|
21
|
+
timeout: 10s
|
|
22
|
+
retries: 3
|
|
23
|
+
# command:
|
|
24
|
+
# - --backtest
|
|
25
|
+
# - --symbol
|
|
26
|
+
# - BTCUSDT
|
|
27
|
+
# - --strategy
|
|
28
|
+
# - feb_2026_strategy
|
|
29
|
+
# - --exchange
|
|
30
|
+
# - ccxt-exchange
|
|
31
|
+
# - ./content/feb_2026/feb_2026.strategy.ts
|
|
32
|
+
# - --ui
|
package/docker/package.json
CHANGED
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"@types/node": "25.6.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@backtest-kit/cli": "8.
|
|
19
|
-
"@backtest-kit/graph": "8.
|
|
20
|
-
"@backtest-kit/pinets": "8.
|
|
21
|
-
"@backtest-kit/signals": "8.
|
|
22
|
-
"@backtest-kit/ui": "8.
|
|
18
|
+
"@backtest-kit/cli": "8.4.1",
|
|
19
|
+
"@backtest-kit/graph": "8.4.0",
|
|
20
|
+
"@backtest-kit/pinets": "8.4.0",
|
|
21
|
+
"@backtest-kit/signals": "8.4.0",
|
|
22
|
+
"@backtest-kit/ui": "8.4.0",
|
|
23
23
|
"@tavily/core": "0.7.2",
|
|
24
24
|
"@tensorflow/tfjs": "4.22.0",
|
|
25
25
|
"@tensorflow/tfjs-backend-wasm": "4.22.0",
|
|
26
26
|
"@tensorflow/tfjs-core": "4.22.0",
|
|
27
27
|
"agent-swarm-kit": "2.6.0",
|
|
28
|
-
"backtest-kit": "8.
|
|
28
|
+
"backtest-kit": "8.4.0",
|
|
29
29
|
"dayjs": "1.11.20",
|
|
30
30
|
"functools-kit": "2.3.0",
|
|
31
31
|
"garch": "1.2.3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.1",
|
|
4
4
|
"description": "Zero-boilerplate CLI runner for backtest-kit strategies. Run backtests, paper trading, and live bots with candle cache warming, web dashboard, and Telegram notifications — no setup code required.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@babel/plugin-transform-modules-umd": "7.27.1",
|
|
65
65
|
"@babel/standalone": "7.29.1",
|
|
66
|
-
"@backtest-kit/graph": "8.
|
|
67
|
-
"@backtest-kit/ollama": "8.
|
|
68
|
-
"@backtest-kit/pinets": "8.
|
|
69
|
-
"@backtest-kit/signals": "8.
|
|
70
|
-
"@backtest-kit/ui": "8.
|
|
66
|
+
"@backtest-kit/graph": "8.4.0",
|
|
67
|
+
"@backtest-kit/ollama": "8.4.0",
|
|
68
|
+
"@backtest-kit/pinets": "8.4.0",
|
|
69
|
+
"@backtest-kit/signals": "8.4.0",
|
|
70
|
+
"@backtest-kit/ui": "8.4.0",
|
|
71
71
|
"@rollup/plugin-replace": "6.0.3",
|
|
72
72
|
"@rollup/plugin-typescript": "11.1.6",
|
|
73
73
|
"@types/image-size": "0.7.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@types/mustache": "4.2.6",
|
|
76
76
|
"@types/node": "22.9.0",
|
|
77
77
|
"@types/stack-trace": "0.0.33",
|
|
78
|
-
"backtest-kit": "8.
|
|
78
|
+
"backtest-kit": "8.4.0",
|
|
79
79
|
"glob": "11.0.1",
|
|
80
80
|
"markdown-it": "14.1.1",
|
|
81
81
|
"rimraf": "6.0.1",
|
|
@@ -90,12 +90,12 @@
|
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@babel/plugin-transform-modules-umd": "^7.27.1",
|
|
92
92
|
"@babel/standalone": "^7.29.1",
|
|
93
|
-
"@backtest-kit/graph": "^8.
|
|
94
|
-
"@backtest-kit/ollama": "^8.
|
|
95
|
-
"@backtest-kit/pinets": "^8.
|
|
96
|
-
"@backtest-kit/signals": "^8.
|
|
97
|
-
"@backtest-kit/ui": "^8.
|
|
98
|
-
"backtest-kit": "^8.
|
|
93
|
+
"@backtest-kit/graph": "^8.4.0",
|
|
94
|
+
"@backtest-kit/ollama": "^8.4.0",
|
|
95
|
+
"@backtest-kit/pinets": "^8.4.0",
|
|
96
|
+
"@backtest-kit/signals": "^8.4.0",
|
|
97
|
+
"@backtest-kit/ui": "^8.4.0",
|
|
98
|
+
"backtest-kit": "^8.4.0",
|
|
99
99
|
"markdown-it": "^14.1.1",
|
|
100
100
|
"typescript": "^5.0.0"
|
|
101
101
|
},
|
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
|
|
12
12
|
A minimal project scaffold for [backtest-kit](https://github.com/tripolskypetr/backtest-kit). All infrastructure (exchange registration, candle caching, runner, UI, Telegram) is handled by `@backtest-kit/cli` — this project contains only your strategy files.
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
## 📂 Strategy Index
|
|
16
|
+
|
|
17
|
+
| Strategy | Ticker | Period | Signal source | Net PNL | Sharpe |
|
|
18
|
+
|---|---|---|---|---|---|
|
|
19
|
+
| [DOTUSDT Feb 2021 — Python EMA Crossover](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/feb_2021.strategy) | DOTUSDT | Feb 2021 | Python EMA(9)/EMA(21) crossover via WebAssembly | **+5.52%** | **0.09** |
|
|
20
|
+
| [BTCUSDT Oct 2021 — TensorFlow Neural Network](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/oct_2021.strategy) | BTCUSDT | Oct 2021 | TensorFlow NN predicting next candle close | **+18.26%** | **0.31** |
|
|
21
|
+
| [BTCUSDT Dec 2025 — Pine Script Range Breakout](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/dec_2025.strategy) | BTCUSDT | Dec 2025 | Pine Script BB + range detector + volume spike | **+2.40%** | **0.06** |
|
|
22
|
+
| [TRXUSDT Jan 2026 — Liquidity Harvesting](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content//jan_2026.strategy) | TRXUSDT | Jan 2026 | Telegram channel signals (inverted) | **+8.58%** | **1.14** |
|
|
23
|
+
| [BTCUSDT Feb 2026 — AI News Sentiment](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/feb_2026.strategy) | BTCUSDT | Feb 2026 | LLM forecast on live news (Tavily + Ollama) | **+16.99%** | **0.25** |
|
|
24
|
+
| [BTCUSDT Mar 2026 — SHORT DCA Ladder](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/mar_2026.strategy) | BTCUSDT | Mar 2026 | Fixed SHORT gravebag signal + DCA ladder up (up to 10 rungs) | **+37.83%** | **0.35** |
|
|
25
|
+
| [BTCUSDT Apr 2026 — DCA Ladder](https://github.com/tripolskypetr/backtest-kit/tree/master/example/content/apr_2026.strategy) | BTCUSDT | Apr 2026 | Fixed LONG moonbag signal + DCA ladder down (up to 10 rungs) | **+67.85%** | **0.12** |
|
|
26
|
+
|
|
27
|
+
|
|
14
28
|
## 📋 Quick Start
|
|
15
29
|
|
|
16
30
|
```bash
|
|
@@ -87,7 +101,7 @@ npm start -- --live --symbol BTCUSDT --ui --telegram ./content/feb_2026.strategy
|
|
|
87
101
|
|
|
88
102
|
Module file `./modules/live.module.ts` is loaded automatically if it exists. Use it to register a `Broker` adapter that intercepts every trade mutation before internal state changes — exchange rejection rolls back the operation atomically.
|
|
89
103
|
|
|
90
|
-
## ⚖️ Walker — A/B
|
|
104
|
+
## ⚖️ Walker — A/B Comparison
|
|
91
105
|
|
|
92
106
|
Runs the same historical period across multiple strategy files and prints a ranked comparison report. Use it to pick the best variant before committing to a single strategy.
|
|
93
107
|
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"type": "commonjs",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@backtest-kit/cli": "^8.
|
|
17
|
-
"@backtest-kit/graph": "^8.
|
|
18
|
-
"@backtest-kit/pinets": "^8.
|
|
19
|
-
"@backtest-kit/ui": "^8.
|
|
16
|
+
"@backtest-kit/cli": "^8.4.1",
|
|
17
|
+
"@backtest-kit/graph": "^8.4.0",
|
|
18
|
+
"@backtest-kit/pinets": "^8.4.0",
|
|
19
|
+
"@backtest-kit/ui": "^8.4.0",
|
|
20
20
|
"agent-swarm-kit": "^2.6.0",
|
|
21
|
-
"backtest-kit": "^8.
|
|
21
|
+
"backtest-kit": "^8.4.0",
|
|
22
22
|
"functools-kit": "^2.3.0",
|
|
23
23
|
"garch": "^1.2.3",
|
|
24
24
|
"get-moment-stamp": "^1.1.2",
|