Compare
Metrics, equity curves and year-by-year track records for several strategies at once.
The same analysis you see in the Analytics console, over HTTPS: a full narrative for any portfolio, answers to questions about its strategy, and a risk profile with an AI read. Requests and responses are JSON.
https://ai.momentocapital.com/api/v1application/jsonX-API-Keyjanus_.mc_val_1.$ curl -X POST https://ai.momentocapital.com/api/v1/analyst/chat \ -H "X-API-Key: janus_your_key_here" \ -H "Content-Type: application/json" \ -d '{"portfolio_id": "mc_val_1", "question": "What are the main risk factors?"}'
The answer comes back as Markdown in answer_markdown, ready to render.
Every endpoint requires an API key. Pass it in one of three ways; the header is recommended.
| Method | Example |
|---|---|
| Header (recommended) | X-API-Key: janus_your_key_here |
| Bearer token | Authorization: Bearer janus_your_key_here |
| Query string | ?api_key=janus_your_key_here |
/analyst/analyzeA full narrative for one portfolio over a date range: performance against SPY and QQQ, current holdings and how the strategy behaved, written up by Janus.
| Field | Type | Description |
|---|---|---|
portfolio_idrequired | string | Portfolio ID, e.g. mc_val_1. |
start_daterequired | string | Start of the window, YYYY-MM-DD. |
end_daterequired | string | End of the window, YYYY-MM-DD. Must not be before start_date. |
curl -X POST https://ai.momentocapital.com/api/v1/analyst/analyze \ -H "X-API-Key: janus_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "portfolio_id": "mc_val_1", "start_date": "2025-01-01", "end_date": "2025-12-31" }'
import requests response = requests.post( "https://ai.momentocapital.com/api/v1/analyst/analyze", headers={"X-API-Key": "janus_your_key_here"}, json={ "portfolio_id": "mc_val_1", "start_date": "2025-01-01", "end_date": "2025-12-31", }, timeout=120, ) print(response.json()["analysis_markdown"])
const res = await fetch("https://ai.momentocapital.com/api/v1/analyst/analyze", { method: "POST", headers: { "X-API-Key": "janus_your_key_here", "Content-Type": "application/json", }, body: JSON.stringify({ portfolio_id: "mc_val_1", start_date: "2025-01-01", end_date: "2025-12-31", }), }); const { analysis_markdown } = await res.json();
{
"portfolio_id": "mc_val_1",
"start_date": "2025-01-01",
"end_date": "2025-12-31",
"analysis_markdown": "## Summary\n…",
"source": "ai"
}
source is "ai" when the narrative was written by the model,
or "fallback" when the model was unavailable and a standard template summary was returned instead.
/analyst/chat
Ask Janus anything about a portfolio's strategy and get an analyst-grade answer.
Choose the tone: quantitative for statistical detail, or
finance for investor-ready language.
| Field | Type | Description |
|---|---|---|
portfolio_idrequired | string | Portfolio ID. |
questionrequired | string | Your question, in plain language. |
analyst_profile | string | "quantitative" (default) or "finance". |
curl -X POST https://ai.momentocapital.com/api/v1/analyst/chat \ -H "X-API-Key: janus_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "portfolio_id": "mc_val_1", "question": "What are the main risk factors in this strategy?", "analyst_profile": "finance" }'
import requests response = requests.post( "https://ai.momentocapital.com/api/v1/analyst/chat", headers={"X-API-Key": "janus_your_key_here"}, json={ "portfolio_id": "mc_val_1", "question": "What are the main risk factors in this strategy?", "analyst_profile": "finance", }, timeout=120, ) print(response.json()["answer_markdown"])
const res = await fetch("https://ai.momentocapital.com/api/v1/analyst/chat", { method: "POST", headers: { "X-API-Key": "janus_your_key_here", "Content-Type": "application/json", }, body: JSON.stringify({ portfolio_id: "mc_val_1", question: "What are the main risk factors in this strategy?", analyst_profile: "finance", }), }); const { answer_markdown } = await res.json();
{
"portfolio_id": "mc_val_1",
"question": "What are the main risk factors in this strategy?",
"analyst_profile": "finance",
"answer_markdown": "**Concentration**: 41% of gross exposure in Information Technology…",
"source": "ai"
}
If the model is unavailable, source is "fallback" and the answer
only restates the strategy and your question. Retry after a moment.
/analyst/riskA risk profile for one portfolio over a date range (drawdown, volatility, VaR, CVaR, CAGR, Calmar and the shape of the return distribution) plus a narrative that puts the numbers in context.
| Field | Type | Description |
|---|---|---|
portfolio_idrequired | string | Portfolio ID. |
start_daterequired | string | Start of the window, YYYY-MM-DD. |
end_daterequired | string | End of the window, YYYY-MM-DD. |
curl -X POST https://ai.momentocapital.com/api/v1/analyst/risk \ -H "X-API-Key: janus_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "portfolio_id": "mc_val_1", "start_date": "2025-01-01", "end_date": "2025-12-31" }'
import requests response = requests.post( "https://ai.momentocapital.com/api/v1/analyst/risk", headers={"X-API-Key": "janus_your_key_here"}, json={ "portfolio_id": "mc_val_1", "start_date": "2025-01-01", "end_date": "2025-12-31", }, timeout=120, ) risk = response.json()["risk_metrics"]
const res = await fetch("https://ai.momentocapital.com/api/v1/analyst/risk", { method: "POST", headers: { "X-API-Key": "janus_your_key_here", "Content-Type": "application/json", }, body: JSON.stringify({ portfolio_id: "mc_val_1", start_date: "2025-01-01", end_date: "2025-12-31", }), }); const { risk_metrics, risk_narrative } = await res.json();
{
"portfolio_id": "mc_val_1",
"start_date": "2025-01-01",
"end_date": "2025-12-31",
"risk_metrics": {
"max_drawdown_pct": -10.42,
"volatility_ann_pct": 19.85,
"var_95_pct": 1.97,
"cvar_95_pct": -2.61,
"cagr_pct": 43.6,
"calmar_ratio": 4.18,
"skewness": -0.1842,
"kurtosis": 1.2207,
"n_observations": 251
},
"risk_narrative": "## Risk profile\n…",
"source": "ai"
}
| Field | Meaning |
|---|---|
max_drawdown_pct | Worst peak-to-trough fall in the window, in % (negative). |
volatility_ann_pct | Annualized volatility of daily returns, in %. |
var_95_pct | One-day Value at Risk at 95% (parametric), as a positive loss in %. |
cvar_95_pct | Average daily return on the worst 5% of days (historical expected shortfall), in % (negative). |
cagr_pct | Compound annual growth rate, in %. null for windows shorter than one year, which are not annualized. |
calmar_ratio | CAGR divided by the absolute max drawdown. null when CAGR is not available or there was no drawdown. |
skewness, kurtosis | Shape of the daily return distribution (kurtosis is excess kurtosis). |
n_observations | Number of daily values used. |
Errors return a JSON body with an error message. Authentication errors also include a code.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | — | A required field is missing, a date is not YYYY-MM-DD, or start_date is after end_date. |
| 401 | MISSING_API_KEY | No API key was sent. |
| 401 | INVALID_API_KEY | The key doesn't exist or has been revoked. |
| 404 | — | No data for that portfolio and date range. |
| 500 | — | Something failed on our side. Retry; if it persists, contact us. |
// 401 { "error": "Invalid or revoked API key.", "code": "INVALID_API_KEY" }
Responses that involve the AI model can take several seconds. Use a generous client timeout (60–120 s).
These tools are live in the Analytics console today and are on the way to the API.
Metrics, equity curves and year-by-year track records for several strategies at once.
Scenarios, volatility and market regime from past data, with a short AI read.
Rank every portfolio by Sharpe, return, drawdown or any other metric.
Want early access, or need something else? info@momentocapital.com