Serveur MCP

regimen

io.github.RaYYeR220/regimen
Données et analytique Finance et investissement Public et accessible MCP 2025-11-25

Ce que fait ce MCP

Evaluates whether trading-strategy performance is statistically distinguishable from luck and maps results across market regimes.

regimen_describe_factors
Describe regime factors
List the market-condition factors Regimen slices performance by, with units, the upstream operation each is read from, and how it is bucketed. Call this when you need to know which factor keys exist or how to explain a bucket to a user. Takes no arguments, reaches no network, never changes.
Lecture seule Idempotent
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {}}
Schéma de sortie
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['factors', 'note'], 'properties': {'note': {'type': 'string'}, 'factors': {'type': 'array', 'items': {'type': 'object', 'required': ['key', 'label', 'unit', 'description', 'source', 'pointInTime'], 'properties': {'key': {'type': 'string'}, 'unit': {'type': 'string'}, 'label': {'type': 'string'}, 'source': {'type': 'string'}, 'description': {'type': 'string'}, 'pointInTime': {'type': 'boolean'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
regimen_evaluate_track_record
Evaluate a track record
Answer whether a trading strategy’s measured performance is distinguishable from luck. Returns the Probabilistic Sharpe Ratio (the probability the true Sharpe beats a benchmark, corrected for sample length, skew and fat tails), a bootstrap confidence interval, and the Minimum Track Record Length — how long the record would have to run before the claim could be made at all. Use this whenever someone quotes a Sharpe ratio, a win rate or a return and you need to know whether the number means anything. It will frequently say the evidence is too thin; that is the intended answer, not a failure.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['selector'], 'properties': {'detail': {'enum': ['concise', 'full'], 'type': 'string', 'default': 'concise', 'description': 'concise returns the verdict, the headline statistics and the reasoning â\x80\x94 enough to answer a user. full adds every bucket, every dropped point and the complete provenance list, and is much larger.'}, 'selector': {'type': 'object', 'required': ['source'], 'properties': {'source': {'enum': ['olaxbt-nexus', 'inline'], 'type': 'string', 'description': 'olaxbt-nexus analyses the strategy bound to this connectionâ\x80\x99s API key. inline analyses an equity curve you supply directly, from any venue or backtest.'}, 'symbol': {'type': 'string', 'maxLength': 32, 'minLength': 3, 'description': 'For olaxbt-nexus: the market the strategy trades, used for point-in-time reads. Default BTC/USDT.'}, 'trackRecord': {'type': 'object', 'required': ['equity'], 'properties': {'label': {'type': 'string', 'default': 'inline-track-record', 'maxLength': 80, 'minLength': 1, 'description': 'A name for this track record, echoed back in results. Do not put anything sensitive here.'}, 'equity': {'type': 'array', 'items': {'type': 'object', 'required': ['t', 'equity'], 'properties': {'t': {'type': ['number', 'string'], 'description': 'Epoch milliseconds, epoch seconds, or an ISO 8601 timestamp. UTC is assumed.'}, 'equity': {'type': 'number', 'description': 'Account equity at that instant, in any single consistent unit.', 'exclusiveMinimum': 0}}}, 'maxItems': 10000, 'minItems': 2, 'description': 'The equity curve, one point per period. Order does not matter; it is sorted by timestamp.'}, 'trades': {'type': 'array', 'items': {'type': 'object', 'required': ['pnl'], 'properties': {'pnl': {'type': 'number', 'description': 'Realised profit or loss for the closed trade, in the equity unit.'}, 'symbol': {'type': 'string', 'maxLength': 64, 'minLength': 1}, 'exitedAt': {'type': ['number', 'string']}, 'exitPrice': {'type': 'number'}, 'entryPrice': {'type': 'number'}, 'exitReason': {'type': 'string', 'maxLength': 120}, 'holdingBars': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}}, 'maxItems': 20000}, 'reportedSharpe': {'type': 'number', 'description': 'Optional. The Sharpe ratio you believe this track record has, so Regimen can contrast it with its own.'}}, 'description': 'Required when source is inline.'}}, 'description': 'Which track record to analyse.'}, 'confidence': {'type': 'number', 'default': 0.95, 'exclusiveMaximum': 1, 'exclusiveMinimum': 0.5}, 'trialSharpes': {'type': 'array', 'items': {'type': 'number'}, 'maxItems': 500, 'description': 'Per-period Sharpe ratios of other configurations tried for this strategy. Supplying them enables the Deflated Sharpe Ratio, which discounts the headline for how many variants were tested before this one was reported.'}, 'benchmarkSharpe': {'type': 'number', 'default': 0, 'description': 'Per-period Sharpe the record must beat. 0 asks only whether there is any edge at all.'}}}
Schéma de sortie
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['label', 'sourceId', 'verdict', 'headline', 'usableReturns', 'sharpePerPeriod', 'sharpeAnnualised', 'probabilisticSharpe', 'minimumTrackRecordLength', 'periodsShortOfSignificance', 'sharpeConfidenceInterval', 'deflatedSharpe', 'reasoning', 'divergencesFromReported', 'notes', 'full'], 'properties': {'full': {'anyOf': [{}, {'type': 'null'}], 'description': 'The complete report when detail is "full", otherwise null.'}, 'label': {'type': 'string'}, 'notes': {'type': 'array', 'items': {'type': 'string'}}, 'verdict': {'type': 'string', 'description': 'One of insufficient_evidence, indistinguishable_from_luck, weak, supported, strong.'}, 'headline': {'type': 'string'}, 'sourceId': {'type': 'string'}, 'reasoning': {'type': 'array', 'items': {'type': 'string'}}, 'usableReturns': {'type': 'number'}, 'deflatedSharpe': {'type': ['number', 'null']}, 'sharpePerPeriod': {'type': ['number', 'null']}, 'sharpeAnnualised': {'type': ['number', 'null']}, 'probabilisticSharpe': {'type': ['number', 'null']}, 'divergencesFromReported': {'type': 'array', 'items': {'type': 'object', 'required': ['field', 'reported', 'recomputed', 'material'], 'properties': {'field': {'type': 'string'}, 'material': {'type': 'boolean'}, 'reported': {'type': 'number'}, 'recomputed': {'type': 'number'}}, 'additionalProperties': False}}, 'minimumTrackRecordLength': {'type': ['number', 'null']}, 'sharpeConfidenceInterval': {'anyOf': [{'type': 'object', 'required': ['lower', 'upper', 'level'], 'properties': {'level': {'type': 'number'}, 'lower': {'type': 'number'}, 'upper': {'type': 'number'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'periodsShortOfSignificance': {'type': ['number', 'null']}}, 'additionalProperties': False}
regimen_regime_map
Map performance to market regimes
Break a strategy’s returns down by the market conditions that held on each date — volatility, funding, open interest, positioning, sentiment, trend state — and report performance per bucket. Each factor also gets a permutation test: the observed best-to-worst spread is compared against spreads produced by randomly reshuffling the regime labels, so a flattering subset cannot pass itself off as a regime effect. Use this after regimen_evaluate_track_record when you need to know WHERE an edge comes from, or whether it is a bet on conditions that could end.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['selector'], 'properties': {'detail': {'enum': ['concise', 'full'], 'type': 'string', 'default': 'concise', 'description': 'concise returns the verdict, the headline statistics and the reasoning â\x80\x94 enough to answer a user. full adds every bucket, every dropped point and the complete provenance list, and is much larger.'}, 'maxDates': {'type': 'integer', 'default': 45, 'maximum': 45, 'minimum': 5, 'description': 'How many of the most recent dates to read conditions for, bounded by the upstream rate limit.'}, 'selector': {'type': 'object', 'required': ['source'], 'properties': {'source': {'enum': ['olaxbt-nexus', 'inline'], 'type': 'string', 'description': 'olaxbt-nexus analyses the strategy bound to this connectionâ\x80\x99s API key. inline analyses an equity curve you supply directly, from any venue or backtest.'}, 'symbol': {'type': 'string', 'maxLength': 32, 'minLength': 3, 'description': 'For olaxbt-nexus: the market the strategy trades, used for point-in-time reads. Default BTC/USDT.'}, 'trackRecord': {'type': 'object', 'required': ['equity'], 'properties': {'label': {'type': 'string', 'default': 'inline-track-record', 'maxLength': 80, 'minLength': 1, 'description': 'A name for this track record, echoed back in results. Do not put anything sensitive here.'}, 'equity': {'type': 'array', 'items': {'type': 'object', 'required': ['t', 'equity'], 'properties': {'t': {'type': ['number', 'string'], 'description': 'Epoch milliseconds, epoch seconds, or an ISO 8601 timestamp. UTC is assumed.'}, 'equity': {'type': 'number', 'description': 'Account equity at that instant, in any single consistent unit.', 'exclusiveMinimum': 0}}}, 'maxItems': 10000, 'minItems': 2, 'description': 'The equity curve, one point per period. Order does not matter; it is sorted by timestamp.'}, 'trades': {'type': 'array', 'items': {'type': 'object', 'required': ['pnl'], 'properties': {'pnl': {'type': 'number', 'description': 'Realised profit or loss for the closed trade, in the equity unit.'}, 'symbol': {'type': 'string', 'maxLength': 64, 'minLength': 1}, 'exitedAt': {'type': ['number', 'string']}, 'exitPrice': {'type': 'number'}, 'entryPrice': {'type': 'number'}, 'exitReason': {'type': 'string', 'maxLength': 120}, 'holdingBars': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}}, 'maxItems': 20000}, 'reportedSharpe': {'type': 'number', 'description': 'Optional. The Sharpe ratio you believe this track record has, so Regimen can contrast it with its own.'}}, 'description': 'Required when source is inline.'}}, 'description': 'Which track record to analyse.'}, 'minSample': {'type': 'integer', 'default': 15, 'maximum': 500, 'minimum': 5, 'description': 'Buckets below this many observations are returned but flagged unusable.'}}}
Schéma de sortie
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['label', 'datesCovered', 'minSample', 'factors', 'warnings', 'full'], 'properties': {'full': {'anyOf': [{}, {'type': 'null'}]}, 'label': {'type': 'string'}, 'factors': {'type': 'array', 'items': {'type': 'object', 'required': ['key', 'bucketingMethod', 'sufficientBuckets', 'best', 'worst', 'spread', 'permutationPValue', 'interpretation', 'warnings'], 'properties': {'key': {'type': 'string'}, 'best': {'anyOf': [{'type': 'object', 'required': ['label', 'sharpe'], 'properties': {'label': {'type': 'string'}, 'sharpe': {'type': 'number'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'worst': {'anyOf': [{'type': 'object', 'required': ['label', 'sharpe'], 'properties': {'label': {'type': 'string'}, 'sharpe': {'type': 'number'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'spread': {'type': ['number', 'null']}, 'warnings': {'type': 'array', 'items': {'type': 'string'}}, 'interpretation': {'type': ['string', 'null']}, 'bucketingMethod': {'type': 'string'}, 'permutationPValue': {'type': ['number', 'null']}, 'sufficientBuckets': {'type': 'number'}}, 'additionalProperties': False}}, 'warnings': {'type': 'array', 'items': {'type': 'string'}}, 'minSample': {'type': 'number'}, 'datesCovered': {'type': 'number'}}, 'additionalProperties': False}
regimen_self_attack
Attack the verdict
Run Regimen’s own analysis against controls whose answer is known in advance: the strategy’s returns with the edge mathematically removed, and a simulated population of strategies with no edge at all. Returns whether the engine correctly found nothing in them, and where the real strategy’s confidence sits among pure-luck strategies of the same length and volatility. Use this when a user is entitled to ask why they should believe the verdict, or before quoting a result as evidence.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['selector'], 'properties': {'selector': {'type': 'object', 'required': ['source'], 'properties': {'source': {'enum': ['olaxbt-nexus', 'inline'], 'type': 'string', 'description': 'olaxbt-nexus analyses the strategy bound to this connectionâ\x80\x99s API key. inline analyses an equity curve you supply directly, from any venue or backtest.'}, 'symbol': {'type': 'string', 'maxLength': 32, 'minLength': 3, 'description': 'For olaxbt-nexus: the market the strategy trades, used for point-in-time reads. Default BTC/USDT.'}, 'trackRecord': {'type': 'object', 'required': ['equity'], 'properties': {'label': {'type': 'string', 'default': 'inline-track-record', 'maxLength': 80, 'minLength': 1, 'description': 'A name for this track record, echoed back in results. Do not put anything sensitive here.'}, 'equity': {'type': 'array', 'items': {'type': 'object', 'required': ['t', 'equity'], 'properties': {'t': {'type': ['number', 'string'], 'description': 'Epoch milliseconds, epoch seconds, or an ISO 8601 timestamp. UTC is assumed.'}, 'equity': {'type': 'number', 'description': 'Account equity at that instant, in any single consistent unit.', 'exclusiveMinimum': 0}}}, 'maxItems': 10000, 'minItems': 2, 'description': 'The equity curve, one point per period. Order does not matter; it is sorted by timestamp.'}, 'trades': {'type': 'array', 'items': {'type': 'object', 'required': ['pnl'], 'properties': {'pnl': {'type': 'number', 'description': 'Realised profit or loss for the closed trade, in the equity unit.'}, 'symbol': {'type': 'string', 'maxLength': 64, 'minLength': 1}, 'exitedAt': {'type': ['number', 'string']}, 'exitPrice': {'type': 'number'}, 'entryPrice': {'type': 'number'}, 'exitReason': {'type': 'string', 'maxLength': 120}, 'holdingBars': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}}, 'maxItems': 20000}, 'reportedSharpe': {'type': 'number', 'description': 'Optional. The Sharpe ratio you believe this track record has, so Regimen can contrast it with its own.'}}, 'description': 'Required when source is inline.'}}, 'description': 'Which track record to analyse.'}, 'simulations': {'type': 'integer', 'default': 1000, 'maximum': 10000, 'minimum': 100}}}
Schéma de sortie
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['label', 'verdict', 'controls', 'nullDistribution', 'notes'], 'properties': {'label': {'type': 'string'}, 'notes': {'type': 'array', 'items': {'type': 'string'}}, 'verdict': {'type': 'string'}, 'controls': {'type': 'array', 'items': {'type': 'object', 'required': ['name', 'expected', 'observed', 'passed', 'detail'], 'properties': {'name': {'type': 'string'}, 'detail': {'type': 'string'}, 'passed': {'type': 'boolean'}, 'expected': {'type': 'string'}, 'observed': {'type': ['number', 'null']}}, 'additionalProperties': False}}, 'nullDistribution': {'anyOf': [{'type': 'object', 'required': ['simulations', 'observedPsr', 'nullMedianPsr', 'nullP95Psr', 'empiricalPValue', 'interpretation'], 'properties': {'nullP95Psr': {'type': ['number', 'null']}, 'observedPsr': {'type': ['number', 'null']}, 'simulations': {'type': 'number'}, 'nullMedianPsr': {'type': ['number', 'null']}, 'interpretation': {'type': 'string'}, 'empiricalPValue': {'type': ['number', 'null']}}, 'additionalProperties': False}, {'type': 'null'}]}}, 'additionalProperties': False}
Ajouté
regimen_self_attack
20 September 2026 02:40
Ajouté
regimen_regime_map
20 September 2026 02:40
Ajouté
regimen_evaluate_track_record
20 September 2026 02:40
Ajouté
regimen_describe_factors
20 September 2026 02:40