Skip to main content
Glama
Stochastly

Stochastly MCP

by Stochastly

portfolio_combine

Combine finished runs into one portfolio book and judge it: get combined series, weights, correlations, sleeve contributions and a deflated Sharpe ratio, saved as a new run.

Instructions

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Combine several finished runs into one portfolio (book) and judge it: returns the combined series, the weights actually used, the correlation matrix between sleeves, each sleeve's contribution and a deflated Sharpe ratio. The book is saved as a new run, so adversarial_check and export_tearsheet accept its run_id.

Use it for a multi-strategy or multi-market book; a single graph run covers one strategy, and analyze_dependence only measures two curves you supply. Weights at bar t use only bars before t, and the drawdown cap acts on the previous bar's equity. Nothing is re-simulated: runs must be finished in the current app session; runs in different PnL units are refused, not converted. Requires a Portfolio licence (Atelier gets a named refusal).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dd_capNoDrawdown at which the book is de-levered; 0 turns it off.
methodNoWeighting: equal weights, volatility targeting, risk parity, or hierarchical risk parity.equal
run_idsNoComma-separated ids of at least 2 finished runs from this app session (a unique prefix is enough).
lookbackNoTrailing window in bars used to estimate weights.
n_trialsNoNumber of candidate sleeves to deflate the Sharpe ratio by; 0 uses the number of runs passed.
dd_deriskNoLeverage multiplier applied once dd_cap is reached.
rebalanceNoBars between two weight updates.
vol_targetNoTarget volatility per bar for the whole book; 0 turns it off.
max_leverageNoUpper bound on the book's leverage.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only give the shape (not read-only, not idempotent, not destructive); the description adds the real behavioural load: the book is persisted as a new run consumable by adversarial_check/export_tearsheet, runs from other sessions or in mismatched PnL units are refused rather than converted, a Portfolio licence is required with a named refusal path for Atelier, and the weighting/drawdown timing rules are disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and largely waste-free, with prerequisites, purpose, return values, constraints and algorithm timing each getting one sentence. Minor structural weakness: the generic install/licence boilerplate occupies the opening position, pushing the actual purpose into the second paragraph.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly enumerates the return values, and it covers side effects (new run id), licensing/auth requirements, session and unit preconditions, and look-ahead/timing semantics. An agent has everything needed to decide and call correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents every parameter and its defaults, and the description's parameter-relevant content is indirect (weights at bar t use only earlier bars; the drawdown cap acts on the previous bar's equity). That adds interpretive context for lookback/dd_cap but no per-parameter syntax beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — combining finished runs into a portfolio/book — and enumerates the concrete output (combined series, used weights, correlation matrix, sleeve contributions, deflated Sharpe). It explicitly distinguishes itself from siblings: 'a single graph run covers one strategy, and analyze_dependence only measures two curves you supply.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use ('for a multi-strategy or multi-market book'), when-not ('a single graph run covers one strategy'), and names alternatives with the reason they don't fit. Prerequisites (app installed, Portfolio licence, runs finished in the current session) are stated up front.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.