BRAINIAC Portfolio Analytics
Paid Portfolio Analytics API via x402. Unpaid tool calls return 402.
¿Debería usar esto?
Calidad y seguridad
Hallazgos (29)
- LOWen portfolio-analytics_performance-twr-mwr
- LOWen portfolio-analytics_performance-twr-mwr
- LOWen portfolio-analytics_risk-metrics
- LOWen portfolio-analytics_risk-metrics
- LOWen portfolio-analytics_var-cvar
- LOWen portfolio-analytics_brinson-attribution
- LOWen portfolio-analytics_brinson-attribution
- LOWen portfolio-analytics_factor-regression
- LOWen portfolio-analytics_factor-regression
- LOWen portfolio-analytics_mean-variance-optimize
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"portfolio-analytics": {
"url": "https://www.brainiac.software/mcp/portfolio-analytics"
}
}
}Puntos de conexión remotos
https://www.brainiac.software/mcp/portfolio-analyticsstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (15)
🟢portfolio-analytics_performance-twr-mwr(valuations, flows, annualize)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"valuations": {
"type": "array",
"items": {
"type": "object",
"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": {
"description": "beforeFlow, boolean. Optional.",
"type": "boolean"
}
},
"required": [
"date",
"value"
],
"description": "item, object. Required."
},
"description": "valuations, array. Required."
},
"flows": {
"default": [],
"description": "flows, array. Required.",
"type": "array",
"items": {
"type": "object",
"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."
}
},
"required": [
"date",
"amount"
],
"description": "item, object. Required."
}
},
"annualize": {
"default": false,
"description": "annualize, boolean. Required.",
"type": "boolean"
}
},
"required": [
"valuations"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"twr": {
"type": "number",
"description": "twr. Number."
},
"modifiedDietz": {
"type": "number",
"description": "modifiedDietz. Number."
},
"xirr": {
"type": "number",
"description": "xirr. Number."
},
"days": {
"type": "number",
"description": "days. Number."
},
"subPeriods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "from. String."
},
"to": {
"type": "string",
"description": "to. String."
},
"return": {
"type": "number",
"description": "return. Number."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "subPeriods. Array."
},
"status": {
"type": "string",
"description": "status. String."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_risk-metrics(returns, periodsPerYear, riskFreePerPeriod, mar)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"returns": {
"type": "array",
"items": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": -1
},
{
"type": "object",
"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])))$"
},
"r": {
"type": "number",
"exclusiveMinimum": -1
}
},
"required": [
"date",
"r"
]
}
],
"description": "item, value. Required."
},
"description": "returns, array. Required."
},
"periodsPerYear": {
"default": 12,
"description": "periodsPerYear, number. Required.",
"type": "number",
"exclusiveMinimum": 0
},
"riskFreePerPeriod": {
"default": 0,
"description": "riskFreePerPeriod, value. Required.",
"anyOf": [
{
"type": "number"
},
{
"type": "array",
"items": {
"type": "number"
}
}
]
},
"mar": {
"description": "mar, number. Optional.",
"type": [
"number",
"null"
]
}
},
"required": [
"returns"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"volatility": {
"type": "number",
"description": "volatility. Number."
},
"annualReturn": {
"type": "number",
"description": "annualReturn. Number."
},
"sharpe": {
"type": "number",
"description": "sharpe. Number."
},
"sortino": {
"type": "number",
"description": "sortino. Number."
},
"maxDrawdown": {
"type": "number",
"description": "maxDrawdown. Number."
},
"drawdownPeakIndex": {
"type": "number",
"description": "drawdownPeakIndex. Number."
},
"drawdownTroughIndex": {
"type": "number",
"description": "drawdownTroughIndex. Number."
},
"recoveryIndex": {
"type": "number",
"description": "recoveryIndex. Number."
},
"calmar": {
"type": "number",
"description": "calmar. Number."
},
"skewness": {
"type": "number",
"description": "skewness. Number."
},
"excessKurtosis": {
"type": "number",
"description": "excessKurtosis. Number."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_var-cvar(returns, confidence, methods, portfolioValue, horizonPeriods, ...)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"returns": {
"type": "array",
"items": {
"type": "number",
"exclusiveMinimum": -1,
"description": "item, number. Required."
},
"description": "returns, array. Required."
},
"confidence": {
"type": "array",
"items": {
"type": "number",
"exclusiveMinimum": 0.5,
"exclusiveMaximum": 0.9999,
"description": "item, number. Required."
},
"description": "confidence, array. Required."
},
"methods": {
"default": [
"historical",
"parametric",
"monte_carlo"
],
"description": "methods, array. Required.",
"type": "array",
"items": {
"type": "string",
"enum": [
"historical",
"parametric",
"monte_carlo"
],
"description": "item, string, one of historical, parametric, monte_carlo. Required."
}
},
"portfolioValue": {
"description": "portfolioValue, number. Optional.",
"type": "number",
"exclusiveMinimum": 0
},
"horizonPeriods": {
"default": 1,
"description": "horizonPeriods, integer, from 1 to 9007199254740991. Required.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"simulations": {
"default": 10000,
"description": "simulations, integer, from 1000 to 200000. Required.",
"type": "integer",
"minimum": 1000,
"maximum": 200000
},
"seed": {
"default": 42,
"description": "seed, integer, from -9007199254740991 to 9007199254740991. Required.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"returns",
"confidence"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"method": {
"type": "string",
"description": "method. String."
},
"confidence": {
"type": "number",
"description": "confidence. Number."
},
"var": {
"type": "number",
"description": "var. Number."
},
"es": {
"type": "number",
"description": "es. Number."
},
"varAmount": {
"type": "number",
"description": "varAmount. Number."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "results. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_brinson-attribution(periods, linking, normalizeWeights, allowNegativeWeights)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"periods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "name, string, length 1 to 64. Required."
},
"wp": {
"type": "number",
"description": "wp, number. Required."
},
"wb": {
"type": "number",
"description": "wp, number. Required."
},
"rp": {
"type": "number",
"description": "wp, number. Required."
},
"rb": {
"type": "number",
"description": "wp, number. Required."
}
},
"required": [
"name",
"wp",
"wb",
"rp",
"rb"
],
"description": "item, object. Required."
},
"description": "segments, array. Required."
}
},
"required": [
"segments"
],
"description": "item, object. Required."
},
"description": "periods, array. Required."
},
"linking": {
"default": "carino",
"description": "linking, string, one of carino, none. Required.",
"type": "string",
"enum": [
"carino",
"none"
]
},
"normalizeWeights": {
"default": true,
"description": "normalizeWeights, boolean. Required.",
"type": "boolean"
},
"allowNegativeWeights": {
"default": false,
"description": "allowNegativeWeights, boolean. Required.",
"type": "boolean"
}
},
"required": [
"periods"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"portfolioReturn": {
"type": "number",
"description": "portfolioReturn. Number."
},
"benchmarkReturn": {
"type": "number",
"description": "benchmarkReturn. Number."
},
"activeReturn": {
"type": "number",
"description": "activeReturn. Number."
},
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "name. String."
},
"allocation": {
"type": "number",
"description": "allocation. Number."
},
"selection": {
"type": "number",
"description": "selection. Number."
},
"interaction": {
"type": "number",
"description": "interaction. Number."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "segments. Array."
},
"totals": {
"type": "object",
"properties": {
"allocation": {
"type": "number",
"description": "allocation. Number."
},
"selection": {
"type": "number",
"description": "selection. Number."
},
"interaction": {
"type": "number",
"description": "interaction. Number."
}
},
"additionalProperties": {},
"description": "totals. Object."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_factor-regression(returns, riskFree, factors, periodsPerYear, neweyWestLags)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"returns": {
"type": "array",
"items": {
"type": "number",
"exclusiveMinimum": -1,
"description": "item, number. Required."
},
"description": "returns, array. Required."
},
"riskFree": {
"default": 0,
"description": "riskFree, value. Required.",
"anyOf": [
{
"type": "number"
},
{
"type": "array",
"items": {
"type": "number"
}
}
]
},
"factors": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 32
},
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
}
},
"description": "factors, object. Required."
},
"periodsPerYear": {
"default": 12,
"description": "periodsPerYear, number. Required.",
"type": "number",
"exclusiveMinimum": 0
},
"neweyWestLags": {
"default": 0,
"description": "neweyWestLags, integer, from 0 to 100. Required.",
"type": "integer",
"minimum": 0,
"maximum": 100
}
},
"required": [
"returns",
"factors"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"alphaPerPeriod": {
"type": "number",
"description": "alphaPerPeriod. Number."
},
"alphaAnnualized": {
"type": "number",
"description": "alphaAnnualized. Number."
},
"betas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"factor": {
"type": "string",
"description": "factor. String."
},
"beta": {
"type": "number",
"description": "beta. Number."
},
"se": {
"type": "number",
"description": "se. Number."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "betas. Array."
},
"alphaSe": {
"type": "number",
"description": "alphaSe. Number."
},
"rSquared": {
"type": "number",
"description": "rSquared. Number."
},
"n": {
"type": "number",
"description": "n. Number."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_mean-variance-optimize(assets, expectedReturns, covariance, returns, objective, ...)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "item, string, length 1 to 64. Required."
},
"description": "assets, array. Required."
},
"expectedReturns": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required."
},
"description": "expectedReturns, array. Required."
},
"covariance": {
"description": "covariance, array. Optional.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required."
},
"description": "item, array. Required."
}
},
"returns": {
"description": "returns, array. Optional.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required."
},
"description": "item, array. Required."
}
},
"objective": {
"type": "string",
"enum": [
"min_variance",
"target_return",
"max_sharpe",
"target_volatility"
],
"description": "objective, string, one of min_variance, target_return, max_sharpe, target_volatility. Required."
},
"targetReturn": {
"description": "targetReturn, number. Optional.",
"type": "number"
},
"targetVolatility": {
"description": "targetVolatility, number. Optional.",
"type": "number",
"exclusiveMinimum": 0
},
"riskFree": {
"default": 0,
"description": "riskFree, number. Required.",
"type": "number"
},
"bounds": {
"default": {
"min": 0,
"max": 1
},
"description": "bounds, object. Required.",
"type": "object",
"properties": {
"min": {
"default": 0,
"description": "min, number. Required.",
"type": "number"
},
"max": {
"default": 1,
"description": "max, number. Required.",
"type": "number"
}
}
},
"groups": {
"default": [],
"description": "groups, array. Required.",
"type": "array",
"items": {
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"type": "string",
"description": "item, string. Required."
},
"description": "assets, array. Required."
},
"min": {
"type": "number",
"description": "item, number. Required."
},
"max": {
"type": "number",
"description": "item, number. Required."
}
},
"required": [
"assets",
"min",
"max"
],
"description": "item, object. Required."
}
},
"frontierPoints": {
"default": 0,
"description": "frontierPoints, integer, from 0 to 100. Required.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"shrinkage": {
"default": "none",
"description": "shrinkage, string, one of none, ledoit_wolf. Required.",
"type": "string",
"enum": [
"none",
"ledoit_wolf"
]
}
},
"required": [
"assets",
"expectedReturns",
"objective"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"weights": {
"type": "array",
"items": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"description": "asset. String."
},
"weight": {
"type": "number",
"description": "weight. Number."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "weights. Array."
},
"expectedReturn": {
"type": "number",
"description": "expectedReturn. Number."
},
"volatility": {
"type": "number",
"description": "volatility. Number."
},
"sharpe": {
"type": "number",
"description": "sharpe. Number."
},
"activeConstraints": {
"type": "array",
"items": {
"type": "string",
"description": "Item. String."
},
"description": "activeConstraints. Array."
},
"status": {
"type": "string",
"description": "status. String."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_risk-parity-weights(assets, covariance, riskBudget, method)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "item, string, length 1 to 64. Required."
},
"description": "assets, array. Required."
},
"covariance": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item, number. Required."
},
"description": "item, array. Required."
},
"description": "covariance, array. Required."
},
"riskBudget": {
"description": "riskBudget, value. Optional.",
"anyOf": [
{
"type": "array",
"items": {
"type": "number",
"exclusiveMinimum": 0,
"description": "item, number. Required."
}
},
{
"type": "null"
}
]
},
"method": {
"default": "erc",
"description": "method, string, one of erc, inverse_volatility. Required.",
"type": "string",
"enum": [
"erc",
"inverse_volatility"
]
}
},
"required": [
"assets",
"covariance"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"weights": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "weights. Array."
},
"riskContributions": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "riskContributions. Array."
},
"portfolioVolatility": {
"type": "number",
"description": "portfolioVolatility. Number."
},
"inverseVolatility": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "inverseVolatility. Array."
},
"iterations": {
"type": "number",
"description": "iterations. Number."
},
"converged": {
"type": "boolean",
"description": "converged. Boolean."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_rebalance-trades(holdings, cash, targets, band, cashBuffer, ...)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"holdings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "symbol, string, length 1 to 64. Required."
},
"quantity": {
"type": "number",
"description": "quantity, number. Required."
},
"price": {
"type": "number",
"exclusiveMinimum": 0,
"description": "price, number. Required."
}
},
"required": [
"symbol",
"quantity",
"price"
],
"description": "item, object. Required."
},
"description": "holdings, array. Required."
},
"cash": {
"default": 0,
"description": "cash, number, from 0 to any. Required.",
"type": "number",
"minimum": 0
},
"targets": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"description": "targets, object. Required."
},
"band": {
"default": {
"type": "absolute",
"value": 0
},
"description": "band, object. Required.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"absolute",
"relative"
],
"description": "type, string, one of absolute, relative. Required."
},
"value": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "value, number, from 0 to 1. Required."
}
},
"required": [
"type",
"value"
]
},
"cashBuffer": {
"default": 0,
"description": "cashBuffer, number, from 0 to 0.5. Required.",
"type": "number",
"minimum": 0,
"maximum": 0.5
},
"minTradeValue": {
"default": 0,
"description": "minTradeValue, number, from 0 to any. Required.",
"type": "number",
"minimum": 0
},
"fractional": {
"default": false,
"description": "fractional, boolean. Required.",
"type": "boolean"
},
"restricted": {
"default": [],
"description": "restricted, array. Required.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "item, string, length 1 to 64. Required."
}
}
},
"required": [
"holdings",
"targets"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"totalValue": {
"type": "number",
"description": "totalValue. Number."
},
"investable": {
"type": "number",
"description": "investable. Number."
},
"trades": {
"type": "array",
"items": {
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "symbol. String."
},
"side": {
"type": "string",
"description": "side. String."
},
"quantity": {
"type": "number",
"description": "quantity. Number."
},
"value": {
"type": "number",
"description": "value. Number."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "trades. Array."
},
"untouched": {
"type": "array",
"items": {
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "symbol. String."
},
"reason": {
"type": "string",
"description": "reason. String."
},
"drift": {
"type": "number",
"description": "drift. Number."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "untouched. Array."
},
"cashAfter": {
"type": "number",
"description": "cashAfter. Number."
},
"weightsAfter": {
"type": "object",
"properties": {
"VTI": {
"type": "number",
"description": "VTI. Number."
},
"BND": {
"type": "number",
"description": "BND. Number."
},
"VXUS": {
"type": "number",
"description": "VXUS. Number."
}
},
"additionalProperties": {},
"description": "weightsAfter. Object."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_correlation-matrix(series, methods, missing, rollingWindow)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"series": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"additionalProperties": {
"type": "array",
"items": {
"type": [
"number",
"null"
]
}
},
"description": "series, object. Required."
},
"methods": {
"default": [
"pearson",
"spearman",
"ledoit_wolf"
],
"description": "methods, array. Required.",
"type": "array",
"items": {
"type": "string",
"enum": [
"pearson",
"spearman",
"ledoit_wolf",
"covariance"
],
"description": "item, string, one of pearson, spearman, ledoit_wolf, covariance. Required."
}
},
"missing": {
"default": "pairwise",
"description": "missing, string, one of pairwise, listwise. Required.",
"type": "string",
"enum": [
"pairwise",
"listwise"
]
},
"rollingWindow": {
"description": "rollingWindow, value. Optional.",
"anyOf": [
{
"type": "integer",
"minimum": 3,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"series"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"pairCounts": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "item. Array."
},
"description": "pairCounts. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
},
"pearson": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"description": "item. Number."
},
"description": "item. Array."
},
"description": "pearson. Array."
},
"psd": {
"type": "boolean",
"description": "psd. Boolean."
},
"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."
}
},
"additionalProperties": {},
"description": "ledoitWolf. Object."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_stress-test(holdings, scenarios)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"holdings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "id, string, length 1 to 64. Required."
},
"value": {
"type": "number",
"description": "value, number. Required."
},
"mapping": {
"description": "mapping, object. Optional.",
"type": "object",
"properties": {
"assetClass": {
"description": "assetClass, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
},
"betas": {
"description": "betas, object. Optional.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"duration": {
"description": "duration, number. Optional.",
"type": "number"
},
"convexity": {
"description": "convexity, number. Optional.",
"type": "number"
}
},
"required": [
"id",
"value"
],
"description": "item, object. Required."
},
"description": "holdings, array. Required."
},
"scenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "name, string, length 1 to 128. Required."
},
"assetClassShocks": {
"default": {},
"description": "assetClassShocks, object. Required.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"factorShocks": {
"default": {},
"description": "factorShocks, object. Required.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"rateShockBp": {
"description": "rateShockBp, number. Optional.",
"type": "number"
}
},
"required": [
"name"
],
"description": "item, object. Required."
},
"description": "scenarios, array. Required."
}
},
"required": [
"holdings",
"scenarios"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"scenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "name. String."
},
"pnl": {
"type": "number",
"description": "pnl. Number."
},
"pnlPct": {
"type": "number",
"description": "pnlPct. Number."
},
"byHolding": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "id. String."
},
"pnl": {
"type": "number",
"description": "pnl. Number."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "byHolding. Array."
},
"unmapped": {
"type": "array",
"items": {
"type": "string",
"description": "Item. String."
},
"description": "unmapped. Array."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "scenarios. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_monte-carlo-goal(startValue, years, annualContribution, annualWithdrawal, timing, ...)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"startValue": {
"type": "number",
"exclusiveMinimum": 0,
"description": "startValue, number. Required."
},
"years": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "years, integer, from 1 to 100. Required."
},
"annualContribution": {
"default": 0,
"description": "annualContribution, number. Required.",
"type": "number"
},
"annualWithdrawal": {
"default": 0,
"description": "annualWithdrawal, number, from 0 to any. Required.",
"type": "number",
"minimum": 0
},
"timing": {
"default": "start",
"description": "timing, string, one of start, end. Required.",
"type": "string",
"enum": [
"start",
"end"
]
},
"meanReturn": {
"type": "number",
"description": "meanReturn, number. Required."
},
"volatility": {
"type": "number",
"minimum": 0,
"description": "volatility, number, from 0 to any. Required."
},
"inflation": {
"default": 0,
"description": "inflation, number, from 0 to any. Required.",
"type": "number",
"minimum": 0
},
"paths": {
"default": 2000,
"description": "paths, integer, from 100 to 100000. Required.",
"type": "integer",
"minimum": 100,
"maximum": 100000
},
"seed": {
"default": 42,
"description": "seed, integer, from -9007199254740991 to 9007199254740991. Required.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"percentiles": {
"default": [
10,
50,
90
],
"description": "percentiles, array. Required.",
"type": "array",
"items": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "item, number, from 0 to 100. Required."
}
}
},
"required": [
"startValue",
"years",
"meanReturn",
"volatility"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"successProbability": {
"type": "number",
"description": "successProbability. Number."
},
"terminalPercentiles": {
"type": "object",
"properties": {
"10": {
"type": "number",
"description": "10. Number."
},
"50": {
"type": "number",
"description": "50. Number."
},
"90": {
"type": "number",
"description": "90. Number."
}
},
"additionalProperties": {},
"description": "terminalPercentiles. Object."
},
"medianDepletionYear": {
"type": "number",
"description": "medianDepletionYear. Number."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_wash-sale-detect(transactions, identicalGroups, lotMethod)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"transactions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"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."
},
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "symbol, string, length 1 to 64. Required."
},
"side": {
"type": "string",
"enum": [
"buy",
"sell"
],
"description": "side, string, one of buy, sell. Required."
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"description": "quantity, number. Required."
},
"amount": {
"type": "number",
"exclusiveMinimum": 0,
"description": "amount, number. Required."
}
},
"required": [
"id",
"date",
"symbol",
"side",
"quantity",
"amount"
],
"description": "item, object. Required."
},
"description": "transactions, array. Required."
},
"identicalGroups": {
"default": [],
"description": "identicalGroups, array. Required.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "item, string, length 1 to 64. Required."
},
"description": "item, array. Required."
}
},
"lotMethod": {
"default": "fifo",
"description": "lotMethod, string, one of fifo. Required.",
"type": "string",
"enum": [
"fifo"
]
}
},
"required": [
"transactions"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"washSales": {
"type": "array",
"items": {
"type": "object",
"properties": {
"saleId": {
"type": "string",
"description": "saleId. String."
},
"replacementId": {
"type": "string",
"description": "replacementId. String."
},
"sharesAffected": {
"type": "number",
"description": "sharesAffected. Number."
},
"disallowedLoss": {
"type": "number",
"description": "disallowedLoss. Number."
},
"replacementAdjustedBasis": {
"type": "number",
"description": "replacementAdjustedBasis. Number."
},
"holdingPeriodStart": {
"type": "string",
"description": "holdingPeriodStart. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "washSales. Array."
},
"allowedLosses": {
"type": "array",
"items": {
"type": "string",
"description": "Item. String."
},
"description": "allowedLosses. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_fee-drag-project(initial, annualContribution, years, grossReturn, fees, ...)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"initial": {
"type": "number",
"exclusiveMinimum": 0,
"description": "initial, number. Required."
},
"annualContribution": {
"default": 0,
"description": "annualContribution, number. Required.",
"type": "number"
},
"years": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "years, integer, from 1 to 100. Required."
},
"grossReturn": {
"type": "number",
"description": "grossReturn, number. Required."
},
"fees": {
"default": [],
"description": "fees, array. Required.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "name, string, length 1 to 64. Required."
},
"rate": {
"type": "number",
"minimum": 0,
"maximum": 0.2,
"description": "rate, number, from 0 to 0.2. Required."
}
},
"required": [
"name",
"rate"
],
"description": "item, object. Required."
}
},
"frontLoad": {
"default": 0,
"description": "frontLoad, number, from 0 to 1. Required.",
"type": "number",
"minimum": 0,
"maximum": 1
},
"feeMethod": {
"default": "multiplicative",
"description": "feeMethod, string, one of multiplicative, subtractive. Required.",
"type": "string",
"enum": [
"multiplicative",
"subtractive"
]
},
"includeByYear": {
"default": false,
"description": "includeByYear, boolean. Required.",
"type": "boolean"
}
},
"required": [
"initial",
"years",
"grossReturn"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"terminalNoFees": {
"type": "number",
"description": "terminalNoFees. Number."
},
"terminalWithFees": {
"type": "number",
"description": "terminalWithFees. Number."
},
"feeDrag": {
"type": "number",
"description": "feeDrag. Number."
},
"feeDragPct": {
"type": "number",
"description": "feeDragPct. Number."
},
"byYear": {
"type": "array",
"items": {
"type": "string",
"description": "Item. String."
},
"description": "byYear. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_tracking-error-capture(portfolio, benchmark, periodsPerYear, holdings, captureMethod)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"portfolio": {
"type": "array",
"items": {
"type": "number",
"exclusiveMinimum": -1,
"description": "item, number. Required."
},
"description": "portfolio, array. Required."
},
"benchmark": {
"type": "array",
"items": {
"type": "number",
"exclusiveMinimum": -1,
"description": "item, number. Required."
},
"description": "benchmark, array. Required."
},
"periodsPerYear": {
"default": 12,
"description": "periodsPerYear, number. Required.",
"type": "number",
"exclusiveMinimum": 0
},
"holdings": {
"description": "holdings, object. Optional.",
"type": "object",
"properties": {
"portfolio": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
},
"description": "portfolio, object. Required."
},
"benchmark": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
},
"description": "benchmark, object. Required."
}
},
"required": [
"portfolio",
"benchmark"
]
},
"captureMethod": {
"default": "arithmetic",
"description": "captureMethod, string, one of arithmetic, geometric. Required.",
"type": "string",
"enum": [
"arithmetic",
"geometric"
]
}
},
"required": [
"portfolio",
"benchmark"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"trackingError": {
"type": "number",
"description": "trackingError. Number."
},
"informationRatio": {
"type": "number",
"description": "informationRatio. Number."
},
"upCapture": {
"type": "number",
"description": "upCapture. Number."
},
"downCapture": {
"type": "number",
"description": "downCapture. Number."
},
"battingAverage": {
"type": "number",
"description": "battingAverage. Number."
},
"activeShare": {
"type": "number",
"description": "activeShare. Number."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}🟢portfolio-analytics_allocation-xray(positions, top)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"positions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "id, string, length 1 to 64. Required."
},
"value": {
"type": "number",
"description": "value, number. Required."
},
"lookThrough": {
"description": "lookThrough, array. Optional.",
"type": "array",
"items": {
"type": "object",
"properties": {
"security": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "security, string, length 1 to 64. Required."
},
"weight": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "weight, number, from 0 to 1. Required."
},
"assetClass": {
"description": "assetClass, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"sector": {
"description": "sector, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"region": {
"description": "region, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"required": [
"security",
"weight"
],
"description": "item, object. Required."
}
},
"otherWeight": {
"description": "otherWeight, number, from 0 to 1. Optional.",
"type": "number",
"minimum": 0,
"maximum": 1
},
"otherClass": {
"description": "otherClass, object. Optional.",
"type": "object",
"properties": {
"assetClass": {
"description": "assetClass, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"sector": {
"description": "sector, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"region": {
"description": "region, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
},
"assetClass": {
"description": "assetClass, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"sector": {
"description": "sector, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"region": {
"description": "region, string, length 1 to 64. Optional.",
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"required": [
"id",
"value"
],
"description": "item, object. Required."
},
"description": "positions, array. Required."
},
"top": {
"default": 10,
"description": "top, integer, from 1 to 100. Required.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"positions"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Esquema de salida
{
"type": "object",
"properties": {
"total": {
"type": "number",
"description": "total. Number."
},
"byAssetClass": {
"type": "object",
"properties": {
"equity": {
"type": "number",
"description": "equity. Number."
},
"bond": {
"type": "number",
"description": "bond. Number."
}
},
"additionalProperties": {},
"description": "byAssetClass. Object."
},
"bySector": {
"type": "object",
"properties": {
"Technology": {
"type": "number",
"description": "Technology. Number."
},
"Government": {
"type": "number",
"description": "Government. Number."
},
"Unclassified": {
"type": "number",
"description": "Unclassified. Number."
}
},
"additionalProperties": {},
"description": "bySector. Object."
},
"byRegion": {
"type": "object",
"properties": {
"US": {
"type": "number",
"description": "US. Number."
},
"Unknown": {
"type": "number",
"description": "Unknown. Number."
}
},
"additionalProperties": {},
"description": "byRegion. Object."
},
"topUnderlying": {
"type": "array",
"items": {
"type": "object",
"properties": {
"security": {
"type": "string",
"description": "security. String."
},
"value": {
"type": "number",
"description": "value. Number."
},
"weight": {
"type": "number",
"description": "weight. Number."
},
"via": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "via. Array."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "topUnderlying. Array."
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "source. String."
},
"url": {
"type": "string",
"description": "url. String."
},
"retrievedAt": {
"type": "string",
"description": "retrievedAt. String."
},
"status": {
"type": "string",
"description": "status. String."
}
},
"additionalProperties": {},
"description": "item. Object."
},
"description": "sources. Array."
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"description": "item. String."
},
"description": "limitations. Array."
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": {}
}Comunidad
Evidencia