Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CANLI_KEYNoA key already issued from POST /api/v1/keys. When set, get_key sends no request; every other tool sends it as Authorization: Bearer <key>.
CANLI_LOCALNoSet to 1 to run the five validators on this machine; nothing about the submitted series is sent.
CANLI_API_BASENoWhere the API lives. Point it at a preview deployment for testing.https://canlicapital.com

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}
completions
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_keyA

Issue a free validation key for this session. Rarely needed: the first validation issues one itself unless CANLI_KEY or local mode is set, and the read tools need none. Quotas: 1000 validations per key per UTC day, 5 keys per client per UTC day, 1048576 bytes per validation request, 1024 bytes per key revocation request, 20000 observations per series, 200 variants per matrix.

validate_deflated_sharpeA

Deflated Sharpe ratio: the probability (0 to 1) that the selected strategy's Sharpe beats the best that luck gives across the variants tried, with the probabilistic Sharpe and that luck benchmark. Send the seven statistics or a return series. With every variant's returns use validate_overfitting; luck as a trial count, validate_luck_trials; a multiple-testing haircut, validate_haircut_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

validate_overfittingA

Probability of backtest overfitting (0 to 1) by CSCV: how often the in-sample best variant falls below the out-of-sample median. Needs every variant's returns (periods by variants); with summary statistics only, use validate_deflated_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

validate_reality_checkA

Data-snooping tests on every variant a search tried: Hansen's SPA p-value that the best beat the benchmark only by luck, White's Reality Check, and the variants Romano-Wolf StepM finds better. Send all variants tried, not only the winners. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

validate_paper_evidenceA

Checks paper-evidence.v0 structure and disclosures. With CANLI_LOCAL=1, record_file reads an export bundle and journal_file verifies signatures, source hashes and recomputed claims. Without a journal, source facts and signatures are unchecked. Local files are never uploaded. This verdict is about the series exactly as submitted. The service never saw the data source, its costs, survivorship, or any lookahead in how the series was built.

validate_breadthA

Book Sharpe ceiling from adding sleeves of this quality and correlation, the Sharpe at a sleeve count, and the sleeves a target needs. For portfolio construction; it validates no single strategy. This verdict is about the series exactly as submitted. The service never saw the data source, its costs, survivorship, or any lookahead in how the series was built.

validate_track_recordA

Minimum track record length (observations and years) for an observed Sharpe to beat a benchmark at a confidence level; with observations, the record's probabilistic Sharpe so far. For live or paper records; to size a backtest for its trials, use validate_backtest_length. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

validate_backtest_lengthA

Minimum backtest length (years) before the best of N independent trials is not expected to reach a target Sharpe by luck; with backtest_years, the most trials those years allow. For planning a search; once it has a result, use validate_deflated_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

validate_haircut_sharpeA

Haircut Sharpe for multiple testing (Harvey and Liu 2015): the Sharpe a single test would have needed, by Bonferroni and independent tests, and with the other tests' Sharpes, Holm and BHY. For the probability the Sharpe is real, use validate_deflated_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

validate_luck_trialsA

How many skill-less strategies a search would need for its best to reach this Sharpe by luck (Monte Carlo), and with a trial count, the chance it did. States luck as the best of N random tries; for the probability the Sharpe is real, use validate_deflated_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

audit_backtestA

One-call audit of a strategy's returns. Headline: one test whose false-positive rate was measured on nine return shapes (White's Reality Check with variants, luck trials with Lo's correction without). Then deflated Sharpe, minimum track record and, with variants, overfitting and out-of-sample decay, each with its receipt, plus fix_next. Send every variant tried (variants_file) so trials are counted; point returns_file at a CSV instead of pasting. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

verify_receiptA

Verify a receipt offline: its Ed25519 signature against the bundled canlicapital.com key, its output hash and its id. Send an id to fetch it first, or the receipt itself. The receipt is content-hashed, reproducible from the open-source core it names, and signed with Ed25519 by a key published at https://canlicapital.com/.well-known/canli-receipt-keys.json.

service_statusA

Whether the validation API is up, with its quotas; check after a timeout before resubmitting. No key. This verdict is about the series exactly as submitted. The service never saw the data source, its costs, survivorship, or any lookahead in how the series was built.

