tradeblocks-mcp 4.2.0 → 4.3.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.
Files changed (47) hide show
  1. package/README.md +40 -1
  2. package/dist/{chunk-YRD62LDE.js → chunk-35RVWZGT.js} +4 -1
  3. package/dist/{chunk-4UU7IT2A.js.map → chunk-35RVWZGT.js.map} +1 -1
  4. package/dist/{chunk-4UU7IT2A.js → chunk-ENXBPJ7Y.js} +148 -6
  5. package/dist/chunk-ENXBPJ7Y.js.map +1 -0
  6. package/dist/{chunk-62GCLMQA.js → chunk-TLX7IBCM.js} +3 -6
  7. package/dist/chunk-TLX7IBCM.js.map +1 -0
  8. package/dist/{daily-logs-store-PXB53WEK.js → daily-logs-store-FZRIGYUX.js} +2 -2
  9. package/dist/{daily-logs-store-65YHFJ5F.js → daily-logs-store-MEZ5S3BR.js} +2 -2
  10. package/dist/market/provenance/index.js +1 -4
  11. package/dist/market/provenance/index.js.map +1 -1
  12. package/dist/{sync-JL7OPLCT.js → sync-EW33QZPD.js} +3 -3
  13. package/dist/test-exports.js +320 -279
  14. package/dist/test-exports.js.map +1 -1
  15. package/dist/{trades-store-UGZ62A7N.js → trades-store-3TOLBL2W.js} +2 -2
  16. package/dist/{trades-store-MOFJHRC2.js → trades-store-PNLPRYRJ.js} +2 -2
  17. package/package.json +1 -1
  18. package/server/{chunk-7N6HBOAY.js → chunk-PDSUY2X2.js} +148 -6
  19. package/server/chunk-PDSUY2X2.js.map +1 -0
  20. package/server/{chunk-J4GWE6JR.js → chunk-YIWLVX7Z.js} +3 -6
  21. package/server/chunk-YIWLVX7Z.js.map +1 -0
  22. package/server/{daily-logs-store-YAXASQN4.js → daily-logs-store-LRVO7COL.js} +2 -2
  23. package/server/index.js +993 -801
  24. package/server/index.js.map +1 -1
  25. package/server/{sync-ZV3QEGMO.js → sync-2POG6KA6.js} +3 -3
  26. package/server/{trades-store-MF7YYLCH.js → trades-store-MXUZLSF5.js} +2 -2
  27. package/src/db/dataset-schemas.ts +97 -23
  28. package/src/tools/market-data.ts +327 -245
  29. package/src/tools/profile-analysis.ts +18 -4
  30. package/src/tools/reports/fields.ts +16 -11
  31. package/src/tools/reports/helpers.ts +6 -2
  32. package/src/tools/reports/predictive.ts +15 -4
  33. package/src/tools/shared/field-analysis.ts +57 -14
  34. package/src/tools/shared/filter-objective.ts +73 -0
  35. package/src/utils/trade-analysis-fields.ts +19 -4
  36. package/dist/chunk-62GCLMQA.js.map +0 -1
  37. package/dist/chunk-YRD62LDE.js.map +0 -1
  38. package/server/chunk-7N6HBOAY.js.map +0 -1
  39. package/server/chunk-J4GWE6JR.js.map +0 -1
  40. /package/dist/{daily-logs-store-65YHFJ5F.js.map → daily-logs-store-FZRIGYUX.js.map} +0 -0
  41. /package/dist/{daily-logs-store-PXB53WEK.js.map → daily-logs-store-MEZ5S3BR.js.map} +0 -0
  42. /package/dist/{sync-JL7OPLCT.js.map → sync-EW33QZPD.js.map} +0 -0
  43. /package/dist/{trades-store-MOFJHRC2.js.map → trades-store-3TOLBL2W.js.map} +0 -0
  44. /package/dist/{trades-store-UGZ62A7N.js.map → trades-store-PNLPRYRJ.js.map} +0 -0
  45. /package/server/{daily-logs-store-YAXASQN4.js.map → daily-logs-store-LRVO7COL.js.map} +0 -0
  46. /package/server/{sync-ZV3QEGMO.js.map → sync-2POG6KA6.js.map} +0 -0
  47. /package/server/{trades-store-MF7YYLCH.js.map → trades-store-MXUZLSF5.js.map} +0 -0
package/README.md CHANGED
@@ -537,9 +537,48 @@ predictive reports, regime analysis and threshold sweeps. `import_daily_dataset`
537
537
  atomically, without changing market data or requiring provider credentials. Date-only close
