backtest-kit 1.5.10 → 1.5.12
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 +11 -0
- package/build/index.mjs +11 -0
- package/package.json +1 -1
- package/types.d.ts +3 -0
package/build/index.cjs
CHANGED
|
@@ -9321,6 +9321,8 @@ class OptimizerTemplateService {
|
|
|
9321
9321
|
``,
|
|
9322
9322
|
` await dumpJson(resultId, messages, result);`,
|
|
9323
9323
|
``,
|
|
9324
|
+
` result.id = resultId;`,
|
|
9325
|
+
``,
|
|
9324
9326
|
` return result;`,
|
|
9325
9327
|
` },`,
|
|
9326
9328
|
`});`
|
|
@@ -13496,6 +13498,8 @@ class BacktestInstance {
|
|
|
13496
13498
|
constructor(symbol, strategyName) {
|
|
13497
13499
|
this.symbol = symbol;
|
|
13498
13500
|
this.strategyName = strategyName;
|
|
13501
|
+
/** A randomly generated string. */
|
|
13502
|
+
this.id = functoolsKit.randomString();
|
|
13499
13503
|
/** Internal flag indicating if backtest was stopped manually */
|
|
13500
13504
|
this._isStopped = false;
|
|
13501
13505
|
/** Internal flag indicating if backtest task completed */
|
|
@@ -13532,6 +13536,7 @@ class BacktestInstance {
|
|
|
13532
13536
|
this.getStatus = async () => {
|
|
13533
13537
|
backtest$1.loggerService.info(BACKTEST_METHOD_NAME_GET_STATUS);
|
|
13534
13538
|
return {
|
|
13539
|
+
id: this.id,
|
|
13535
13540
|
symbol: this.symbol,
|
|
13536
13541
|
strategyName: this.strategyName,
|
|
13537
13542
|
status: this.task.getStatus(),
|
|
@@ -13982,6 +13987,8 @@ class LiveInstance {
|
|
|
13982
13987
|
constructor(symbol, strategyName) {
|
|
13983
13988
|
this.symbol = symbol;
|
|
13984
13989
|
this.strategyName = strategyName;
|
|
13990
|
+
/** A randomly generated string. */
|
|
13991
|
+
this.id = functoolsKit.randomString();
|
|
13985
13992
|
/** Internal flag indicating if live trading was stopped manually */
|
|
13986
13993
|
this._isStopped = false;
|
|
13987
13994
|
/** Internal flag indicating if live trading task completed */
|
|
@@ -14018,6 +14025,7 @@ class LiveInstance {
|
|
|
14018
14025
|
this.getStatus = async () => {
|
|
14019
14026
|
backtest$1.loggerService.info(LIVE_METHOD_NAME_GET_STATUS);
|
|
14020
14027
|
return {
|
|
14028
|
+
id: this.id,
|
|
14021
14029
|
symbol: this.symbol,
|
|
14022
14030
|
strategyName: this.strategyName,
|
|
14023
14031
|
status: this.task.getStatus(),
|
|
@@ -14730,6 +14738,8 @@ class WalkerInstance {
|
|
|
14730
14738
|
constructor(symbol, walkerName) {
|
|
14731
14739
|
this.symbol = symbol;
|
|
14732
14740
|
this.walkerName = walkerName;
|
|
14741
|
+
/** A randomly generated string. */
|
|
14742
|
+
this.id = functoolsKit.randomString();
|
|
14733
14743
|
/** Internal flag indicating if walker was stopped manually */
|
|
14734
14744
|
this._isStopped = false;
|
|
14735
14745
|
/** Internal flag indicating if walker task completed */
|
|
@@ -14766,6 +14776,7 @@ class WalkerInstance {
|
|
|
14766
14776
|
this.getStatus = async () => {
|
|
14767
14777
|
backtest$1.loggerService.info(WALKER_METHOD_NAME_GET_STATUS);
|
|
14768
14778
|
return {
|
|
14779
|
+
id: this.id,
|
|
14769
14780
|
symbol: this.symbol,
|
|
14770
14781
|
walkerName: this.walkerName,
|
|
14771
14782
|
status: this.task.getStatus(),
|
package/build/index.mjs
CHANGED
|
@@ -9319,6 +9319,8 @@ class OptimizerTemplateService {
|
|
|
9319
9319
|
``,
|
|
9320
9320
|
` await dumpJson(resultId, messages, result);`,
|
|
9321
9321
|
``,
|
|
9322
|
+
` result.id = resultId;`,
|
|
9323
|
+
``,
|
|
9322
9324
|
` return result;`,
|
|
9323
9325
|
` },`,
|
|
9324
9326
|
`});`
|
|
@@ -13494,6 +13496,8 @@ class BacktestInstance {
|
|
|
13494
13496
|
constructor(symbol, strategyName) {
|
|
13495
13497
|
this.symbol = symbol;
|
|
13496
13498
|
this.strategyName = strategyName;
|
|
13499
|
+
/** A randomly generated string. */
|
|
13500
|
+
this.id = randomString();
|
|
13497
13501
|
/** Internal flag indicating if backtest was stopped manually */
|
|
13498
13502
|
this._isStopped = false;
|
|
13499
13503
|
/** Internal flag indicating if backtest task completed */
|
|
@@ -13530,6 +13534,7 @@ class BacktestInstance {
|
|
|
13530
13534
|
this.getStatus = async () => {
|
|
13531
13535
|
backtest$1.loggerService.info(BACKTEST_METHOD_NAME_GET_STATUS);
|
|
13532
13536
|
return {
|
|
13537
|
+
id: this.id,
|
|
13533
13538
|
symbol: this.symbol,
|
|
13534
13539
|
strategyName: this.strategyName,
|
|
13535
13540
|
status: this.task.getStatus(),
|
|
@@ -13980,6 +13985,8 @@ class LiveInstance {
|
|
|
13980
13985
|
constructor(symbol, strategyName) {
|
|
13981
13986
|
this.symbol = symbol;
|
|
13982
13987
|
this.strategyName = strategyName;
|
|
13988
|
+
/** A randomly generated string. */
|
|
13989
|
+
this.id = randomString();
|
|
13983
13990
|
/** Internal flag indicating if live trading was stopped manually */
|
|
13984
13991
|
this._isStopped = false;
|
|
13985
13992
|
/** Internal flag indicating if live trading task completed */
|
|
@@ -14016,6 +14023,7 @@ class LiveInstance {
|
|
|
14016
14023
|
this.getStatus = async () => {
|
|
14017
14024
|
backtest$1.loggerService.info(LIVE_METHOD_NAME_GET_STATUS);
|
|
14018
14025
|
return {
|
|
14026
|
+
id: this.id,
|
|
14019
14027
|
symbol: this.symbol,
|
|
14020
14028
|
strategyName: this.strategyName,
|
|
14021
14029
|
status: this.task.getStatus(),
|
|
@@ -14728,6 +14736,8 @@ class WalkerInstance {
|
|
|
14728
14736
|
constructor(symbol, walkerName) {
|
|
14729
14737
|
this.symbol = symbol;
|
|
14730
14738
|
this.walkerName = walkerName;
|
|
14739
|
+
/** A randomly generated string. */
|
|
14740
|
+
this.id = randomString();
|
|
14731
14741
|
/** Internal flag indicating if walker was stopped manually */
|
|
14732
14742
|
this._isStopped = false;
|
|
14733
14743
|
/** Internal flag indicating if walker task completed */
|
|
@@ -14764,6 +14774,7 @@ class WalkerInstance {
|
|
|
14764
14774
|
this.getStatus = async () => {
|
|
14765
14775
|
backtest$1.loggerService.info(WALKER_METHOD_NAME_GET_STATUS);
|
|
14766
14776
|
return {
|
|
14777
|
+
id: this.id,
|
|
14767
14778
|
symbol: this.symbol,
|
|
14768
14779
|
walkerName: this.walkerName,
|
|
14769
14780
|
status: this.task.getStatus(),
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -5287,6 +5287,7 @@ declare class BacktestUtils {
|
|
|
5287
5287
|
* ```
|
|
5288
5288
|
*/
|
|
5289
5289
|
list: () => Promise<{
|
|
5290
|
+
id: string;
|
|
5290
5291
|
symbol: string;
|
|
5291
5292
|
strategyName: string;
|
|
5292
5293
|
status: "pending" | "fulfilled" | "rejected" | "ready";
|
|
@@ -5463,6 +5464,7 @@ declare class LiveUtils {
|
|
|
5463
5464
|
* ```
|
|
5464
5465
|
*/
|
|
5465
5466
|
list: () => Promise<{
|
|
5467
|
+
id: string;
|
|
5466
5468
|
symbol: string;
|
|
5467
5469
|
strategyName: string;
|
|
5468
5470
|
status: "pending" | "fulfilled" | "rejected" | "ready";
|
|
@@ -5817,6 +5819,7 @@ declare class WalkerUtils {
|
|
|
5817
5819
|
* ```
|
|
5818
5820
|
*/
|
|
5819
5821
|
list: () => Promise<{
|
|
5822
|
+
id: string;
|
|
5820
5823
|
symbol: string;
|
|
5821
5824
|
walkerName: string;
|
|
5822
5825
|
status: "pending" | "fulfilled" | "rejected" | "ready";
|