BRAINIAC Portfolio Analytics is an MCP server published by software.brainiac, hosted at www.brainiac.software. When last checked on 2026-11-23 it was working: it answers and lists its tools. It declares 15 tools, including portfolio-analytics_performance-twr-mwr, portfolio-analytics_risk-metrics, portfolio-analytics_var-cvar, portfolio-analytics_brinson-attribution, portfolio-analytics_factor-regression.
Paid Portfolio Analytics API via x402. Unpaid tool calls return 402.
643 connections through 4 shared values. Tap any node.
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.
Compute linked TWR, Modified Dietz and XIRR from valuations and external cash flows, with optional annualisation. Docs: https://www.brainiac.software/api/portfolio-analytics/performance-twr-mwr Keywords: when analysing portfolio risk or weights, valuations, flows, annualize, twr, modifiedDietz, xirr, days, subPeriods, Time-weighted and money-weighted returns, performance twr mwr.
| Parameter | Type | Description |
|---|---|---|
| flows | array | flows, array. Required. |
| annualize | boolean | annualize, boolean. Required. |
| valuations * | array | valuations, array. Required. |
{
"name": "portfolio-analytics_performance-twr-mwr",
"title": "Time-weighted and money-weighted returns",
"description": "Compute linked TWR, Modified Dietz and XIRR from valuations and external cash flows, with optional annualisation. Docs: https://www.brainiac.software/api/portfolio-analytics/performance-twr-mwr Keywords: when analysing portfolio risk or weights, valuations, flows, annualize, twr, modifiedDietz, xirr, days, subPeriods, Time-weighted and money-weighted returns, performance twr mwr.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"valuations"
],
"properties": {
"flows": {
"type": "array",
"items": {
"type": "object",
"required": [
"date",
"amount"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "date, string, date. Required."
},
"amount": {
"type": "number",
"description": "value, number. Required."
}
},
"description": "item, object. Required."
},
"default": [],
"description": "flows, array. Required."
},
"annualize": {
"type": "boolean",
"default": false,
"description": "annualize, boolean. Required."
},
"valuations": {
"type": "array",
"items": {
"type": "object",
"required": [
"date",
"value"
],
"properties": {
"date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "date, string, date. Required."
},
"value": {
"type": "number",
"description": "value, number. Required."
},
"beforeFlow": {
"type": "boolean",
"description": "beforeFlow, boolean. Optional."
}
},
"description": "item, object. Required."
},
"description": "valuations, array. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"twr": {
"type": "number",
"description": "twr. Number."
},
"days": {
"type": "number",
"description": "days. Number."
},
"xirr": {
"type": "number",
"description": "xirr. Number."
},
"status": {
"type": "string",
"description": "status. String."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"subPeriods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"to": {
"type": "string",
"description": "to. String."
},
"from": {
"type": "string",
"description": "from. String."
},
"return": {
"type": "number",
"description": "return. Number."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "subPeriods. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"modifiedDietz": {
"type": "number",
"description": "modifiedDietz. Number."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Time-weighted and money-weighted returns",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Annualised volatility, Sharpe, Sortino, Calmar, max drawdown with peak/trough/recovery indices, skewness and excess kurtosis from a return series. Docs: https://www.brainiac.software/api/portfolio-analytics/risk-metrics Keywords: when analysing portfolio risk or weights, returns, periodsPerYear, riskFreePerPeriod, mar, volatility, annualReturn, sharpe, sortino, maxDrawdown, drawdownPeakIndex, drawdownTroughIndex, recoveryIndex, calmar, skewness.
| Parameter | Type | Description |
|---|---|---|
| mar | ["number","null"] | mar, number. Optional. |
| returns * | array | returns, array. Required. |
| periodsPerYear | number | periodsPerYear, number. Required. |
| riskFreePerPeriod | any | riskFreePerPeriod, value. Required. |
{
"name": "portfolio-analytics_risk-metrics",
"title": "Volatility, Sharpe, Sortino and drawdown",
"description": "Annualised volatility, Sharpe, Sortino, Calmar, max drawdown with peak/trough/recovery indices, skewness and excess kurtosis from a return series. Docs: https://www.brainiac.software/api/portfolio-analytics/risk-metrics Keywords: when analysing portfolio risk or weights, returns, periodsPerYear, riskFreePerPeriod, mar, volatility, annualReturn, sharpe, sortino, maxDrawdown, drawdownPeakIndex, drawdownTroughIndex, recoveryIndex, calmar, skewness.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"returns"
],
"properties": {
"mar": {
"type": [
"number",
"null"
],
"description": "mar, number. Optional."
},
"returns": {
"type": "array",
"items": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": -1
},
{
"type": "object",
"required": [
"date",
"r"
],
"properties": {
"r": {
"type": "number",
"exclusiveMinimum": -1
},
"date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
}
}
],
"description": "item, value. Required."
},
"description": "returns, array. Required."
},
"periodsPerYear": {
"type": "number",
"default": 12,
"description": "periodsPerYear, number. Required.",
"exclusiveMinimum": 0
},
"riskFreePerPeriod": {
"anyOf": [
{
"type": "number"
},
{
"type": "array",
"items": {
"type": "number"
}
}
],
"default": 0,
"description": "riskFreePerPeriod, value. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"calmar": {
"type": "number",
"description": "calmar. Number."
},
"sharpe": {
"type": "number",
"description": "sharpe. Number."
},
"sortino": {
"type": "number",
"description": "sortino. Number."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"skewness": {
"type": "number",
"description": "skewness. Number."
},
"volatility": {
"type": "number",
"description": "volatility. Number."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"maxDrawdown": {
"type": "number",
"description": "maxDrawdown. Number."
},
"annualReturn": {
"type": "number",
"description": "annualReturn. Number."
},
"recoveryIndex": {
"type": "number",
"description": "recoveryIndex. Number."
},
"excessKurtosis": {
"type": "number",
"description": "excessKurtosis. Number."
},
"drawdownPeakIndex": {
"type": "number",
"description": "drawdownPeakIndex. Number."
},
"drawdownTroughIndex": {
"type": "number",
"description": "drawdownTroughIndex. Number."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Volatility, Sharpe, Sortino and drawdown",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Historical, parametric normal and Monte Carlo VaR/ES at caller confidence levels from a return series. Docs: https://www.brainiac.software/api/portfolio-analytics/var-cvar Keywords: when analysing portfolio risk or weights, returns, confidence, methods, portfolioValue, horizonPeriods, simulations, seed, results, Value-at-Risk and Expected Shortfall, var cvar.
| Parameter | Type | Description |
|---|---|---|
| seed | integer | seed, integer, from -9007199254740991 to 9007199254740991. Required. |
| methods | array | methods, array. Required. |
| returns * | array | returns, array. Required. |
| confidence * | array | confidence, array. Required. |
| simulations | integer | simulations, integer, from 1000 to 200000. Required. |
| horizonPeriods | integer | horizonPeriods, integer, from 1 to 9007199254740991. Required. |
| portfolioValue | number | portfolioValue, number. Optional. |
Allocation, selection and interaction effects by segment for one or more periods, with optional Carino linking. Docs: https://www.brainiac.software/api/portfolio-analytics/brinson-attribution Keywords: when analysing portfolio risk or weights, periods, linking, normalizeWeights, allowNegativeWeights, portfolioReturn, benchmarkReturn, activeReturn, segments, totals, Brinson-Fachler attribution, brinson attribution.
| Parameter | Type | Description |
|---|---|---|
| linking | string | linking, string, one of carino, none. Required. |
| periods * | array | periods, array. Required. |
| normalizeWeights | boolean | normalizeWeights, boolean. Required. |
| allowNegativeWeights | boolean | allowNegativeWeights, boolean. Required. |
{
"name": "portfolio-analytics_brinson-attribution",
"title": "Brinson-Fachler attribution",
"description": "Allocation, selection and interaction effects by segment for one or more periods, with optional Carino linking. Docs: https://www.brainiac.software/api/portfolio-analytics/brinson-attribution Keywords: when analysing portfolio risk or weights, periods, linking, normalizeWeights, allowNegativeWeights, portfolioReturn, benchmarkReturn, activeReturn, segments, totals, Brinson-Fachler attribution, brinson attribution.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"periods"
],
"properties": {
"linking": {
"enum": [
"carino",
"none"
],
"type": "string",
"default": "carino",
"description": "linking, string, one of carino, none. Required."
},
"periods": {
"type": "array",
"items": {
"type": "object",
"required": [
"segments"
],
"properties": {
"segments": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"wp",
"wb",
"rp",
"rb"
],
"properties": {
"rb": {
"type": "number",
"description": "wp, number. Required."
},
"rp": {
"type": "number",
"description": "wp, number. Required."
},
"wb": {
"type": "number",
"description": "wp, number. Required."
},
"wp": {
"type": "number",
"description": "wp, number. Required."
},
"name": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "name, string, length 1 to 64. Required."
}
},
"description": "item, object. Required."
},
"description": "segments, array. Required."
}
},
"description": "item, object. Required."
},
"description": "periods, array. Required."
},
"normalizeWeights": {
"type": "boolean",
"default": true,
"description": "normalizeWeights, boolean. Required."
},
"allowNegativeWeights": {
"type": "boolean",
"default": false,
"description": "allowNegativeWeights, boolean. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"totals": {
"type": "object",
"properties": {
"selection": {
"type": "number",
"description": "selection. Number."
},
"allocation": {
"type": "number",
"description": "allocation. Number."
},
"interaction": {
"type": "number",
"description": "interaction. Number."
}
},
"description": "totals. Object.",
"additionalProperties": {}
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "name. String."
},
"selection": {
"type": "number",
"description": "selection. Number."
},
"allocation": {
"type": "number",
"description": "allocation. Number."
},
"interaction": {
"type": "number",
"description": "interaction. Number."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "segments. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"activeReturn": {
"type": "number",
"description": "activeReturn. Number."
},
"benchmarkReturn": {
"type": "number",
"description": "benchmarkReturn. Number."
},
"portfolioReturn": {
"type": "number",
"description": "portfolioReturn. Number."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Brinson-Fachler attribution",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}OLS of portfolio excess returns on caller-supplied factors with intercept, betas, alpha and optional Newey-West standard errors. Docs: https://www.brainiac.software/api/portfolio-analytics/factor-regression Keywords: when analysing portfolio risk or weights, returns, factors, riskFree, periodsPerYear, neweyWestLags, alphaPerPeriod, alphaAnnualized, betas, alphaSe, rSquared, Factor regression of excess returns, factor regression.
| Parameter | Type | Description |
|---|---|---|
| factors * | object | factors, object. Required. |
| returns * | array | returns, array. Required. |
| riskFree | any | riskFree, value. Required. |
| neweyWestLags | integer | neweyWestLags, integer, from 0 to 100. Required. |
| periodsPerYear | number | periodsPerYear, number. Required. |
{
"name": "portfolio-analytics_factor-regression",
"title": "Factor regression of excess returns",
"description": "OLS of portfolio excess returns on caller-supplied factors with intercept, betas, alpha and optional Newey-West standard errors. Docs: https://www.brainiac.software/api/portfolio-analytics/factor-regression Keywords: when analysing portfolio risk or weights, returns, factors, riskFree, periodsPerYear, neweyWestLags, alphaPerPeriod, alphaAnnualized, betas, alphaSe, rSquared, Factor regression of excess returns, factor regression.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"returns",
"factors"
],
"properties": {
"factors": {
"type": "object",
"description": "factors, object. Required.",
"propertyNames": {
"type": "string",
"maxLength": 32,
"minLength": 1
},
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
}
}
},
"returns": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required.",
"exclusiveMinimum": -1
},
"description": "returns, array. Required."
},
"riskFree": {
"anyOf": [
{
"type": "number"
},
{
"type": "array",
"items": {
"type": "number"
}
}
],
"default": 0,
"description": "riskFree, value. Required."
},
"neweyWestLags": {
"type": "integer",
"default": 0,
"maximum": 100,
"minimum": 0,
"description": "neweyWestLags, integer, from 0 to 100. Required."
},
"periodsPerYear": {
"type": "number",
"default": 12,
"description": "periodsPerYear, number. Required.",
"exclusiveMinimum": 0
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"n": {
"type": "number",
"description": "n. Number."
},
"betas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"se": {
"type": "number",
"description": "se. Number."
},
"beta": {
"type": "number",
"description": "beta. Number."
},
"factor": {
"type": "string",
"description": "factor. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "betas. Array."
},
"alphaSe": {
"type": "number",
"description": "alphaSe. Number."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"rSquared": {
"type": "number",
"description": "rSquared. Number."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"alphaPerPeriod": {
"type": "number",
"description": "alphaPerPeriod. Number."
},
"alphaAnnualized": {
"type": "number",
"description": "alphaAnnualized. Number."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Factor regression of excess returns",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Minimum variance, target return, max Sharpe or target volatility portfolios from expected returns and a covariance matrix, with bounds. Docs: https://www.brainiac.software/api/portfolio-analytics/mean-variance-optimize Keywords: when analysing portfolio risk or weights, assets, expectedReturns, objective, covariance, returns, targetReturn, targetVolatility, riskFree, bounds, groups, frontierPoints, shrinkage, weights, expectedReturn.
| Parameter | Type | Description |
|---|---|---|
| assets * | array | assets, array. Required. |
| bounds | object | bounds, object. Required. |
| groups | array | groups, array. Required. |
| returns | array | returns, array. Optional. |
| riskFree | number | riskFree, number. Required. |
| objective * | string | objective, string, one of min_variance, target_return, max_sharpe, target_volatility. Required. |
| shrinkage | string | shrinkage, string, one of none, ledoit_wolf. Required. |
| covariance | array | covariance, array. Optional. |
| targetReturn |
Spinu ERC (or caller risk-budget) weights and inverse-volatility weights with risk-contribution breakdown. Docs: https://www.brainiac.software/api/portfolio-analytics/risk-parity-weights Keywords: when analysing portfolio risk or weights, assets, covariance, riskBudget, method, weights, riskContributions, portfolioVolatility, inverseVolatility, iterations, converged, risk parity weights.
| Parameter | Type | Description |
|---|---|---|
| assets * | array | assets, array. Required. |
| method | string | method, string, one of erc, inverse_volatility. Required. |
| covariance * | array | covariance, array. Required. |
| riskBudget | any | riskBudget, value. Optional. |
{
"name": "portfolio-analytics_risk-parity-weights",
"title": "Equal-risk-contribution and inverse-volatility weights",
"description": "Spinu ERC (or caller risk-budget) weights and inverse-volatility weights with risk-contribution breakdown. Docs: https://www.brainiac.software/api/portfolio-analytics/risk-parity-weights Keywords: when analysing portfolio risk or weights, assets, covariance, riskBudget, method, weights, riskContributions, portfolioVolatility, inverseVolatility, iterations, converged, risk parity weights.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"assets",
"covariance"
],
"properties": {
"assets": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "item, string, length 1 to 64. Required."
},
"description": "assets, array. Required."
},
"method": {
"enum": [
"erc",
"inverse_volatility"
],
"type": "string",
"default": "erc",
"description": "method, string, one of erc, inverse_volatility. Required."
},
"covariance": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required."
},
"description": "item, array. Required."
},
"description": "covariance, array. Required."
},
"riskBudget": {
"anyOf": [
{
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required.",
"exclusiveMinimum": 0
}
},
{
"type": "null"
}
],
"description": "riskBudget, value. Optional."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"weights": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "weights. Array."
},
"converged": {
"type": "boolean",
"description": "converged. Boolean."
},
"iterations": {
"type": "number",
"description": "iterations. Number."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"inverseVolatility": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "inverseVolatility. Array."
},
"riskContributions": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "riskContributions. Array."
},
"portfolioVolatility": {
"type": "number",
"description": "portfolioVolatility. Number."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Equal-risk-contribution and inverse-volatility weights",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Compute buys and sells that restore target weights with tolerance bands, a cash buffer, minimum trade size and whole-share rounding. Docs: https://www.brainiac.software/api/portfolio-analytics/rebalance-trades Keywords: when analysing portfolio risk or weights, holdings, targets, cash, band, cashBuffer, minTradeValue, fractional, restricted, totalValue, investable, trades, untouched, cashAfter, weightsAfter.
| Parameter | Type | Description |
|---|---|---|
| band | object | band, object. Required. |
| cash | number | cash, number, from 0 to any. Required. |
| targets * | object | targets, object. Required. |
| holdings * | array | holdings, array. Required. |
| cashBuffer | number | cashBuffer, number, from 0 to 0.5. Required. |
| fractional | boolean | fractional, boolean. Required. |
| restricted | array | restricted, array. Required. |
| minTradeValue | number | minTradeValue, number, from 0 to any. Required. |
Pearson and Spearman correlation, optional covariance, rolling windows and Ledoit-Wolf shrinkage covariance from caller series. Docs: https://www.brainiac.software/api/portfolio-analytics/correlation-matrix Keywords: when analysing portfolio risk or weights, series, methods, missing, rollingWindow, pairCounts, pearson, psd, spearman, ledoitWolf, Correlation and Ledoit-Wolf covariance, correlation matrix.
| Parameter | Type | Description |
|---|---|---|
| series * | object | series, object. Required. |
| methods | array | methods, array. Required. |
| missing | string | missing, string, one of pairwise, listwise. Required. |
| rollingWindow | any | rollingWindow, value. Optional. |
{
"name": "portfolio-analytics_correlation-matrix",
"title": "Correlation and Ledoit-Wolf covariance",
"description": "Pearson and Spearman correlation, optional covariance, rolling windows and Ledoit-Wolf shrinkage covariance from caller series. Docs: https://www.brainiac.software/api/portfolio-analytics/correlation-matrix Keywords: when analysing portfolio risk or weights, series, methods, missing, rollingWindow, pairCounts, pearson, psd, spearman, ledoitWolf, Correlation and Ledoit-Wolf covariance, correlation matrix.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"series"
],
"properties": {
"series": {
"type": "object",
"description": "series, object. Required.",
"propertyNames": {
"type": "string",
"maxLength": 64,
"minLength": 1
},
"additionalProperties": {
"type": "array",
"items": {
"type": [
"number",
"null"
]
}
}
},
"methods": {
"type": "array",
"items": {
"enum": [
"pearson",
"spearman",
"ledoit_wolf",
"covariance"
],
"type": "string",
"description": "item, string, one of pearson, spearman, ledoit_wolf, covariance. Required."
},
"default": [
"pearson",
"spearman",
"ledoit_wolf"
],
"description": "methods, array. Required."
},
"missing": {
"enum": [
"pairwise",
"listwise"
],
"type": "string",
"default": "pairwise",
"description": "missing, string, one of pairwise, listwise. Required."
},
"rollingWindow": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": 3
},
{
"type": "null"
}
],
"description": "rollingWindow, value. Optional."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"psd": {
"type": "boolean",
"description": "psd. Boolean."
},
"pearson": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "item. Array."
},
"description": "pearson. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"spearman": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "item. Array."
},
"description": "spearman. Array."
},
"ledoitWolf": {
"type": "object",
"properties": {
"shrinkage": {
"type": "number",
"description": "shrinkage. Number."
},
"covariance": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "item. Array."
},
"description": "covariance. Array."
}
},
"description": "ledoitWolf. Object.",
"additionalProperties": {}
},
"pairCounts": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "item. Array."
},
"description": "pairCounts. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Correlation and Ledoit-Wolf covariance",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Apply caller-defined asset-class, factor and rate shocks to holdings and report P/L by holding and in total. Docs: https://www.brainiac.software/api/portfolio-analytics/stress-test Keywords: when analysing portfolio risk or weights, holdings, scenarios, Scenario stress test on holdings, stress test, Portfolio Analytics, scenarios.name, scenarios.pnl.
| Parameter | Type | Description |
|---|---|---|
| holdings * | array | holdings, array. Required. |
| scenarios * | array | scenarios, array. Required. |
{
"name": "portfolio-analytics_stress-test",
"title": "Scenario stress test on holdings",
"description": "Apply caller-defined asset-class, factor and rate shocks to holdings and report P/L by holding and in total. Docs: https://www.brainiac.software/api/portfolio-analytics/stress-test Keywords: when analysing portfolio risk or weights, holdings, scenarios, Scenario stress test on holdings, stress test, Portfolio Analytics, scenarios.name, scenarios.pnl.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"holdings",
"scenarios"
],
"properties": {
"holdings": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"value"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "id, string, length 1 to 64. Required."
},
"betas": {
"type": "object",
"description": "betas, object. Optional.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"value": {
"type": "number",
"description": "value, number. Required."
},
"mapping": {
"type": "object",
"properties": {
"assetClass": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "assetClass, string, length 1 to 64. Optional."
}
},
"description": "mapping, object. Optional."
},
"duration": {
"type": "number",
"description": "duration, number. Optional."
},
"convexity": {
"type": "number",
"description": "convexity, number. Optional."
}
},
"description": "item, object. Required."
},
"description": "holdings, array. Required."
},
"scenarios": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "name, string, length 1 to 128. Required."
},
"rateShockBp": {
"type": "number",
"description": "rateShockBp, number. Optional."
},
"factorShocks": {
"type": "object",
"default": {},
"description": "factorShocks, object. Required.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"assetClassShocks": {
"type": "object",
"default": {},
"description": "assetClassShocks, object. Required.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
}
},
"description": "item, object. Required."
},
"description": "scenarios, array. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"scenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pnl": {
"type": "number",
"description": "pnl. Number."
},
"name": {
"type": "string",
"description": "name. String."
},
"pnlPct": {
"type": "number",
"description": "pnlPct. Number."
},
"unmapped": {
"type": "array",
"items": {
"type": "string",
"description": "Item. String."
},
"description": "unmapped. Array."
},
"byHolding": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "id. String."
},
"pnl": {
"type": "number",
"description": "pnl. Number."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "byHolding. Array."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "scenarios. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Scenario stress test on holdings",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Project a contribution/withdrawal plan with mulberry32 Monte Carlo paths and report success probability and terminal wealth percentiles. Docs: https://www.brainiac.software/api/portfolio-analytics/monte-carlo-goal Keywords: when analysing portfolio risk or weights, startValue, years, meanReturn, volatility, annualContribution, annualWithdrawal, timing, inflation, paths, seed, percentiles, successProbability, terminalPercentiles, medianDepletionYear.
| Parameter | Type | Description |
|---|---|---|
| seed | integer | seed, integer, from -9007199254740991 to 9007199254740991. Required. |
| paths | integer | paths, integer, from 100 to 100000. Required. |
| years * | integer | years, integer, from 1 to 100. Required. |
| timing | string | timing, string, one of start, end. Required. |
| inflation | number | inflation, number, from 0 to any. Required. |
| meanReturn * | number | meanReturn, number. Required. |
| startValue * | number | startValue, number. Required. |
| volatility * | number |
Flag IRC §1091 wash sales in caller transactions with FIFO lots, disallowed losses and replacement basis adjustments per IRS Publication 550. Docs: https://www.brainiac.software/api/portfolio-analytics/wash-sale-detect Keywords: when analysing portfolio risk or weights, transactions, identicalGroups, lotMethod, washSales, allowedLosses, Detect potential US wash sales, wash sale detect.
| Parameter | Type | Description |
|---|---|---|
| lotMethod | string | lotMethod, string, one of fifo. Required. |
| transactions * | array | transactions, array. Required. |
| identicalGroups | array | identicalGroups, array. Required. |
{
"name": "portfolio-analytics_wash-sale-detect",
"title": "Detect potential US wash sales",
"description": "Flag IRC §1091 wash sales in caller transactions with FIFO lots, disallowed losses and replacement basis adjustments per IRS Publication 550. Docs: https://www.brainiac.software/api/portfolio-analytics/wash-sale-detect Keywords: when analysing portfolio risk or weights, transactions, identicalGroups, lotMethod, washSales, allowedLosses, Detect potential US wash sales, wash sale detect.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"transactions"
],
"properties": {
"lotMethod": {
"enum": [
"fifo"
],
"type": "string",
"default": "fifo",
"description": "lotMethod, string, one of fifo. Required."
},
"transactions": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"date",
"symbol",
"side",
"quantity",
"amount"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "id, string, length 1 to 64. Required."
},
"date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "date, string, date. Required."
},
"side": {
"enum": [
"buy",
"sell"
],
"type": "string",
"description": "side, string, one of buy, sell. Required."
},
"amount": {
"type": "number",
"description": "amount, number. Required.",
"exclusiveMinimum": 0
},
"symbol": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "symbol, string, length 1 to 64. Required."
},
"quantity": {
"type": "number",
"description": "quantity, number. Required.",
"exclusiveMinimum": 0
}
},
"description": "item, object. Required."
},
"description": "transactions, array. Required."
},
"identicalGroups": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "item, string, length 1 to 64. Required."
},
"description": "item, array. Required."
},
"default": [],
"description": "identicalGroups, array. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"washSales": {
"type": "array",
"items": {
"type": "object",
"properties": {
"saleId": {
"type": "string",
"description": "saleId. String."
},
"replacementId": {
"type": "string",
"description": "replacementId. String."
},
"disallowedLoss": {
"type": "number",
"description": "disallowedLoss. Number."
},
"sharesAffected": {
"type": "number",
"description": "sharesAffected. Number."
},
"holdingPeriodStart": {
"type": "string",
"description": "holdingPeriodStart. String."
},
"replacementAdjustedBasis": {
"type": "number",
"description": "replacementAdjustedBasis. Number."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "washSales. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"allowedLosses": {
"type": "array",
"items": {
"type": "string",
"description": "Item. String."
},
"description": "allowedLosses. Array."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Detect potential US wash sales",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Compare terminal wealth with and without expense ratios, advisory fees and loads under multiplicative or subtractive fee methods. Docs: https://www.brainiac.software/api/portfolio-analytics/fee-drag-project Keywords: when analysing portfolio risk or weights, initial, years, grossReturn, annualContribution, fees, frontLoad, feeMethod, includeByYear, terminalNoFees, terminalWithFees, feeDrag, feeDragPct, byYear, Project long-run fee drag.
| Parameter | Type | Description |
|---|---|---|
| fees | array | fees, array. Required. |
| years * | integer | years, integer, from 1 to 100. Required. |
| initial * | number | initial, number. Required. |
| feeMethod | string | feeMethod, string, one of multiplicative, subtractive. Required. |
| frontLoad | number | frontLoad, number, from 0 to 1. Required. |
| grossReturn * | number | grossReturn, number. Required. |
| includeByYear | boolean | includeByYear, boolean. Required. |
| annualContribution | number | annualContribution, number. Required. |
Tracking error, information ratio, up/down capture, batting average and optional active share versus a benchmark. Docs: https://www.brainiac.software/api/portfolio-analytics/tracking-error-capture Keywords: when analysing portfolio risk or weights, benchmark, periodsPerYear, holdings, captureMethod, trackingError, informationRatio, upCapture, downCapture, battingAverage, activeShare, Tracking error and capture ratios, tracking error capture.
| Parameter | Type | Description |
|---|---|---|
| holdings | object | holdings, object. Optional. |
| benchmark * | array | benchmark, array. Required. |
| portfolio * | array | portfolio, array. Required. |
| captureMethod | string | captureMethod, string, one of arithmetic, geometric. Required. |
| periodsPerYear | number | periodsPerYear, number. Required. |
{
"name": "portfolio-analytics_tracking-error-capture",
"title": "Tracking error and capture ratios",
"description": "Tracking error, information ratio, up/down capture, batting average and optional active share versus a benchmark. Docs: https://www.brainiac.software/api/portfolio-analytics/tracking-error-capture Keywords: when analysing portfolio risk or weights, benchmark, periodsPerYear, holdings, captureMethod, trackingError, informationRatio, upCapture, downCapture, battingAverage, activeShare, Tracking error and capture ratios, tracking error capture.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"portfolio",
"benchmark"
],
"properties": {
"holdings": {
"type": "object",
"required": [
"portfolio",
"benchmark"
],
"properties": {
"benchmark": {
"type": "object",
"description": "benchmark, object. Required.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"portfolio": {
"type": "object",
"description": "portfolio, object. Required.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
}
},
"description": "holdings, object. Optional."
},
"benchmark": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required.",
"exclusiveMinimum": -1
},
"description": "benchmark, array. Required."
},
"portfolio": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required.",
"exclusiveMinimum": -1
},
"description": "portfolio, array. Required."
},
"captureMethod": {
"enum": [
"arithmetic",
"geometric"
],
"type": "string",
"default": "arithmetic",
"description": "captureMethod, string, one of arithmetic, geometric. Required."
},
"periodsPerYear": {
"type": "number",
"default": 12,
"description": "periodsPerYear, number. Required.",
"exclusiveMinimum": 0
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"upCapture": {
"type": "number",
"description": "upCapture. Number."
},
"activeShare": {
"type": "number",
"description": "activeShare. Number."
},
"downCapture": {
"type": "number",
"description": "downCapture. Number."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"trackingError": {
"type": "number",
"description": "trackingError. Number."
},
"battingAverage": {
"type": "number",
"description": "battingAverage. Number."
},
"informationRatio": {
"type": "number",
"description": "informationRatio. Number."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Tracking error and capture ratios",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Aggregate caller-supplied fund look-through holdings by asset class, sector, region and top underlying positions. Docs: https://www.brainiac.software/api/portfolio-analytics/allocation-xray Keywords: when analysing portfolio risk or weights, positions, top, total, byAssetClass, bySector, byRegion, topUnderlying, Look-through allocation x-ray, allocation xray.
| Parameter | Type | Description |
|---|---|---|
| top | integer | top, integer, from 1 to 100. Required. |
| positions * | array | positions, array. Required. |
{
"name": "portfolio-analytics_allocation-xray",
"title": "Look-through allocation x-ray",
"description": "Aggregate caller-supplied fund look-through holdings by asset class, sector, region and top underlying positions. Docs: https://www.brainiac.software/api/portfolio-analytics/allocation-xray Keywords: when analysing portfolio risk or weights, positions, top, total, byAssetClass, bySector, byRegion, topUnderlying, Look-through allocation x-ray, allocation xray.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"positions"
],
"properties": {
"top": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 1,
"description": "top, integer, from 1 to 100. Required."
},
"positions": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"value"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "id, string, length 1 to 64. Required."
},
"value": {
"type": "number",
"description": "value, number. Required."
},
"region": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "region, string, length 1 to 64. Optional."
},
"sector": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "sector, string, length 1 to 64. Optional."
},
"assetClass": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "assetClass, string, length 1 to 64. Optional."
},
"otherClass": {
"type": "object",
"properties": {
"region": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "region, string, length 1 to 64. Optional."
},
"sector": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "sector, string, length 1 to 64. Optional."
},
"assetClass": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "assetClass, string, length 1 to 64. Optional."
}
},
"description": "otherClass, object. Optional."
},
"lookThrough": {
"type": "array",
"items": {
"type": "object",
"required": [
"security",
"weight"
],
"properties": {
"region": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "region, string, length 1 to 64. Optional."
},
"sector": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "sector, string, length 1 to 64. Optional."
},
"weight": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "weight, number, from 0 to 1. Required."
},
"security": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "security, string, length 1 to 64. Required."
},
"assetClass": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "assetClass, string, length 1 to 64. Optional."
}
},
"description": "item, object. Required."
},
"description": "lookThrough, array. Optional."
},
"otherWeight": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "otherWeight, number, from 0 to 1. Optional."
}
},
"description": "item, object. Required."
},
"description": "positions, array. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"total": {
"type": "number",
"description": "total. Number."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"byRegion": {
"type": "object",
"properties": {
"US": {
"type": "number",
"description": "US. Number."
},
"Unknown": {
"type": "number",
"description": "Unknown. Number."
}
},
"description": "byRegion. Object.",
"additionalProperties": {}
},
"bySector": {
"type": "object",
"properties": {
"Government": {
"type": "number",
"description": "Government. Number."
},
"Technology": {
"type": "number",
"description": "Technology. Number."
},
"Unclassified": {
"type": "number",
"description": "Unclassified. Number."
}
},
"description": "bySector. Object.",
"additionalProperties": {}
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"byAssetClass": {
"type": "object",
"properties": {
"bond": {
"type": "number",
"description": "bond. Number."
},
"equity": {
"type": "number",
"description": "equity. Number."
}
},
"description": "byAssetClass. Object.",
"additionalProperties": {}
},
"topUnderlying": {
"type": "array",
"items": {
"type": "object",
"properties": {
"via": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "via. Array."
},
"value": {
"type": "number",
"description": "value. Number."
},
"weight": {
"type": "number",
"description": "weight. Number."
},
"security": {
"type": "string",
"description": "security. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "topUnderlying. Array."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Look-through allocation x-ray",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Tool calls wrap the existing POST APIs and stay pay-per-call. initialize and tools/list are free. An unpaid tool call returns the x402 payment terms in the tool result and does not run. Retry with the payment in params._meta["x402/payment"], or send payment-signature. Payment settles only after a successful result.
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
Too large to show here.
{
"name": "portfolio-analytics_var-cvar",
"title": "Value-at-Risk and Expected Shortfall",
"description": "Historical, parametric normal and Monte Carlo VaR/ES at caller confidence levels from a return series. Docs: https://www.brainiac.software/api/portfolio-analytics/var-cvar Keywords: when analysing portfolio risk or weights, returns, confidence, methods, portfolioValue, horizonPeriods, simulations, seed, results, Value-at-Risk and Expected Shortfall, var cvar.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"returns",
"confidence"
],
"properties": {
"seed": {
"type": "integer",
"default": 42,
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "seed, integer, from -9007199254740991 to 9007199254740991. Required."
},
"methods": {
"type": "array",
"items": {
"enum": [
"historical",
"parametric",
"monte_carlo"
],
"type": "string",
"description": "item, string, one of historical, parametric, monte_carlo. Required."
},
"default": [
"historical",
"parametric",
"monte_carlo"
],
"description": "methods, array. Required."
},
"returns": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required.",
"exclusiveMinimum": -1
},
"description": "returns, array. Required."
},
"confidence": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required.",
"exclusiveMaximum": 0.9999,
"exclusiveMinimum": 0.5
},
"description": "confidence, array. Required."
},
"simulations": {
"type": "integer",
"default": 10000,
"maximum": 200000,
"minimum": 1000,
"description": "simulations, integer, from 1000 to 200000. Required."
},
"horizonPeriods": {
"type": "integer",
"default": 1,
"maximum": 9007199254740991,
"minimum": 1,
"description": "horizonPeriods, integer, from 1 to 9007199254740991. Required."
},
"portfolioValue": {
"type": "number",
"description": "portfolioValue, number. Optional.",
"exclusiveMinimum": 0
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"es": {
"type": "number",
"description": "es. Number."
},
"var": {
"type": "number",
"description": "var. Number."
},
"method": {
"type": "string",
"description": "method. String."
},
"varAmount": {
"type": "number",
"description": "varAmount. Number."
},
"confidence": {
"type": "number",
"description": "confidence. Number."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "results. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Value-at-Risk and Expected Shortfall",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}| number |
| targetReturn, number. Optional. |
| frontierPoints | integer | frontierPoints, integer, from 0 to 100. Required. |
| expectedReturns * | array | expectedReturns, array. Required. |
| targetVolatility | number | targetVolatility, number. Optional. |
{
"name": "portfolio-analytics_mean-variance-optimize",
"title": "Markowitz mean-variance optimisation",
"description": "Minimum variance, target return, max Sharpe or target volatility portfolios from expected returns and a covariance matrix, with bounds. Docs: https://www.brainiac.software/api/portfolio-analytics/mean-variance-optimize Keywords: when analysing portfolio risk or weights, assets, expectedReturns, objective, covariance, returns, targetReturn, targetVolatility, riskFree, bounds, groups, frontierPoints, shrinkage, weights, expectedReturn.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"assets",
"expectedReturns",
"objective"
],
"properties": {
"assets": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "item, string, length 1 to 64. Required."
},
"description": "assets, array. Required."
},
"bounds": {
"type": "object",
"default": {
"max": 1,
"min": 0
},
"properties": {
"max": {
"type": "number",
"default": 1,
"description": "max, number. Required."
},
"min": {
"type": "number",
"default": 0,
"description": "min, number. Required."
}
},
"description": "bounds, object. Required."
},
"groups": {
"type": "array",
"items": {
"type": "object",
"required": [
"assets",
"min",
"max"
],
"properties": {
"max": {
"type": "number",
"description": "item, number. Required."
},
"min": {
"type": "number",
"description": "item, number. Required."
},
"assets": {
"type": "array",
"items": {
"type": "string",
"description": "item, string. Required."
},
"description": "assets, array. Required."
}
},
"description": "item, object. Required."
},
"default": [],
"description": "groups, array. Required."
},
"returns": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required."
},
"description": "item, array. Required."
},
"description": "returns, array. Optional."
},
"riskFree": {
"type": "number",
"default": 0,
"description": "riskFree, number. Required."
},
"objective": {
"enum": [
"min_variance",
"target_return",
"max_sharpe",
"target_volatility"
],
"type": "string",
"description": "objective, string, one of min_variance, target_return, max_sharpe, target_volatility. Required."
},
"shrinkage": {
"enum": [
"none",
"ledoit_wolf"
],
"type": "string",
"default": "none",
"description": "shrinkage, string, one of none, ledoit_wolf. Required."
},
"covariance": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required."
},
"description": "item, array. Required."
},
"description": "covariance, array. Optional."
},
"targetReturn": {
"type": "number",
"description": "targetReturn, number. Optional."
},
"frontierPoints": {
"type": "integer",
"default": 0,
"maximum": 100,
"minimum": 0,
"description": "frontierPoints, integer, from 0 to 100. Required."
},
"expectedReturns": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required."
},
"description": "expectedReturns, array. Required."
},
"targetVolatility": {
"type": "number",
"description": "targetVolatility, number. Optional.",
"exclusiveMinimum": 0
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"sharpe": {
"type": "number",
"description": "sharpe. Number."
},
"status": {
"type": "string",
"description": "status. String."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"weights": {
"type": "array",
"items": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"description": "asset. String."
},
"weight": {
"type": "number",
"description": "weight. Number."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "weights. Array."
},
"volatility": {
"type": "number",
"description": "volatility. Number."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"expectedReturn": {
"type": "number",
"description": "expectedReturn. Number."
},
"activeConstraints": {
"type": "array",
"items": {
"type": "string",
"description": "Item. String."
},
"description": "activeConstraints. Array."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Markowitz mean-variance optimisation",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}{
"name": "portfolio-analytics_rebalance-trades",
"title": "Rebalance trades to target weights",
"description": "Compute buys and sells that restore target weights with tolerance bands, a cash buffer, minimum trade size and whole-share rounding. Docs: https://www.brainiac.software/api/portfolio-analytics/rebalance-trades Keywords: when analysing portfolio risk or weights, holdings, targets, cash, band, cashBuffer, minTradeValue, fractional, restricted, totalValue, investable, trades, untouched, cashAfter, weightsAfter.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"holdings",
"targets"
],
"properties": {
"band": {
"type": "object",
"default": {
"type": "absolute",
"value": 0
},
"required": [
"type",
"value"
],
"properties": {
"type": {
"enum": [
"absolute",
"relative"
],
"type": "string",
"description": "type, string, one of absolute, relative. Required."
},
"value": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "value, number, from 0 to 1. Required."
}
},
"description": "band, object. Required."
},
"cash": {
"type": "number",
"default": 0,
"minimum": 0,
"description": "cash, number, from 0 to any. Required."
},
"targets": {
"type": "object",
"description": "targets, object. Required.",
"propertyNames": {
"type": "string",
"maxLength": 64,
"minLength": 1
},
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"holdings": {
"type": "array",
"items": {
"type": "object",
"required": [
"symbol",
"quantity",
"price"
],
"properties": {
"price": {
"type": "number",
"description": "price, number. Required.",
"exclusiveMinimum": 0
},
"symbol": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "symbol, string, length 1 to 64. Required."
},
"quantity": {
"type": "number",
"description": "quantity, number. Required."
}
},
"description": "item, object. Required."
},
"description": "holdings, array. Required."
},
"cashBuffer": {
"type": "number",
"default": 0,
"maximum": 0.5,
"minimum": 0,
"description": "cashBuffer, number, from 0 to 0.5. Required."
},
"fractional": {
"type": "boolean",
"default": false,
"description": "fractional, boolean. Required."
},
"restricted": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "item, string, length 1 to 64. Required."
},
"default": [],
"description": "restricted, array. Required."
},
"minTradeValue": {
"type": "number",
"default": 0,
"minimum": 0,
"description": "minTradeValue, number, from 0 to any. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"trades": {
"type": "array",
"items": {
"type": "object",
"properties": {
"side": {
"type": "string",
"description": "side. String."
},
"value": {
"type": "number",
"description": "value. Number."
},
"symbol": {
"type": "string",
"description": "symbol. String."
},
"quantity": {
"type": "number",
"description": "quantity. Number."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "trades. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"cashAfter": {
"type": "number",
"description": "cashAfter. Number."
},
"untouched": {
"type": "array",
"items": {
"type": "object",
"properties": {
"drift": {
"type": "number",
"description": "drift. Number."
},
"reason": {
"type": "string",
"description": "reason. String."
},
"symbol": {
"type": "string",
"description": "symbol. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "untouched. Array."
},
"investable": {
"type": "number",
"description": "investable. Number."
},
"totalValue": {
"type": "number",
"description": "totalValue. Number."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"weightsAfter": {
"type": "object",
"properties": {
"BND": {
"type": "number",
"description": "BND. Number."
},
"VTI": {
"type": "number",
"description": "VTI. Number."
},
"VXUS": {
"type": "number",
"description": "VXUS. Number."
}
},
"description": "weightsAfter. Object.",
"additionalProperties": {}
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Rebalance trades to target weights",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}| volatility, number, from 0 to any. Required. |
| percentiles | array | percentiles, array. Required. |
| annualWithdrawal | number | annualWithdrawal, number, from 0 to any. Required. |
| annualContribution | number | annualContribution, number. Required. |
{
"name": "portfolio-analytics_monte-carlo-goal",
"title": "Monte Carlo retirement or savings goal",
"description": "Project a contribution/withdrawal plan with mulberry32 Monte Carlo paths and report success probability and terminal wealth percentiles. Docs: https://www.brainiac.software/api/portfolio-analytics/monte-carlo-goal Keywords: when analysing portfolio risk or weights, startValue, years, meanReturn, volatility, annualContribution, annualWithdrawal, timing, inflation, paths, seed, percentiles, successProbability, terminalPercentiles, medianDepletionYear.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"startValue",
"years",
"meanReturn",
"volatility"
],
"properties": {
"seed": {
"type": "integer",
"default": 42,
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "seed, integer, from -9007199254740991 to 9007199254740991. Required."
},
"paths": {
"type": "integer",
"default": 2000,
"maximum": 100000,
"minimum": 100,
"description": "paths, integer, from 100 to 100000. Required."
},
"years": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "years, integer, from 1 to 100. Required."
},
"timing": {
"enum": [
"start",
"end"
],
"type": "string",
"default": "start",
"description": "timing, string, one of start, end. Required."
},
"inflation": {
"type": "number",
"default": 0,
"minimum": 0,
"description": "inflation, number, from 0 to any. Required."
},
"meanReturn": {
"type": "number",
"description": "meanReturn, number. Required."
},
"startValue": {
"type": "number",
"description": "startValue, number. Required.",
"exclusiveMinimum": 0
},
"volatility": {
"type": "number",
"minimum": 0,
"description": "volatility, number, from 0 to any. Required."
},
"percentiles": {
"type": "array",
"items": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "item, number, from 0 to 100. Required."
},
"default": [
10,
50,
90
],
"description": "percentiles, array. Required."
},
"annualWithdrawal": {
"type": "number",
"default": 0,
"minimum": 0,
"description": "annualWithdrawal, number, from 0 to any. Required."
},
"annualContribution": {
"type": "number",
"default": 0,
"description": "annualContribution, number. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"successProbability": {
"type": "number",
"description": "successProbability. Number."
},
"medianDepletionYear": {
"type": "number",
"description": "medianDepletionYear. Number."
},
"terminalPercentiles": {
"type": "object",
"properties": {
"10": {
"type": "number",
"description": "10. Number."
},
"50": {
"type": "number",
"description": "50. Number."
},
"90": {
"type": "number",
"description": "90. Number."
}
},
"description": "terminalPercentiles. Object.",
"additionalProperties": {}
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Monte Carlo retirement or savings goal",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}{
"name": "portfolio-analytics_fee-drag-project",
"title": "Project long-run fee drag",
"description": "Compare terminal wealth with and without expense ratios, advisory fees and loads under multiplicative or subtractive fee methods. Docs: https://www.brainiac.software/api/portfolio-analytics/fee-drag-project Keywords: when analysing portfolio risk or weights, initial, years, grossReturn, annualContribution, fees, frontLoad, feeMethod, includeByYear, terminalNoFees, terminalWithFees, feeDrag, feeDragPct, byYear, Project long-run fee drag.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"initial",
"years",
"grossReturn"
],
"properties": {
"fees": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"rate"
],
"properties": {
"name": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "name, string, length 1 to 64. Required."
},
"rate": {
"type": "number",
"maximum": 0.2,
"minimum": 0,
"description": "rate, number, from 0 to 0.2. Required."
}
},
"description": "item, object. Required."
},
"default": [],
"description": "fees, array. Required."
},
"years": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "years, integer, from 1 to 100. Required."
},
"initial": {
"type": "number",
"description": "initial, number. Required.",
"exclusiveMinimum": 0
},
"feeMethod": {
"enum": [
"multiplicative",
"subtractive"
],
"type": "string",
"default": "multiplicative",
"description": "feeMethod, string, one of multiplicative, subtractive. Required."
},
"frontLoad": {
"type": "number",
"default": 0,
"maximum": 1,
"minimum": 0,
"description": "frontLoad, number, from 0 to 1. Required."
},
"grossReturn": {
"type": "number",
"description": "grossReturn, number. Required."
},
"includeByYear": {
"type": "boolean",
"default": false,
"description": "includeByYear, boolean. Required."
},
"annualContribution": {
"type": "number",
"default": 0,
"description": "annualContribution, number. Required."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"byYear": {
"type": "array",
"items": {
"type": "string",
"description": "Item. String."
},
"description": "byYear. Array."
},
"feeDrag": {
"type": "number",
"description": "feeDrag. Number."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "url. String."
},
"source": {
"type": "string",
"description": "source. String."
},
"status": {
"type": "string",
"description": "status. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
}
},
"description": "item. Object.",
"additionalProperties": {}
},
"description": "sources. Array."
},
"feeDragPct": {
"type": "number",
"description": "feeDragPct. Number."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"terminalNoFees": {
"type": "number",
"description": "terminalNoFees. Number."
},
"terminalWithFees": {
"type": "number",
"description": "terminalWithFees. Number."
}
},
"additionalProperties": {}
},
"annotations": {
"title": "Project long-run fee drag",
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}