backtest_strategyA

Backtest a rule on your prices over a whole parameter grid, then validate the best with the count of variants actually run: deflated Sharpe, overfitting probability, minimum track record, vs buy and hold, after costs. A backtest, deflated or not, is not a forecast and not advice.

summarize_seriesA

A long price or return series in about 100 words plus fields: growth, risk, dated drawdowns, trend, volatility regime, tails, jumps, stale data. Use instead of reading raw bars. Nothing here is a forecast or advice.

stress_testA

Stress a strategy's returns: bootstrap histories (how often the drawdown limit breaks or Sharpe turns negative) and named crash, volatility, repeat and stuck-position scenarios, with a fragility share. Frequencies over resampled histories are not forecasts of the future.

check_feasibilityA

Check a trading plan before it trades: broker order-rate and minimum-order limits, 2026 US day-trading rules, square-root market impact with crowding, and the capital where costs eat the return. Checks the plan as described against published broker limits and a market-impact model; it never contacts a broker or sees an account.

check_leakageB

Does a signal look ahead? plan gives cuts; rerun your code on the first cut rows for each, then compare. Rows that changed used later rows; the result names the pattern and horizon. No code is sent. A pass covers only these cuts: the columns are the caller's, and survivorship, vendor revisions or a leak no cut reaches leave no trace.

placebo_testA

Does your pipeline find edges in noise? plan writes placebo files (your data's returns in random orders, so nothing is predictable); run the whole pipeline on real.csv and on each, then compare for a p-value that counts every choice it makes. Beating the placebos shows the pipeline finds more in the real order of the returns than in random orders of the same returns; it does not show the edge survives costs, capacity or the future.

Prompts

Interactive templates invoked by user choice

NameDescription
validate_backtestWalk through the deflated Sharpe, overfitting and track-record checks for one strategy, and report what the numbers do not establish.
track_record_neededThe minimum track record length for a Sharpe to clear a benchmark, with the record's own probabilistic Sharpe if its length is known.
backtest_and_validateRun a strategy family over a parameter grid on your prices, then read the deflated Sharpe and overfitting probability that count every variant run.
stress_my_strategyResampled histories and named crash, volatility, repeat and outage scenarios for a strategy's returns.
production_checkOrder-rate and minimum-order limits, 2026 day-trading rules, market impact, crowding and capacity for a trading plan.
summarize_market_seriesSummarize a price or return file instead of reading its rows.
check_signal_for_lookaheadRerun your own signal code on prefixes the server picks, and find any value that depends on later rows.
test_pipeline_on_placebosRun your whole research pipeline on placebo data, where nothing can be predicted, and see whether its real result beats what it finds there.

Resources

Contextual data attached and managed by the client

NameDescription
limitsThe boundary sentences every validation result carries.
sourcesThe papers behind each validator and how each is checked against them.
strategy-specJSON Schema of backtest_strategy's families, parameters and rules.
openapiGenerated from the endpoints that exist; fetched from canlicapital.com when read.

TDQS

A3.8/5.0

Scored across 19 tools

Disambiguation4/5

The validate_* family shares a theme (multiple-testing/luck), but descriptions clearly separate each method and even cross-reference the right alternative (e.g. 'for the probability the Sharpe is real, use validate_deflated_sharpe'). The main soft spot is the overlap between the umbrella audit_backtest and its component validators, which an agent must reason about, but the docs reduce this to occasional hesitation rather than true ambiguity.

Naming Consistency4/5

A strong verb_noun convention dominates (validate_*, check_*, get_key, verify_receipt, backtest_strategy, stress_test), with only minor deviations like the noun-style service_status. Overall readable and predictable, not chaotic.

Tool Count4/5

19 tools is slightly on the heavy side, but each maps to a distinct statistical method or workflow step (validation, key handling, receipts, backtesting, diagnostics), so most earn their place. It sits just above the ideal range but is defensible given the specialized domain.

Completeness5/5

The surface covers the full strategy-validation lifecycle: key/status management, individual and bundled validation methods, offline receipt verification, backtesting, series summarization, stress testing, feasibility, leakage, and placebo testing. No obvious gaps or dead ends for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues