tradeblocks-mcp 0.4.1 → 0.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradeblocks-mcp",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "MCP server for options trade analysis - works with Claude Desktop/Cowork",
5
5
  "author": "David Romeo <davidmromeo@gmail.com>",
6
6
  "type": "module",
package/server/index.js CHANGED
@@ -45503,7 +45503,14 @@ function registerAnalysisTools(server, baseDir) {
45503
45503
  maxTailDependenceThreshold: external_exports.number().min(0).max(1).default(0.5).describe("Maximum allowed tail dependence between any strategy pair (default: 0.5). Only used if enableTailRiskConstraint is true."),
45504
45504
  tailThreshold: external_exports.number().min(0.01).max(0.5).default(0.1).describe("Percentile threshold for tail definition (default: 0.1 = worst 10%). Only used if enableTailRiskConstraint is true."),
45505
45505
  diversificationNormalization: external_exports.enum(["raw", "margin", "notional"]).default("raw").describe("How to normalize returns for diversification calculations (default: raw)."),
45506
- diversificationDateBasis: external_exports.enum(["opened", "closed"]).default("opened").describe("Which trade date to use for diversification calculations (default: opened).")
45506
+ diversificationDateBasis: external_exports.enum(["opened", "closed"]).default("opened").describe("Which trade date to use for diversification calculations (default: opened)."),
45507
+ // Parameter ranges for position sizing sweeps
45508
+ parameterRanges: external_exports.record(
45509
+ external_exports.string(),
45510
+ external_exports.tuple([external_exports.number(), external_exports.number(), external_exports.number()])
45511
+ ).optional().describe(
45512
+ `Parameter ranges for optimization sweep. Format: {paramName: [min, max, step]}. POSITION SIZING: 'kellyMultiplier' scales P&L by multiplier (e.g., {"kellyMultiplier": [0.25, 1.0, 0.25]} tests quarter/half/3-quarter/full Kelly); 'fixedFractionPct' scales relative to 2% baseline (e.g., [1, 4, 1] tests 1-4%); 'fixedContracts' scales relative to avg contracts (e.g., [1, 5, 1] tests 1-5 contracts). RISK CONSTRAINTS (reject combinations exceeding threshold): 'maxDrawdownPct' max drawdown % (e.g., [15, 25, 5] allows 15-25%); 'maxDailyLossPct' max single-day loss %; 'consecutiveLossLimit' max consecutive losing trades. STRATEGY WEIGHTS: 'strategy:StrategyName' weight multiplier per strategy (e.g., {"strategy:IronCondor": [0, 1, 0.5], "strategy:Straddle": [0, 1, 0.5]} tests include/exclude combinations). Multiple parameters create a grid search across all combinations.`
45513
+ )
45507
45514
  })
45508
45515
  },
45509
45516
  async ({
@@ -45532,7 +45539,8 @@ function registerAnalysisTools(server, baseDir) {
45532
45539
  maxTailDependenceThreshold,
45533
45540
  tailThreshold,
45534
45541
  diversificationNormalization,
45535
- diversificationDateBasis
45542
+ diversificationDateBasis,
45543
+ parameterRanges
45536
45544
  }) => {
45537
45545
  try {
45538
45546
  const block = await loadBlock(baseDir, blockId);
@@ -45622,7 +45630,7 @@ function registerAnalysisTools(server, baseDir) {
45622
45630
  outOfSampleDays,
45623
45631
  stepSizeDays,
45624
45632
  optimizationTarget,
45625
- parameterRanges: {},
45633
+ parameterRanges: parameterRanges ?? {},
45626
45634
  minInSampleTrades,
45627
45635
  minOutOfSampleTrades,
45628
45636
  normalizeTo1Lot,
@@ -45653,7 +45661,8 @@ function registerAnalysisTools(server, baseDir) {
45653
45661
  oosWindowCount,
45654
45662
  minInSampleTrades,
45655
45663
  minOutOfSampleTrades,
45656
- normalizeTo1Lot
45664
+ normalizeTo1Lot,
45665
+ parameterRanges: parameterRanges ?? null
45657
45666
  },
45658
45667
  performanceFloor: hasPerformanceFloor ? {
45659
45668
  minSharpeRatio: minSharpeRatio ?? null,