Skip to content
SimicX

Portfolio · Endpoint

P&L attribution

Daily per-symbol profit and loss attribution, with net_pnl of the three signed columns.

GET/v1/alphas/{alpha}/pnl

Parameters

Path parameters

NameTypeRequiredDefaultDescription
alphastringrequiredalpha_id (e.g. CausalHaarActivityDisplacement_0de63b8678a2_sp500pit_weekly_20260730t000858z_f358d1480d42). Use the value returned by GET /v1/alphas.

Query parameters

NameTypeRequiredDefaultDescription
bookstringoptionallong_shortOne of the books listed by /books — long_short and long_only, plus their raw_ twins for keys with raw-book access. A book the key may not see is rejected exactly like one that does not exist.
fromYYYY-MM-DDoptionalwindow startFirst trading day, inclusive.
toYYYY-MM-DDoptionalwindow endLast trading day, inclusive.
symbolstringoptionalRestrict to one ticker.
limitinteger 1–5000optional100Rows per page. Below 1 or above 5000 is a 400 bad_request naming the parameter and the constraint it broke.
offsetintegeroptional0Rows to skip; pagination.has_more is false at the end.

Example request

curl

curl -H "Authorization: Bearer sxk_live_4f9c…" \
  "https://api.simicx.com/v1/alphas/CausalHaarActivityDisplacement_0de63b8678a2_sp500pit_weekly_20260730t000858z_f358d1480d42/pnl?book=long_short&from=2026-06-22&to=2026-06-26&symbol=AAPL"

Try it

Execute GET /v1/alphas/{alpha}/pnl against the live API using your key. Paste a key below to send without signing in, or sign in to auto-fill from your profile — either way, the call counts towards your rate limits. Whether the route answers depends on your key's endpoint allow-list — /v1/me lists what is in force; a new key starts with only the self-service routes until an administrator grants more.

Sent server-side via a same-origin proxy; only the documented host(s) are allowed.

Paste an API key above to list alphas your key may access.

Request

GEThttps://api.simicx.com/v1/alphas/{alpha}/pnl?book=long_short&limit=100&offset=0

Example response

JSON · synthetic values, real schema

{
  "data": [
    {
      "book": "long_short",
      "date": "2026-06-26",
      "symbol": "AAPL",
      "market_pnl": 1204.55,
      "execution_cost": -31.20,
      "borrow_cashflow": 0.0,
      "net_pnl": 1173.35
    }
  ],
  "pagination": { "limit": 100, "offset": 0, "returned": 1, "total": 5, "has_more": true },
  "meta": { "run": "CausalHaarActivityDisplacement_0de63b8678a2_sp500pit_weekly_20260730t000858z_f358d1480d42", "alpha_id": "CausalHaarActivityDisplacement_0de63b8678a2_sp500pit_weekly_20260730t000858z_f358d1480d42", "source_alpha_id": "causal_haar_activity_displacement_reversal_b3874c9db78d", "book": "long_short" }
}

Response fields

Every field the response can carry, what it means, and how it is computed.

  • bookdatesymbolstring

    The attribution coordinates.

    How it is computed

    One row per name with a position or a fill that day.

  • market_pnlbase currency

    That name's mark-to-market P&L.

    How it is computed

    quantity × (close − previous close), signed.

  • execution_costbase currency (≤ 0)

    Fees and impact of that name's fills — already negative where they reduce P&L.

    How it is computed

    Per-fill costs from the cost model. Never positive in the sealed corpus.

  • borrow_cashflowbase currency (≤ 0)

    Borrow accrual on the short, if any — already negative where it reduces P&L.

    How it is computed

    Borrow rate × short notional; 0 for longs.

  • net_pnlbase currency

    The row's net contribution: the sum of the three columns.

    How it is computed

    market_pnl + execution_cost + borrow_cashflow. Sum, never subtract — the cost columns are already signed. Session Σ net_pnl equals that session's ending_equity − starting_equity on /equity-curve.

  • pagination.limitoffsetinteger

    The page window applied.

    How it is computed

    Echoes the request parameters (or their defaults — 100 rows, 500 on /equity-curve).

  • pagination.returnedinteger

    Rows in this page.

    How it is computed

    data.length — below limit on the last page.

  • pagination.totalinteger

    Rows matching the query across all pages.

    How it is computed

    Server-side count before paging.

  • pagination.has_moreboolean

    Whether another page exists.

    How it is computed

    offset + returned < total — false on the last page; stop paging there.

  • meta.runstring

    The alpha that served the response.

    How it is computed

    Echoes the resolved alpha_id. Retain for reproducible analysis.

  • meta.alpha_idstring

    Source label associated with the alpha, when present.

    How it is computed

    Informational; address data endpoints with alpha_id / meta.run.

  • The sign convention is the whole of it: execution_cost and borrow_cashflow are already negative, so net_pnl is their sum with market_pnl — never market_pnl minus the other two.
  • Per-symbol rows sum to the book row in /portfolio for the same day: Σ market_pnl, Σ execution_cost, Σ borrow_cashflow.