@backtest-kit/cli 7.3.1 → 7.5.0
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 +153 -0
- package/build/index.cjs +296 -26
- package/build/index.mjs +297 -27
- package/package.json +13 -13
- package/template/project/package.mustache +5 -5
- package/template/signal-info.mustache +20 -20
- package/types.d.ts +35 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/cli",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
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",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@babel/plugin-transform-modules-umd": "7.27.1",
|
|
64
64
|
"@babel/standalone": "7.29.1",
|
|
65
|
-
"@backtest-kit/graph": "7.
|
|
66
|
-
"@backtest-kit/ollama": "7.
|
|
67
|
-
"@backtest-kit/pinets": "7.
|
|
68
|
-
"@backtest-kit/signals": "7.
|
|
69
|
-
"@backtest-kit/ui": "7.
|
|
65
|
+
"@backtest-kit/graph": "7.5.0",
|
|
66
|
+
"@backtest-kit/ollama": "7.5.0",
|
|
67
|
+
"@backtest-kit/pinets": "7.5.0",
|
|
68
|
+
"@backtest-kit/signals": "7.5.0",
|
|
69
|
+
"@backtest-kit/ui": "7.5.0",
|
|
70
70
|
"@rollup/plugin-replace": "6.0.3",
|
|
71
71
|
"@rollup/plugin-typescript": "11.1.6",
|
|
72
72
|
"@types/image-size": "0.7.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@types/mustache": "4.2.6",
|
|
75
75
|
"@types/node": "22.9.0",
|
|
76
76
|
"@types/stack-trace": "0.0.33",
|
|
77
|
-
"backtest-kit": "7.
|
|
77
|
+
"backtest-kit": "7.5.0",
|
|
78
78
|
"glob": "11.0.1",
|
|
79
79
|
"markdown-it": "14.1.1",
|
|
80
80
|
"rimraf": "6.0.1",
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@babel/plugin-transform-modules-umd": "^7.27.1",
|
|
91
91
|
"@babel/standalone": "^7.29.1",
|
|
92
|
-
"@backtest-kit/graph": "^7.
|
|
93
|
-
"@backtest-kit/ollama": "^7.
|
|
94
|
-
"@backtest-kit/pinets": "^7.
|
|
95
|
-
"@backtest-kit/signals": "^7.
|
|
96
|
-
"@backtest-kit/ui": "^7.
|
|
97
|
-
"backtest-kit": "^7.
|
|
92
|
+
"@backtest-kit/graph": "^7.5.0",
|
|
93
|
+
"@backtest-kit/ollama": "^7.5.0",
|
|
94
|
+
"@backtest-kit/pinets": "^7.5.0",
|
|
95
|
+
"@backtest-kit/signals": "^7.5.0",
|
|
96
|
+
"@backtest-kit/ui": "^7.5.0",
|
|
97
|
+
"backtest-kit": "^7.5.0",
|
|
98
98
|
"markdown-it": "^14.1.1",
|
|
99
99
|
"typescript": "^5.0.0"
|
|
100
100
|
},
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"type": "commonjs",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@backtest-kit/cli": "^7.
|
|
17
|
-
"@backtest-kit/graph": "^7.
|
|
18
|
-
"@backtest-kit/pinets": "^7.
|
|
19
|
-
"@backtest-kit/ui": "^7.
|
|
16
|
+
"@backtest-kit/cli": "^7.5.0",
|
|
17
|
+
"@backtest-kit/graph": "^7.5.0",
|
|
18
|
+
"@backtest-kit/pinets": "^7.5.0",
|
|
19
|
+
"@backtest-kit/ui": "^7.5.0",
|
|
20
20
|
"agent-swarm-kit": "^2.6.0",
|
|
21
|
-
"backtest-kit": "^7.
|
|
21
|
+
"backtest-kit": "^7.5.0",
|
|
22
22
|
"functools-kit": "^2.3.0",
|
|
23
23
|
"garch": "^1.2.3",
|
|
24
24
|
"get-moment-stamp": "^1.1.2",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
**ℹ️ Signal Info**
|
|
2
|
-
|
|
3
|
-
**Symbol:** `{{symbol}}` ({{data.position}})
|
|
4
|
-
**Current:** `{{currentPrice}}`
|
|
5
|
-
**Entry:** `{{data.priceOpen}}`
|
|
6
|
-
**Orig Entry:** `{{data.originalPriceOpen}}`
|
|
7
|
-
**DCA Entries:** `{{data.totalEntries}}`
|
|
8
|
-
**Partials Done:** `{{data.totalPartials}}`
|
|
9
|
-
**Take Profit:** `{{data.priceTakeProfit}}`
|
|
10
|
-
**Stop Loss:** `{{data.priceStopLoss}}`
|
|
11
|
-
**Orig TP:** `{{data.originalPriceTakeProfit}}`
|
|
12
|
-
**Orig SL:** `{{data.originalPriceStopLoss}}`
|
|
13
|
-
**PnL:** {{data.pnl.pnlPercentage}}% ({{data.pnl.pnlCost}} / {{data.pnl.pnlEntries}})
|
|
14
|
-
**Peak Profit:** {{data.peakProfit.pnlPercentage}}% ({{data.peakProfit.pnlCost}} / {{data.peakProfit.pnlEntries}})
|
|
15
|
-
**Max Drawdown:** {{data.maxDrawdown.pnlPercentage}}% ({{data.maxDrawdown.pnlCost}} / {{data.maxDrawdown.pnlEntries}})
|
|
16
|
-
**Signal ID:** `{{data.id}}`
|
|
17
|
-
**Time:** `{{timestamp}}`
|
|
18
|
-
|
|
19
|
-
{{#backtest}}
|
|
20
|
-
_🧪 Backtest_
|
|
1
|
+
**ℹ️ Signal Info**
|
|
2
|
+
|
|
3
|
+
**Symbol:** `{{symbol}}` ({{data.position}})
|
|
4
|
+
**Current:** `{{currentPrice}}`
|
|
5
|
+
**Entry:** `{{data.priceOpen}}`
|
|
6
|
+
**Orig Entry:** `{{data.originalPriceOpen}}`
|
|
7
|
+
**DCA Entries:** `{{data.totalEntries}}`
|
|
8
|
+
**Partials Done:** `{{data.totalPartials}}`
|
|
9
|
+
**Take Profit:** `{{data.priceTakeProfit}}`
|
|
10
|
+
**Stop Loss:** `{{data.priceStopLoss}}`
|
|
11
|
+
**Orig TP:** `{{data.originalPriceTakeProfit}}`
|
|
12
|
+
**Orig SL:** `{{data.originalPriceStopLoss}}`
|
|
13
|
+
**PnL:** {{data.pnl.pnlPercentage}}% ({{data.pnl.pnlCost}} / {{data.pnl.pnlEntries}})
|
|
14
|
+
**Peak Profit:** {{data.peakProfit.pnlPercentage}}% ({{data.peakProfit.pnlCost}} / {{data.peakProfit.pnlEntries}})
|
|
15
|
+
**Max Drawdown:** {{data.maxDrawdown.pnlPercentage}}% ({{data.maxDrawdown.pnlCost}} / {{data.maxDrawdown.pnlEntries}})
|
|
16
|
+
**Signal ID:** `{{data.id}}`
|
|
17
|
+
**Time:** `{{timestamp}}`
|
|
18
|
+
|
|
19
|
+
{{#backtest}}
|
|
20
|
+
_🧪 Backtest_
|
|
21
21
|
{{/backtest}}
|
package/types.d.ts
CHANGED
|
@@ -317,9 +317,43 @@ declare class TelegramLogicService {
|
|
|
317
317
|
connect: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
interface NotificationConfig {
|
|
321
|
+
signal: boolean;
|
|
322
|
+
risk: boolean;
|
|
323
|
+
info: boolean;
|
|
324
|
+
breakeven: boolean;
|
|
325
|
+
common_error: boolean;
|
|
326
|
+
critical_error: boolean;
|
|
327
|
+
validation_error: boolean;
|
|
328
|
+
partial_loss: boolean;
|
|
329
|
+
partial_profit: boolean;
|
|
330
|
+
signal_sync: boolean;
|
|
331
|
+
strategy_commit: boolean;
|
|
332
|
+
}
|
|
333
|
+
interface TelegramConfig {
|
|
334
|
+
getTrailingTakeMarkdown(event: TrailingTakeCommit): Promise<string>;
|
|
335
|
+
getTrailingStopMarkdown(event: TrailingStopCommit): Promise<string>;
|
|
336
|
+
getBreakevenMarkdown(event: BreakevenCommit): Promise<string>;
|
|
337
|
+
getPartialProfitMarkdown(event: PartialProfitCommit): Promise<string>;
|
|
338
|
+
getPartialLossMarkdown(event: PartialLossCommit): Promise<string>;
|
|
339
|
+
getScheduledMarkdown(event: IStrategyTickResultScheduled): Promise<string>;
|
|
340
|
+
getCancelledMarkdown(event: IStrategyTickResultCancelled): Promise<string>;
|
|
341
|
+
getOpenedMarkdown(event: IStrategyTickResultOpened): Promise<string>;
|
|
342
|
+
getClosedMarkdown(event: IStrategyTickResultClosed): Promise<string>;
|
|
343
|
+
getRiskMarkdown(event: RiskContract): Promise<string>;
|
|
344
|
+
getAverageBuyMarkdown(event: AverageBuyCommit): Promise<string>;
|
|
345
|
+
getSignalOpenMarkdown(event: SignalOpenContract): Promise<string>;
|
|
346
|
+
getSignalCloseMarkdown(event: SignalCloseContract): Promise<string>;
|
|
347
|
+
getCancelScheduledMarkdown(event: CancelScheduledCommit): Promise<string>;
|
|
348
|
+
getClosePendingMarkdown(event: ClosePendingCommit): Promise<string>;
|
|
349
|
+
getSignalInfoMarkdown(event: SignalInfoContract): Promise<string>;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
declare class TelegramTemplateService implements TelegramConfig {
|
|
321
353
|
readonly loggerService: LoggerService;
|
|
322
354
|
readonly resolveService: ResolveService;
|
|
355
|
+
readonly configConnectionService: ConfigConnectionService;
|
|
356
|
+
private getTelegramAdapter;
|
|
323
357
|
getTrailingTakeMarkdown: (event: TrailingTakeCommit) => Promise<string>;
|
|
324
358
|
getTrailingStopMarkdown: (event: TrailingStopCommit) => Promise<string>;
|
|
325
359
|
getBreakevenMarkdown: (event: BreakevenCommit) => Promise<string>;
|
|
@@ -345,20 +379,6 @@ declare class ModuleConnectionService {
|
|
|
345
379
|
loadModule: (fileName: string) => Promise<boolean>;
|
|
346
380
|
}
|
|
347
381
|
|
|
348
|
-
interface NotificationConfig {
|
|
349
|
-
signal: boolean;
|
|
350
|
-
risk: boolean;
|
|
351
|
-
info: boolean;
|
|
352
|
-
breakeven: boolean;
|
|
353
|
-
common_error: boolean;
|
|
354
|
-
critical_error: boolean;
|
|
355
|
-
validation_error: boolean;
|
|
356
|
-
partial_loss: boolean;
|
|
357
|
-
partial_profit: boolean;
|
|
358
|
-
signal_sync: boolean;
|
|
359
|
-
strategy_commit: boolean;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
382
|
declare class ConfigService {
|
|
363
383
|
readonly loggerService: LoggerService;
|
|
364
384
|
readonly configConnectionService: ConfigConnectionService;
|