sh.kwant/kwant is an MCP server published by sh.kwant, hosted at kwant.sh. When last checked on 2026-11-23 it was working: it answers and lists its tools. It declares 16 tools, including get_price_history, get_quote, get_fundamentals, compute_indicator, detect_signals.
Quant intelligence over MCP: backtest, signals, screens, scores & portfolios for US & TSX stocks.
1 connections through 4 shared values. Tap any node.
Get historical OHLCV price bars for a ticker. US symbols are bare (AAPL, MSFT); TSX symbols use the Yahoo .TO form (RY.TO) or the TSX:RY form. interval is one of 1m,5m,15m,30m,1h,1d,1wk,1mo (default 1d); range is one of 5d,1mo,3mo,6mo,1y,2y,5y,max (default 1y). Returns an envelope whose values contains interval, range, currency, count, and bars (records with an ISO timestamp plus open, high, low, close, volume). (paid: $0.0050/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| ticker * | string | |
| interval | string | one of ["1m","5m","15m","30m","1h","1d","1wk","1mo"] |
{
"name": "get_price_history",
"description": "Get historical OHLCV price bars for a ticker. US symbols are bare (AAPL, MSFT); TSX symbols use the Yahoo .TO form (RY.TO) or the TSX:RY form. interval is one of 1m,5m,15m,30m,1h,1d,1wk,1mo (default 1d); range is one of 5d,1mo,3mo,6mo,1y,2y,5y,max (default 1y). Returns an envelope whose values contains interval, range, currency, count, and bars (records with an ISO timestamp plus open, high, low, close, volume). (paid: $0.0050/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ticker"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"ticker": {
"type": "string"
},
"interval": {
"enum": [
"1m",
"5m",
"15m",
"30m",
"1h",
"1d",
"1wk",
"1mo"
],
"type": "string"
}
},
"additionalProperties": false
}
}None yet. Changes appear after a server's second daily check.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
Get the latest available quote for a ticker. US symbols are bare (AAPL); TSX symbols use the Yahoo .TO form (RY.TO) or the TSX:RY form. Returns an envelope whose values holds the quote fields (price, currency, previous_close, change, change_percent, volume, market_state, asof as an ISO string). (paid: $0.0050/call)
| Parameter | Type | Description |
|---|---|---|
| ticker * | string |
{
"name": "get_quote",
"description": "Get the latest available quote for a ticker. US symbols are bare (AAPL); TSX symbols use the Yahoo .TO form (RY.TO) or the TSX:RY form. Returns an envelope whose values holds the quote fields (price, currency, previous_close, change, change_percent, volume, market_state, asof as an ISO string). (paid: $0.0050/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ticker"
],
"properties": {
"ticker": {
"type": "string"
}
},
"additionalProperties": false
}
}Get fundamental data for a ticker (profile + key ratios). US symbols are bare (AAPL); TSX symbols use the Yahoo .TO form (RY.TO) or the TSX:RY form. Returns an envelope whose values holds available fundamentals: name, exchange, currency, sector, industry, market_cap, pe_ratio, forward_pe, eps, dividend_yield, beta, fifty_two_week_high, fifty_two_week_low, asof. Fields not covered by the provider are null. (paid: $0.0050/call)
| Parameter | Type | Description |
|---|---|---|
| ticker * | string |
{
"name": "get_fundamentals",
"description": "Get fundamental data for a ticker (profile + key ratios). US symbols are bare (AAPL); TSX symbols use the Yahoo .TO form (RY.TO) or the TSX:RY form. Returns an envelope whose values holds available fundamentals: name, exchange, currency, sector, industry, market_cap, pe_ratio, forward_pe, eps, dividend_yield, beta, fifty_two_week_high, fifty_two_week_low, asof. Fields not covered by the provider are null. (paid: $0.0050/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ticker"
],
"properties": {
"ticker": {
"type": "string"
}
},
"additionalProperties": false
}
}Compute a technical indicator (RSI, MACD, SMA, EMA, BBANDS, ATR, ADX, STOCH) over a ticker's price history. Returns the warmup-aligned series plus the latest values and a one-line summary. Tune the window with `length` (SMA/EMA/RSI/ATR/ADX/BBANDS), `fast`/`slow`/`signal` (MACD), `std` (BBANDS), or `k`/`d`/`smooth_k` (STOCH) — pass them either as top-level fields OR nested under `params`; both work. `window` and `period` are accepted as aliases for `length`. NOTE: for a long window like SMA(200) you MUST set length=200 (the default is 20). The response echoes the effective params it used, and the summary shows the window, e.g. `SMA(200)`. Ensure `range` spans at least `length` bars (e.g. range=2y for SMA(200)) or the series is all-warmup NaN. (paid: $0.0050/call)
| Parameter | Type | Description |
|---|---|---|
| d | ["number","string"] | |
| k | ["number","string"] | |
| std | ["number","string"] | |
| fast | ["number","string"] | |
| slow | ["number","string"] | |
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| length | ["number","string"] | |
| params | any | |
| period | ["number","string"] | |
| signal | ["number","string"] | |
| ticker * | string | |
| window | ["number","string"] | |
| interval | string | one of ["1m","5m","15m","30m","1h","1d","1wk","1mo"] |
| smooth_k | ["number","string"] | |
| indicator * | string | one of ["RSI","MACD","SMA","EMA","BBANDS","ATR","ADX","STOCH"] |
{
"name": "compute_indicator",
"description": "Compute a technical indicator (RSI, MACD, SMA, EMA, BBANDS, ATR, ADX, STOCH) over a ticker's price history. Returns the warmup-aligned series plus the latest values and a one-line summary. Tune the window with `length` (SMA/EMA/RSI/ATR/ADX/BBANDS), `fast`/`slow`/`signal` (MACD), `std` (BBANDS), or `k`/`d`/`smooth_k` (STOCH) — pass them either as top-level fields OR nested under `params`; both work. `window` and `period` are accepted as aliases for `length`. NOTE: for a long window like SMA(200) you MUST set length=200 (the default is 20). The response echoes the effective params it used, and the summary shows the window, e.g. `SMA(200)`. Ensure `range` spans at least `length` bars (e.g. range=2y for SMA(200)) or the series is all-warmup NaN. (paid: $0.0050/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ticker",
"indicator"
],
"properties": {
"d": {
"type": [
"number",
"string"
]
},
"k": {
"type": [
"number",
"string"
]
},
"std": {
"type": [
"number",
"string"
]
},
"fast": {
"type": [
"number",
"string"
]
},
"slow": {
"type": [
"number",
"string"
]
},
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string",
"default": "1y"
},
"length": {
"type": [
"number",
"string"
]
},
"params": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"period": {
"type": [
"number",
"string"
]
},
"signal": {
"type": [
"number",
"string"
]
},
"ticker": {
"type": "string"
},
"window": {
"type": [
"number",
"string"
]
},
"interval": {
"enum": [
"1m",
"5m",
"15m",
"30m",
"1h",
"1d",
"1wk",
"1mo"
],
"type": "string",
"default": "1d"
},
"smooth_k": {
"type": [
"number",
"string"
]
},
"indicator": {
"enum": [
"RSI",
"MACD",
"SMA",
"EMA",
"BBANDS",
"ATR",
"ADX",
"STOCH"
],
"type": "string"
}
},
"additionalProperties": false
}
}Detect classic technical-analysis signals on a ticker's price history. Each requested signal is evaluated and reported as triggered/not-triggered with a date and human-readable detail under signal_summary. Signals (omit `signals` to check all six): golden_cross = SMA(50) crosses above SMA(200) within `lookback`; death_cross = SMA(50) crosses below SMA(200); macd_cross = MACD line crosses above its signal line (bullish); rsi_oversold = RSI(14) below 30 at the latest bar; rsi_overbought = RSI(14) above 70 at the latest bar; breakout = latest close exceeds the highest high of the prior 20 bars. A signal needing more history than is available is returned not-triggered with an insufficient-history detail and a warning — it never fails the call. (paid: $0.0050/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| ticker * | string | |
| signals | array | |
| interval | string | one of ["1m","5m","15m","30m","1h","1d","1wk","1mo"] |
| lookback | integer |
{
"name": "detect_signals",
"description": "Detect classic technical-analysis signals on a ticker's price history. Each requested signal is evaluated and reported as triggered/not-triggered with a date and human-readable detail under signal_summary. Signals (omit `signals` to check all six): golden_cross = SMA(50) crosses above SMA(200) within `lookback`; death_cross = SMA(50) crosses below SMA(200); macd_cross = MACD line crosses above its signal line (bullish); rsi_oversold = RSI(14) below 30 at the latest bar; rsi_overbought = RSI(14) above 70 at the latest bar; breakout = latest close exceeds the highest high of the prior 20 bars. A signal needing more history than is available is returned not-triggered with an insufficient-history detail and a warning — it never fails the call. (paid: $0.0050/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ticker"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"ticker": {
"type": "string"
},
"signals": {
"type": "array",
"items": {
"enum": [
"golden_cross",
"death_cross",
"rsi_oversold",
"rsi_overbought",
"macd_cross",
"breakout"
],
"type": "string"
}
},
"interval": {
"enum": [
"1m",
"5m",
"15m",
"30m",
"1h",
"1d",
"1wk",
"1mo"
],
"type": "string"
},
"lookback": {
"type": "integer",
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
}Compute quantitative statistics (volatility, sharpe, max_drawdown, returns, beta, correlation) over a ticker's daily price history. Omit `metrics` to default to volatility/sharpe/max_drawdown/returns. `beta` and `correlation` require a `benchmark` ticker; `risk_free_rate` is used only by the Sharpe ratio. (paid: $0.0050/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| ticker * | string | |
| metrics | any | |
| benchmark | ["string","null"] | |
| risk_free_rate | number |
{
"name": "compute_stats",
"description": "Compute quantitative statistics (volatility, sharpe, max_drawdown, returns, beta, correlation) over a ticker's daily price history. Omit `metrics` to default to volatility/sharpe/max_drawdown/returns. `beta` and `correlation` require a `benchmark` ticker; `risk_free_rate` is used only by the Sharpe ratio. (paid: $0.0050/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ticker"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string",
"default": "1y"
},
"ticker": {
"type": "string"
},
"metrics": {
"anyOf": [
{
"type": "array",
"items": {
"enum": [
"volatility",
"sharpe",
"max_drawdown",
"beta",
"returns",
"correlation"
],
"type": "string"
}
},
{
"type": "null"
}
]
},
"benchmark": {
"type": [
"string",
"null"
]
},
"risk_free_rate": {
"type": "number",
"default": 0
}
},
"additionalProperties": false
}
}Rank two or more tickers against each other by a single metric (total_return, volatility, sharpe, max_drawdown, last_price). Symbols that cannot be resolved (or lack enough history) are skipped and noted in `warnings` rather than failing the call. Returns a ranked list of {ticker, value, rank, currency} (rank 1 = best). (paid: $0.0050/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| metric | string | one of ["total_return","volatility","sharpe","max_drawdown","last_price"] |
| tickers * | array |
{
"name": "compare_tickers",
"description": "Rank two or more tickers against each other by a single metric (total_return, volatility, sharpe, max_drawdown, last_price). Symbols that cannot be resolved (or lack enough history) are skipped and noted in `warnings` rather than failing the call. Returns a ranked list of {ticker, value, rank, currency} (rank 1 = best). (paid: $0.0050/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"tickers"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string",
"default": "1y"
},
"metric": {
"enum": [
"total_return",
"volatility",
"sharpe",
"max_drawdown",
"last_price"
],
"type": "string",
"default": "total_return"
},
"tickers": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
}Screen a stock universe for tickers matching quantitative filters (logical AND). Fields: price, rsi, sma_50, sma_200, volatility, sharpe, max_drawdown, total_return, dollar_volume, garman_klass_vol. Ops: lt, lte, gt, gte. (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| filters * | array | |
| sort_by | any | |
| universe * | string | one of ["SP500","TSX"] |
| max_tickers | integer |
{
"name": "screen",
"description": "Screen a stock universe for tickers matching quantitative filters (logical AND). Fields: price, rsi, sma_50, sma_200, volatility, sharpe, max_drawdown, total_return, dollar_volume, garman_klass_vol. Ops: lt, lte, gt, gte. (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"universe",
"filters"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string",
"default": "1y"
},
"filters": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"op",
"value"
],
"properties": {
"op": {
"enum": [
"lt",
"lte",
"gt",
"gte"
],
"type": "string"
},
"field": {
"enum": [
"price",
"rsi",
"sma_50",
"sma_200",
"volatility",
"sharpe",
"max_drawdown",
"total_return",
"dollar_volume",
"garman_klass_vol"
],
"type": "string"
},
"value": {
"type": "number"
}
},
"additionalProperties": false
}
},
"sort_by": {
"anyOf": [
{
"$ref": "#/properties/filters/items/properties/field"
},
{
"type": "null"
}
]
},
"universe": {
"enum": [
"SP500",
"TSX"
],
"type": "string"
},
"max_tickers": {
"type": "integer",
"default": 100
}
},
"additionalProperties": false
}
}Backtest a simple long-only technical strategy on daily price history. Strategies: sma_cross (golden/death cross of SMA 50/200), rsi_reversion (enter RSI<30, exit RSI>70), macd_cross (MACD line vs signal). No-lookahead: signals act on the next bar's close. Returns trades + performance metrics. (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| params | any | |
| ticker * | string | |
| strategy * | string | one of ["sma_cross","rsi_reversion","macd_cross"] |
{
"name": "backtest",
"description": "Backtest a simple long-only technical strategy on daily price history. Strategies: sma_cross (golden/death cross of SMA 50/200), rsi_reversion (enter RSI<30, exit RSI>70), macd_cross (MACD line vs signal). No-lookahead: signals act on the next bar's close. Returns trades + performance metrics. (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"ticker",
"strategy"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"params": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"ticker": {
"type": "string"
},
"strategy": {
"enum": [
"sma_cross",
"rsi_reversion",
"macd_cross"
],
"type": "string"
}
},
"additionalProperties": false
}
}Rank a stock universe by a continuous cross-sectional signal score (rank 1 = highest z-score). Signals: jt_momentum, mean_reversion, rsi_filtered_momentum, trend_quality. Scores are relative to the scanned set. (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| top_n | integer | |
| signal | string | one of ["jt_momentum","mean_reversion","rsi_filtered_momentum","trend_quality"] |
| universe * | string | one of ["SP500","TSX"] |
| max_tickers | integer |
{
"name": "screen_with_scores",
"description": "Rank a stock universe by a continuous cross-sectional signal score (rank 1 = highest z-score). Signals: jt_momentum, mean_reversion, rsi_filtered_momentum, trend_quality. Scores are relative to the scanned set. (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"universe"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string",
"default": "2y"
},
"top_n": {
"type": "integer",
"default": 50
},
"signal": {
"enum": [
"jt_momentum",
"mean_reversion",
"rsi_filtered_momentum",
"trend_quality"
],
"type": "string",
"default": "jt_momentum"
},
"universe": {
"enum": [
"SP500",
"TSX"
],
"type": "string"
},
"max_tickers": {
"type": "integer",
"default": 100
}
},
"additionalProperties": false
}
}Score and rank a universe of tickers by a cross-sectional signal. Resolves either a named universe (SP500, TSX) or an explicit tickers override, bulk-fetches daily price history over range, computes a raw per-ticker score for the chosen signal, then converts those raw scores into cross-sectional z-scores and ranks them across the universe (rank 1 = highest z-score). Signals (Jegadeesh–Titman momentum is 12-month minus 1-month return on month-end resampled closes): jt_momentum (that JT 12-1 momentum), mean_reversion (negative trailing 1-month monthly return), rsi_filtered_momentum (JT momentum, names with a 14-day simple RSI > 70 excluded before z-scoring), trend_quality (JT momentum, names trading at or below their 200-day SMA excluded). Tickers with too little history or that fail to fetch are dropped and reported in warnings. range is the lookback (5d,1mo,3mo,6mo,1y,2y,5y,max; default 2y); top_n truncates the ranked output. values holds universe, signal, range, scored, and results (a list of {ticker, raw, zscore, rank} ordered by rank). (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| top_n | integer | |
| signal | string | one of ["jt_momentum","mean_reversion","rsi_filtered_momentum","trend_quality"] |
| tickers | array | |
| universe | string | one of ["SP500","TSX"] |
{
"name": "compute_universe_scores",
"description": "Score and rank a universe of tickers by a cross-sectional signal. Resolves either a named universe (SP500, TSX) or an explicit tickers override, bulk-fetches daily price history over range, computes a raw per-ticker score for the chosen signal, then converts those raw scores into cross-sectional z-scores and ranks them across the universe (rank 1 = highest z-score). Signals (Jegadeesh–Titman momentum is 12-month minus 1-month return on month-end resampled closes): jt_momentum (that JT 12-1 momentum), mean_reversion (negative trailing 1-month monthly return), rsi_filtered_momentum (JT momentum, names with a 14-day simple RSI > 70 excluded before z-scoring), trend_quality (JT momentum, names trading at or below their 200-day SMA excluded). Tickers with too little history or that fail to fetch are dropped and reported in warnings. range is the lookback (5d,1mo,3mo,6mo,1y,2y,5y,max; default 2y); top_n truncates the ranked output. values holds universe, signal, range, scored, and results (a list of {ticker, raw, zscore, rank} ordered by rank). (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"top_n": {
"type": "integer",
"exclusiveMinimum": 0
},
"signal": {
"enum": [
"jt_momentum",
"mean_reversion",
"rsi_filtered_momentum",
"trend_quality"
],
"type": "string"
},
"tickers": {
"type": "array",
"items": {
"type": "string"
}
},
"universe": {
"enum": [
"SP500",
"TSX"
],
"type": "string"
}
},
"additionalProperties": false
}
}Rank a universe of tickers by monthly dollar volume with trailing returns. Resolves either a named universe (SP500, TSX) or an explicit tickers override, bulk-fetches daily OHLCV over range, resamples each to monthly bars (open=first, high=max, low=min, close=last, volume=sum), and per ticker computes trailing returns over 1/3/6/12 periods plus the latest monthly dollar volume (close * volume). Tickers are ranked by latest dollar volume (descending) and the top top_n are returned. Tickers that fail to fetch or lack enough monthly history are skipped and noted in warnings. range is the lookback (5d,1mo,3mo,6mo,1y,2y,5y,max; default 2y); use a multi-year window so the 12-month horizon is well-defined. values holds range, as_of (latest monthly date, YYYY-MM-DD), count, and results — a ranked list of {ticker, dollar_volume, returns: {1m,3m,6m,12m}, rank} where any horizon longer than the available history is null. (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| top_n | integer | |
| tickers | array | |
| resample | string | one of ["M","Q"] |
| universe | string | one of ["SP500","TSX"] |
{
"name": "build_monthly_universe",
"description": "Rank a universe of tickers by monthly dollar volume with trailing returns. Resolves either a named universe (SP500, TSX) or an explicit tickers override, bulk-fetches daily OHLCV over range, resamples each to monthly bars (open=first, high=max, low=min, close=last, volume=sum), and per ticker computes trailing returns over 1/3/6/12 periods plus the latest monthly dollar volume (close * volume). Tickers are ranked by latest dollar volume (descending) and the top top_n are returned. Tickers that fail to fetch or lack enough monthly history are skipped and noted in warnings. range is the lookback (5d,1mo,3mo,6mo,1y,2y,5y,max; default 2y); use a multi-year window so the 12-month horizon is well-defined. values holds range, as_of (latest monthly date, YYYY-MM-DD), count, and results — a ranked list of {ticker, dollar_volume, returns: {1m,3m,6m,12m}, rank} where any horizon longer than the available history is null. (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"top_n": {
"type": "integer",
"exclusiveMinimum": 0
},
"tickers": {
"type": "array",
"items": {
"type": "string"
}
},
"resample": {
"enum": [
"M",
"Q"
],
"type": "string"
},
"universe": {
"enum": [
"SP500",
"TSX"
],
"type": "string"
}
},
"additionalProperties": false
}
}Turn a {ticker: score} mapping into long-only portfolio weights. Selects names and assigns non-negative weights that sum to 1.0 using the chosen method: top_n_weighted (weight by clipped score), equal_weight, risk_parity (inverse-volatility), concentrated_vol (highest-vol from a top-score pool), or sharpe_optimized (max-Sharpe long-only). The last three fetch daily history over range (5d,1mo,3mo,6mo,1y,2y,5y,max) and convert it to returns; tickers that fail to fetch are dropped with a warning. Returns the standard envelope; values holds method, top_n, a weights map, and n_holdings. (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| top_n | integer | |
| method | string | one of ["top_n_weighted","equal_weight","risk_parity","concentrated_vol","sharpe_optimized"] |
| scores * | object |
{
"name": "construct_portfolio",
"description": "Turn a {ticker: score} mapping into long-only portfolio weights. Selects names and assigns non-negative weights that sum to 1.0 using the chosen method: top_n_weighted (weight by clipped score), equal_weight, risk_parity (inverse-volatility), concentrated_vol (highest-vol from a top-score pool), or sharpe_optimized (max-Sharpe long-only). The last three fetch daily history over range (5d,1mo,3mo,6mo,1y,2y,5y,max) and convert it to returns; tickers that fail to fetch are dropped with a warning. Returns the standard envelope; values holds method, top_n, a weights map, and n_holdings. (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"scores"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"top_n": {
"type": "integer"
},
"method": {
"enum": [
"top_n_weighted",
"equal_weight",
"risk_parity",
"concentrated_vol",
"sharpe_optimized"
],
"type": "string"
},
"scores": {
"type": "object",
"additionalProperties": {
"type": "number"
}
}
},
"additionalProperties": false
}
}Backtest a rebalanced, multi-ticker, long-only quant portfolio. Fetches daily history for every ticker over range, then runs a walk-forward simulation: at each period-end rebalance the chosen signal (jt_momentum, mean_reversion, rsi_filtered_momentum, trend_quality) scores each name using only data up to that date, and method turns those scores into long-only weights. Returns gross and net (after cost) performance. rebalance is M (monthly) or Q (quarterly); cost_bps is round-trip cost on turnover; benchmark drives the hit-rate metric and (with crash_filter) a regime filter holding cash when the benchmark trailing-12m return is negative. Returns the standard envelope; values holds equity_curve, rebalances, metrics, holdings and the echoed parameters. (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| top_n | integer | |
| method | string | one of ["top_n_weighted","equal_weight","risk_parity","concentrated_vol","sharpe_optimized"] |
| signal | string | one of ["jt_momentum","mean_reversion","rsi_filtered_momentum","trend_quality"] |
| tickers * | array | |
| cost_bps | number | |
| benchmark | ["string","null"] | |
| rebalance | string | one of ["M","Q"] |
| crash_filter | boolean |
{
"name": "run_portfolio_backtest",
"description": "Backtest a rebalanced, multi-ticker, long-only quant portfolio. Fetches daily history for every ticker over range, then runs a walk-forward simulation: at each period-end rebalance the chosen signal (jt_momentum, mean_reversion, rsi_filtered_momentum, trend_quality) scores each name using only data up to that date, and method turns those scores into long-only weights. Returns gross and net (after cost) performance. rebalance is M (monthly) or Q (quarterly); cost_bps is round-trip cost on turnover; benchmark drives the hit-rate metric and (with crash_filter) a regime filter holding cash when the benchmark trailing-12m return is negative. Returns the standard envelope; values holds equity_curve, rebalances, metrics, holdings and the echoed parameters. (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"tickers"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"top_n": {
"type": "integer"
},
"method": {
"enum": [
"top_n_weighted",
"equal_weight",
"risk_parity",
"concentrated_vol",
"sharpe_optimized"
],
"type": "string"
},
"signal": {
"enum": [
"jt_momentum",
"mean_reversion",
"rsi_filtered_momentum",
"trend_quality"
],
"type": "string"
},
"tickers": {
"type": "array",
"items": {
"type": "string"
}
},
"cost_bps": {
"type": "number"
},
"benchmark": {
"type": [
"string",
"null"
]
},
"rebalance": {
"enum": [
"M",
"Q"
],
"type": "string"
},
"crash_filter": {
"type": "boolean"
}
},
"additionalProperties": false
}
}Compute portfolio-level statistics for a weighted basket of tickers. Given a {ticker: weight} mapping, fetches each ticker's daily history over range and returns the portfolio-level (not per-ticker) volatility, sharpe, max_drawdown and total_return of the weighted basket. weights need NOT sum to 1 (normalized internally). Tickers that cannot be fetched are dropped, a note is added to warnings, and the remaining weights are renormalized. risk_free_rate is an annual rate used only by Sharpe. Returns the standard envelope; values holds range, the normalized weights used, and the stats dict. (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| weights * | object | |
| risk_free_rate | number |
{
"name": "compute_portfolio_stats",
"description": "Compute portfolio-level statistics for a weighted basket of tickers. Given a {ticker: weight} mapping, fetches each ticker's daily history over range and returns the portfolio-level (not per-ticker) volatility, sharpe, max_drawdown and total_return of the weighted basket. weights need NOT sum to 1 (normalized internally). Tickers that cannot be fetched are dropped, a note is added to warnings, and the remaining weights are renormalized. risk_free_rate is an annual rate used only by Sharpe. Returns the standard envelope; values holds range, the normalized weights used, and the stats dict. (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"weights"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"weights": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"risk_free_rate": {
"type": "number"
}
},
"additionalProperties": false
}
}Compute the pairwise return-correlation matrix for a list of tickers. Fetches each ticker's daily history over range, converts it to daily returns, and computes the pairwise Pearson correlation (aligned on shared dates). Requires at least two tickers; tickers that cannot be fetched are dropped and noted in warnings (at least two must survive). Returns the standard envelope; values holds range, the tickers used, and matrix — a nested dict {rowTicker: {colTicker: correlation}} with a 1.0 diagonal. (paid: $0.0100/call)
| Parameter | Type | Description |
|---|---|---|
| range | string | one of ["5d","1mo","3mo","6mo","1y","2y","5y","max"] |
| tickers * | array |
{
"name": "compute_correlation_matrix",
"description": "Compute the pairwise return-correlation matrix for a list of tickers. Fetches each ticker's daily history over range, converts it to daily returns, and computes the pairwise Pearson correlation (aligned on shared dates). Requires at least two tickers; tickers that cannot be fetched are dropped and noted in warnings (at least two must survive). Returns the standard envelope; values holds range, the tickers used, and matrix — a nested dict {rowTicker: {colTicker: correlation}} with a 1.0 diagonal. (paid: $0.0100/call)",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"tickers"
],
"properties": {
"range": {
"enum": [
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"max"
],
"type": "string"
},
"tickers": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
}Kwant returns quantitative analysis over US and TSX equities — quotes, indicators, signals, screens, factor scores, portfolios, and backtests — as structured JSON. Output is for research and informational purposes only. It is NOT investment, financial, or trading advice, and not a recommendation to buy or sell any security. Market data may be delayed or inaccurate; backtested results do not guarantee future performance. The user is responsible for any decision made using this output. See https://kwant.sh/terms. Pricing: initialize and tools/list are free; tools/call is paid ($0.005 per data/signal tool, $0.010 per intelligence tool — the price is in each tool's description). Two ways to pay: (1) keyless x402 pay-per-call — a priced call returns HTTP 402 with a base64 PAYMENT-REQUIRED header describing the amount (USDC on Base); sign it and retry the same call with a PAYMENT-SIGNATURE header. (2) A prepaid API key from https://kwant.sh — send it as `Authorization: Bearer kwant_…` and calls draw down the balance with no per-call signing.
Names, descriptions and schemas were written by the server and are shown as data.