@tradejs/cli 3.1.29-beta.296 → 3.1.29-beta.297
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/dist/cli.js +423 -213
- package/dist/lib/coinMarketCapContextBackfill.js +21 -5
- package/dist/lib/derivativesContextBackfill.js +14 -0
- package/dist/lib/marketContextPrepare.js +21 -5
- package/dist/scripts/backtest.js +21 -5
- package/dist/scripts/coverageBackfill.js +1731 -0
- package/dist/scripts/replay.js +21 -5
- package/dist/scripts/replayRunner.js +21 -5
- package/dist/scripts/replayRuntimeEvidence.js +4 -1
- package/dist/scripts/runtimeParity.js +21 -5
- package/dist/scripts/signals.js +21 -5
- package/dist/scripts/signalsDaemon.js +21 -5
- package/package.json +7 -7
package/dist/scripts/replay.js
CHANGED
|
@@ -3703,11 +3703,27 @@ var backfillCoinMarketCapContext = async (params) => {
|
|
|
3703
3703
|
toMs
|
|
3704
3704
|
})
|
|
3705
3705
|
);
|
|
3706
|
-
const
|
|
3707
|
-
const
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3706
|
+
const ready = (dataset, existing) => params.repairDataset ? params.repairDataset !== dataset : existing;
|
|
3707
|
+
const globalDailyReady = ready(
|
|
3708
|
+
"cmc-global-1d",
|
|
3709
|
+
globalDailyCached || globalDailyBackfillCovered
|
|
3710
|
+
);
|
|
3711
|
+
const referencesDailyReady = ready(
|
|
3712
|
+
"cmc-reference_asset-1d",
|
|
3713
|
+
referencesDailyCached || referencesDailyBackfillCovered
|
|
3714
|
+
);
|
|
3715
|
+
const exchangeLiquidityReady = ready(
|
|
3716
|
+
"cmc-exchange_liquidity-1d",
|
|
3717
|
+
exchangeLiquidityCached || !exchangeLiquidityEnabled || exchangeLiquidityBackfillCovered
|
|
3718
|
+
);
|
|
3719
|
+
const fearGreedReady = ready(
|
|
3720
|
+
"cmc-fear_greed-1d",
|
|
3721
|
+
fearGreedCached || !fearGreedEnabled || fearGreedBackfillCovered
|
|
3722
|
+
);
|
|
3723
|
+
const indexesReady = ready(
|
|
3724
|
+
"cmc-index-1d",
|
|
3725
|
+
indexesCached || indexesBackfillCovered
|
|
3726
|
+
);
|
|
3711
3727
|
let globalStatus = resolveBackfillStatus({
|
|
3712
3728
|
cached: globalDailyCached,
|
|
3713
3729
|
covered: globalDailyBackfillCovered
|
|
@@ -3708,11 +3708,27 @@ var backfillCoinMarketCapContext = async (params) => {
|
|
|
3708
3708
|
toMs
|
|
3709
3709
|
})
|
|
3710
3710
|
);
|
|
3711
|
-
const
|
|
3712
|
-
const
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3711
|
+
const ready = (dataset, existing) => params.repairDataset ? params.repairDataset !== dataset : existing;
|
|
3712
|
+
const globalDailyReady = ready(
|
|
3713
|
+
"cmc-global-1d",
|
|
3714
|
+
globalDailyCached || globalDailyBackfillCovered
|
|
3715
|
+
);
|
|
3716
|
+
const referencesDailyReady = ready(
|
|
3717
|
+
"cmc-reference_asset-1d",
|
|
3718
|
+
referencesDailyCached || referencesDailyBackfillCovered
|
|
3719
|
+
);
|
|
3720
|
+
const exchangeLiquidityReady = ready(
|
|
3721
|
+
"cmc-exchange_liquidity-1d",
|
|
3722
|
+
exchangeLiquidityCached || !exchangeLiquidityEnabled || exchangeLiquidityBackfillCovered
|
|
3723
|
+
);
|
|
3724
|
+
const fearGreedReady = ready(
|
|
3725
|
+
"cmc-fear_greed-1d",
|
|
3726
|
+
fearGreedCached || !fearGreedEnabled || fearGreedBackfillCovered
|
|
3727
|
+
);
|
|
3728
|
+
const indexesReady = ready(
|
|
3729
|
+
"cmc-index-1d",
|
|
3730
|
+
indexesCached || indexesBackfillCovered
|
|
3731
|
+
);
|
|
3716
3732
|
let globalStatus = resolveBackfillStatus({
|
|
3717
3733
|
cached: globalDailyCached,
|
|
3718
3734
|
covered: globalDailyBackfillCovered
|
|
@@ -593,6 +593,8 @@ var compactMatched = (item) => {
|
|
|
593
593
|
timestampDiffMs: item.timestampDiffMs ?? null,
|
|
594
594
|
backtestPrice: backtest.price ?? null,
|
|
595
595
|
runtimePrice: runtime.price ?? null,
|
|
596
|
+
backtestQty: backtest.qty ?? null,
|
|
597
|
+
runtimeQty: runtime.qty ?? null,
|
|
596
598
|
backtestExitPrice: backtest.exitPrice ?? null,
|
|
597
599
|
runtimeExitPrice: runtime.exitPrice ?? null,
|
|
598
600
|
expectedPnl: pnl.expectedPnl ?? null,
|
|
@@ -603,7 +605,8 @@ var compactMatched = (item) => {
|
|
|
603
605
|
totalSlippageCost: slippage.totalCost ?? null,
|
|
604
606
|
orderId: runtime.orderId ?? backtest.orderId ?? null,
|
|
605
607
|
orderLinkId: runtime.orderLinkId ?? null,
|
|
606
|
-
signalId: backtest.signalId ?? null
|
|
608
|
+
signalId: backtest.signalId ?? null,
|
|
609
|
+
runtimeSignalId: runtime.signalId ?? null
|
|
607
610
|
};
|
|
608
611
|
};
|
|
609
612
|
var resolveItemStrategy = (item) => asRecord(item.backtest).strategy ?? asRecord(item.runtime).inferredStrategy ?? item.strategy ?? item.inferredStrategy ?? null;
|
|
@@ -3216,11 +3216,27 @@ var backfillCoinMarketCapContext = async (params) => {
|
|
|
3216
3216
|
toMs
|
|
3217
3217
|
})
|
|
3218
3218
|
);
|
|
3219
|
-
const
|
|
3220
|
-
const
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3219
|
+
const ready = (dataset, existing) => params.repairDataset ? params.repairDataset !== dataset : existing;
|
|
3220
|
+
const globalDailyReady = ready(
|
|
3221
|
+
"cmc-global-1d",
|
|
3222
|
+
globalDailyCached || globalDailyBackfillCovered
|
|
3223
|
+
);
|
|
3224
|
+
const referencesDailyReady = ready(
|
|
3225
|
+
"cmc-reference_asset-1d",
|
|
3226
|
+
referencesDailyCached || referencesDailyBackfillCovered
|
|
3227
|
+
);
|
|
3228
|
+
const exchangeLiquidityReady = ready(
|
|
3229
|
+
"cmc-exchange_liquidity-1d",
|
|
3230
|
+
exchangeLiquidityCached || !exchangeLiquidityEnabled || exchangeLiquidityBackfillCovered
|
|
3231
|
+
);
|
|
3232
|
+
const fearGreedReady = ready(
|
|
3233
|
+
"cmc-fear_greed-1d",
|
|
3234
|
+
fearGreedCached || !fearGreedEnabled || fearGreedBackfillCovered
|
|
3235
|
+
);
|
|
3236
|
+
const indexesReady = ready(
|
|
3237
|
+
"cmc-index-1d",
|
|
3238
|
+
indexesCached || indexesBackfillCovered
|
|
3239
|
+
);
|
|
3224
3240
|
let globalStatus = resolveBackfillStatus({
|
|
3225
3241
|
cached: globalDailyCached,
|
|
3226
3242
|
covered: globalDailyBackfillCovered
|
package/dist/scripts/signals.js
CHANGED
|
@@ -2676,11 +2676,27 @@ var backfillCoinMarketCapContext = async (params) => {
|
|
|
2676
2676
|
toMs
|
|
2677
2677
|
})
|
|
2678
2678
|
);
|
|
2679
|
-
const
|
|
2680
|
-
const
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2679
|
+
const ready = (dataset, existing) => params.repairDataset ? params.repairDataset !== dataset : existing;
|
|
2680
|
+
const globalDailyReady = ready(
|
|
2681
|
+
"cmc-global-1d",
|
|
2682
|
+
globalDailyCached || globalDailyBackfillCovered
|
|
2683
|
+
);
|
|
2684
|
+
const referencesDailyReady = ready(
|
|
2685
|
+
"cmc-reference_asset-1d",
|
|
2686
|
+
referencesDailyCached || referencesDailyBackfillCovered
|
|
2687
|
+
);
|
|
2688
|
+
const exchangeLiquidityReady = ready(
|
|
2689
|
+
"cmc-exchange_liquidity-1d",
|
|
2690
|
+
exchangeLiquidityCached || !exchangeLiquidityEnabled || exchangeLiquidityBackfillCovered
|
|
2691
|
+
);
|
|
2692
|
+
const fearGreedReady = ready(
|
|
2693
|
+
"cmc-fear_greed-1d",
|
|
2694
|
+
fearGreedCached || !fearGreedEnabled || fearGreedBackfillCovered
|
|
2695
|
+
);
|
|
2696
|
+
const indexesReady = ready(
|
|
2697
|
+
"cmc-index-1d",
|
|
2698
|
+
indexesCached || indexesBackfillCovered
|
|
2699
|
+
);
|
|
2684
2700
|
let globalStatus = resolveBackfillStatus({
|
|
2685
2701
|
cached: globalDailyCached,
|
|
2686
2702
|
covered: globalDailyBackfillCovered
|
|
@@ -2674,11 +2674,27 @@ var backfillCoinMarketCapContext = async (params) => {
|
|
|
2674
2674
|
toMs
|
|
2675
2675
|
})
|
|
2676
2676
|
);
|
|
2677
|
-
const
|
|
2678
|
-
const
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2677
|
+
const ready = (dataset, existing) => params.repairDataset ? params.repairDataset !== dataset : existing;
|
|
2678
|
+
const globalDailyReady = ready(
|
|
2679
|
+
"cmc-global-1d",
|
|
2680
|
+
globalDailyCached || globalDailyBackfillCovered
|
|
2681
|
+
);
|
|
2682
|
+
const referencesDailyReady = ready(
|
|
2683
|
+
"cmc-reference_asset-1d",
|
|
2684
|
+
referencesDailyCached || referencesDailyBackfillCovered
|
|
2685
|
+
);
|
|
2686
|
+
const exchangeLiquidityReady = ready(
|
|
2687
|
+
"cmc-exchange_liquidity-1d",
|
|
2688
|
+
exchangeLiquidityCached || !exchangeLiquidityEnabled || exchangeLiquidityBackfillCovered
|
|
2689
|
+
);
|
|
2690
|
+
const fearGreedReady = ready(
|
|
2691
|
+
"cmc-fear_greed-1d",
|
|
2692
|
+
fearGreedCached || !fearGreedEnabled || fearGreedBackfillCovered
|
|
2693
|
+
);
|
|
2694
|
+
const indexesReady = ready(
|
|
2695
|
+
"cmc-index-1d",
|
|
2696
|
+
indexesCached || indexesBackfillCovered
|
|
2697
|
+
);
|
|
2682
2698
|
let globalStatus = resolveBackfillStatus({
|
|
2683
2699
|
cached: globalDailyCached,
|
|
2684
2700
|
covered: globalDailyBackfillCovered
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradejs/cli",
|
|
3
|
-
"version": "3.1.29-beta.
|
|
3
|
+
"version": "3.1.29-beta.297",
|
|
4
4
|
"description": "Official CLI for the TradeJS TypeScript framework: infra setup, backtests, signals, bots, and ML workflows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tradejs",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"tradejs": "dist/cli.js"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@tradejs/connectors": "^3.1.29-beta.
|
|
41
|
-
"@tradejs/core": "^3.1.29-beta.
|
|
42
|
-
"@tradejs/indicators": "^3.1.29-beta.
|
|
43
|
-
"@tradejs/infra": "^3.1.29-beta.
|
|
44
|
-
"@tradejs/node": "^3.1.29-beta.
|
|
40
|
+
"@tradejs/connectors": "^3.1.29-beta.297",
|
|
41
|
+
"@tradejs/core": "^3.1.29-beta.297",
|
|
42
|
+
"@tradejs/indicators": "^3.1.29-beta.297",
|
|
43
|
+
"@tradejs/infra": "^3.1.29-beta.297",
|
|
44
|
+
"@tradejs/node": "^3.1.29-beta.297",
|
|
45
45
|
"@tradejs/strategy-kit": "3.0.6",
|
|
46
|
-
"@tradejs/types": "^3.1.29-beta.
|
|
46
|
+
"@tradejs/types": "^3.1.29-beta.297",
|
|
47
47
|
"args": "^5.0.3",
|
|
48
48
|
"bcryptjs": "^2.4.3",
|
|
49
49
|
"chalk": "4.1.2",
|