538
538
  values are available the following calendar day at 00:00 ET; date-only open values require
539
539
  `knownBy`; timestamped rows are as-of. Sparse columns carry forward their latest available
540
- observation without a freshness cutoff. See the [dataset tools reference](../../docs/mcp-tools.md#market-analysis)
540
+ observation with no freshness cutoff by default. See the [dataset tools reference](../../docs/mcp-tools.md#market-analysis)
541
541
  and [4.1.0 behavior changes](../../releases/v4.1.0.md#behavior-changes).
542
542
 
543
+ With Docker's default `-v ./data:/data` mount, put the CSV at
544
+ `./data/datasets/vrp.csv` on the host and pass `csvPath: "datasets/vrp.csv"` or
545
+ `"/data/datasets/vrp.csv"`; use the container path beneath the configured data root.
546
+ Close-column metadata shows `knownBy: null`; open columns retain the configured value.
547
+ Field-based `suggest_filters` retains all-trade `currentStats` and reports per-field
548
+ `fieldBaselines` (`count`, `totalPl`, `uncoveredCount`, `uncoveredTotalPl`).
549
+ Suggestions compare against those covered populations; `filter_curve.baseline`
550
+ reports the same covered and uncovered counts and P&L.
551
+
552
+ `suggest_filters` defaults to `objective: "totalPl"`: only positive P&L improvements,
553
+ ranked by P&L improvement with win-rate gain as tie-breaker. `objective: "winRate"`
554
+ admits/ranks by win-rate gain with P&L tie-breaks. `minImprovementPct` (default 3
555
+ percentage points) applies only to `winRate`; it is ignored under `totalPl` and the
556
+ response notes this when supplied. Standalone and composite suggestions include
557
+ `tradesKept`, `keptFraction`, `tradesRemoved`, and `objective`. `confidence` means
558
+ sample-size support, not statistical confidence; keeping less than 20% caps it at
559
+ low and adds a low-retention warning. Composite metrics describe kept trades.
560
+
561
+ In 4.3.0, `minImprovementThreshold` is null under `totalPl` and numeric under
562
+ `winRate`. Shared support thresholds are high at 20 kept/10 removed, medium at
563
+ 10 kept/5 removed, otherwise low, subject to the retention cap. This replaces
564
+ the fields path's former kept-only 100/30 thresholds. Composites use the selected
565
+ objective without the old >2-point standalone-relative gate. Their `improvement`
566
+ still means kept win-rate gain over the better standalone on the same covered
567
+ pool, not P&L or baseline-relative gain. See the [4.3.0 behavior changes](../../releases/v4.3.0.md#behavior-changes).
568
+
569
+ Dataset consumers accept optional `maxMissedSessions` (a nonnegative integer).
570
+ `datasetAge` preserves calendar-day ages and adds missed expected XNYS session ages:
571
+ close columns expect the prior session; open columns expect today's session only
572
+ at/after known-by ET (timestamped open rows without known-by use midnight for this
573
+ daily-session diagnostic, not for as-of matching). Friday close → Monday is 0 missed;
574
+ a missing Friday is 1, and holidays do not count. The calendar covers 2022–2030;
575
+ outside it, age is explicitly `unsupported`. With a limit set, stale/unsupported
576
+ values are refused and count as uncovered in field baselines. Without it, matching
577
+ is unchanged. `datasetWarnings` names stale/unsupported/refused counts;
578
+ `enrich_trades` includes session age in provenance and names `datasetRejections`.
579
+ Session summaries include refused candidates; calendar-day summaries count accepted
580
+ attachments only, returning null ages when none were accepted.
581
+
543
582
  ### Strategy Profile Tools
544
583
 
545
584
  | Tool | Description |
@@ -5181,6 +5181,9 @@ async function getTradesPage(blockId, offset, limit) {
5181
5181
  // ../lib/utils/trade-frequency.ts
5182
5182
  var MS_PER_DAY = 1e3 * 60 * 60 * 24;
5183
5183
 
5184
+ // ../lib/calculations/xnys-session-calendar.ts
5185
+ var MS_PER_DAY2 = 24 * 60 * 60 * 1e3;
5186
+
5184
5187
  // ../lib/db/index.ts
5185
5188
  var DB_NAME = "TradeBlocksDB";
5186
5189
  var DB_VERSION = 7;
@@ -5671,4 +5674,4 @@ export {
5671
5674
  searchTrades,
5672
5675
  getTradesPage
5673
5676
  };
5674
- //# sourceMappingURL=chunk-YRD62LDE.js.map
5677
+ //# sourceMappingURL=chunk-35RVWZGT.js.map