backtest-kit 1.4.14 → 1.4.15
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/build/index.cjs +6 -6
- package/build/index.mjs +6 -6
- package/package.json +1 -1
- package/types.d.ts +3 -3
package/build/index.cjs
CHANGED
|
@@ -7111,7 +7111,7 @@ class PerformanceStorage {
|
|
|
7111
7111
|
* console.log("Bottlenecks:", stats.metricStats);
|
|
7112
7112
|
*
|
|
7113
7113
|
* // Save report to disk
|
|
7114
|
-
* await Performance.dump("my-strategy");
|
|
7114
|
+
* await Performance.dump("BTCUSDT", "my-strategy");
|
|
7115
7115
|
* ```
|
|
7116
7116
|
*/
|
|
7117
7117
|
class PerformanceMarkdownService {
|
|
@@ -8997,7 +8997,7 @@ class OptimizerTemplateService {
|
|
|
8997
8997
|
``,
|
|
8998
8998
|
`listenDoneBacktest((event) => {`,
|
|
8999
8999
|
` console.log("Backtest completed:", event.symbol);`,
|
|
9000
|
-
` Backtest.dump(event.strategyName);`,
|
|
9000
|
+
` Backtest.dump(event.symbol, event.strategyName);`,
|
|
9001
9001
|
`});`,
|
|
9002
9002
|
``,
|
|
9003
9003
|
`listenError((error) => {`,
|
|
@@ -10654,7 +10654,7 @@ class PartialMarkdownService {
|
|
|
10654
10654
|
* Memoized function to get or create ReportStorage for a symbol-strategy pair.
|
|
10655
10655
|
* Each symbol-strategy combination gets its own isolated storage instance.
|
|
10656
10656
|
*/
|
|
10657
|
-
this.getStorage = functoolsKit.memoize(([symbol, strategyName]) =>
|
|
10657
|
+
this.getStorage = functoolsKit.memoize(([symbol, strategyName]) => `${symbol}:${strategyName}`, () => new ReportStorage());
|
|
10658
10658
|
/**
|
|
10659
10659
|
* Processes profit events and accumulates them.
|
|
10660
10660
|
* Should be called from partialProfitSubject subscription.
|
|
@@ -10791,7 +10791,7 @@ class PartialMarkdownService {
|
|
|
10791
10791
|
ctx,
|
|
10792
10792
|
});
|
|
10793
10793
|
if (ctx) {
|
|
10794
|
-
const key =
|
|
10794
|
+
const key = `${ctx.symbol}:${ctx.strategyName}`;
|
|
10795
10795
|
this.getStorage.clear(key);
|
|
10796
10796
|
}
|
|
10797
10797
|
else {
|
|
@@ -13378,7 +13378,7 @@ const SCHEDULE_METHOD_NAME_DUMP = "ScheduleUtils.dump";
|
|
|
13378
13378
|
* console.log(`Average wait time: ${stats.avgWaitTime} minutes`);
|
|
13379
13379
|
*
|
|
13380
13380
|
* // Generate and save report
|
|
13381
|
-
* await Schedule.dump("my-strategy");
|
|
13381
|
+
* await Schedule.dump("BTCUSDT", "my-strategy");
|
|
13382
13382
|
* ```
|
|
13383
13383
|
*/
|
|
13384
13384
|
class ScheduleUtils {
|
|
@@ -13490,7 +13490,7 @@ const Schedule = new ScheduleUtils();
|
|
|
13490
13490
|
* .slice(0, 5));
|
|
13491
13491
|
*
|
|
13492
13492
|
* // Generate and save report
|
|
13493
|
-
* await Performance.dump("my-strategy");
|
|
13493
|
+
* await Performance.dump("BTCUSDT", "my-strategy");
|
|
13494
13494
|
* ```
|
|
13495
13495
|
*/
|
|
13496
13496
|
class Performance {
|
package/build/index.mjs
CHANGED
|
@@ -7109,7 +7109,7 @@ class PerformanceStorage {
|
|
|
7109
7109
|
* console.log("Bottlenecks:", stats.metricStats);
|
|
7110
7110
|
*
|
|
7111
7111
|
* // Save report to disk
|
|
7112
|
-
* await Performance.dump("my-strategy");
|
|
7112
|
+
* await Performance.dump("BTCUSDT", "my-strategy");
|
|
7113
7113
|
* ```
|
|
7114
7114
|
*/
|
|
7115
7115
|
class PerformanceMarkdownService {
|
|
@@ -8995,7 +8995,7 @@ class OptimizerTemplateService {
|
|
|
8995
8995
|
``,
|
|
8996
8996
|
`listenDoneBacktest((event) => {`,
|
|
8997
8997
|
` console.log("Backtest completed:", event.symbol);`,
|
|
8998
|
-
` Backtest.dump(event.strategyName);`,
|
|
8998
|
+
` Backtest.dump(event.symbol, event.strategyName);`,
|
|
8999
8999
|
`});`,
|
|
9000
9000
|
``,
|
|
9001
9001
|
`listenError((error) => {`,
|
|
@@ -10652,7 +10652,7 @@ class PartialMarkdownService {
|
|
|
10652
10652
|
* Memoized function to get or create ReportStorage for a symbol-strategy pair.
|
|
10653
10653
|
* Each symbol-strategy combination gets its own isolated storage instance.
|
|
10654
10654
|
*/
|
|
10655
|
-
this.getStorage = memoize(([symbol, strategyName]) =>
|
|
10655
|
+
this.getStorage = memoize(([symbol, strategyName]) => `${symbol}:${strategyName}`, () => new ReportStorage());
|
|
10656
10656
|
/**
|
|
10657
10657
|
* Processes profit events and accumulates them.
|
|
10658
10658
|
* Should be called from partialProfitSubject subscription.
|
|
@@ -10789,7 +10789,7 @@ class PartialMarkdownService {
|
|
|
10789
10789
|
ctx,
|
|
10790
10790
|
});
|
|
10791
10791
|
if (ctx) {
|
|
10792
|
-
const key =
|
|
10792
|
+
const key = `${ctx.symbol}:${ctx.strategyName}`;
|
|
10793
10793
|
this.getStorage.clear(key);
|
|
10794
10794
|
}
|
|
10795
10795
|
else {
|
|
@@ -13376,7 +13376,7 @@ const SCHEDULE_METHOD_NAME_DUMP = "ScheduleUtils.dump";
|
|
|
13376
13376
|
* console.log(`Average wait time: ${stats.avgWaitTime} minutes`);
|
|
13377
13377
|
*
|
|
13378
13378
|
* // Generate and save report
|
|
13379
|
-
* await Schedule.dump("my-strategy");
|
|
13379
|
+
* await Schedule.dump("BTCUSDT", "my-strategy");
|
|
13380
13380
|
* ```
|
|
13381
13381
|
*/
|
|
13382
13382
|
class ScheduleUtils {
|
|
@@ -13488,7 +13488,7 @@ const Schedule = new ScheduleUtils();
|
|
|
13488
13488
|
* .slice(0, 5));
|
|
13489
13489
|
*
|
|
13490
13490
|
* // Generate and save report
|
|
13491
|
-
* await Performance.dump("my-strategy");
|
|
13491
|
+
* await Performance.dump("BTCUSDT", "my-strategy");
|
|
13492
13492
|
* ```
|
|
13493
13493
|
*/
|
|
13494
13494
|
class Performance {
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -4240,7 +4240,7 @@ interface PerformanceStatistics {
|
|
|
4240
4240
|
* console.log("Bottlenecks:", stats.metricStats);
|
|
4241
4241
|
*
|
|
4242
4242
|
* // Save report to disk
|
|
4243
|
-
* await Performance.dump("my-strategy");
|
|
4243
|
+
* await Performance.dump("BTCUSDT", "my-strategy");
|
|
4244
4244
|
* ```
|
|
4245
4245
|
*/
|
|
4246
4246
|
declare class PerformanceMarkdownService {
|
|
@@ -5402,7 +5402,7 @@ declare const Live: LiveUtils;
|
|
|
5402
5402
|
* console.log(`Average wait time: ${stats.avgWaitTime} minutes`);
|
|
5403
5403
|
*
|
|
5404
5404
|
* // Generate and save report
|
|
5405
|
-
* await Schedule.dump("my-strategy");
|
|
5405
|
+
* await Schedule.dump("BTCUSDT", "my-strategy");
|
|
5406
5406
|
* ```
|
|
5407
5407
|
*/
|
|
5408
5408
|
declare class ScheduleUtils {
|
|
@@ -5493,7 +5493,7 @@ declare const Schedule: ScheduleUtils;
|
|
|
5493
5493
|
* .slice(0, 5));
|
|
5494
5494
|
*
|
|
5495
5495
|
* // Generate and save report
|
|
5496
|
-
* await Performance.dump("my-strategy");
|
|
5496
|
+
* await Performance.dump("BTCUSDT", "my-strategy");
|
|
5497
5497
|
* ```
|
|
5498
5498
|
*/
|
|
5499
5499
|
declare class Performance {
|