The question nobody answers
A headline Sharpe ratio cannot distinguish a trader with genuine entry timing from one who held through a favourable regime. Both produce the same number. Decomposing realized P&L across time partitions separates them.Two attribution modes, always both
realization
Attributes P&L to when the position closed. “When did the money land.”
exposure
Attributes P&L across the position’s life. “When was the risk held.”
Windows
- Partitions (
session,weekpart,hour_of_day) tile the span exactly once. - Overlay windows deliberately do not tile, so they may overlap.
Every label needs a permutation p-value
Three Hyperliquid facts that corrupt naive implementations
These were verified against live data and will affect anything else reading fills, not just this module.Funding is HOURLY, not every 8 hours
Funding is HOURLY, not every 8 hours
Verified against live
userFunding: all 24 hours present, minute == 0 on 233 of 233 events.The 8-hour cadence is Binance’s. Anything assuming three settlements a day is using a denominator 8× too small.Spot fills are labelled Buy/Sell, not Close Long/Close Short
Spot fills are labelled Buy/Sell, not Close Long/Close Short
The reducing leg on a spot fill still carries a populated
closedPnl.A dir.startswith('Close') filter silently drops them. On one live account that attributed 515,191 book.The correct rule: a non-zero closedPnl is realized P&L, whatever the leg is called.userFillsByTime and userFunding cap at 2,000 rows
userFillsByTime and userFunding cap at 2,000 rows
Oldest-first from
startTime, with no cursor and no error.Four active accounts all returned exactly 2,000; one covered 96 minutes of a 180-day request. You do not get an error or an empty result — you get a correct measurement of the wrong period.The module paginates: advance to last_ts + 1, dedupe on tid/time/hash/coin, with a 40-page cap.A fourth trap, from the same family: Hyperliquid sometimes reports an outer window’s
pnl as exactly 0.0 while an inner window is non-zero. Nested-window subtraction turns that into a phantom loss equal to minus the inner window. Treat an outer 0.0 as unreported, not flat.Cost and freshness
A live decomposition paginates fills and funding and runs 2,000 permutations per window — a nightly-cron cost, not a per-request one. Endpoints serve the published snapshot and shipage_s. Pass live=true on the MCP tool to force a re-run.
Access
Full specification:
docs/methodology/temporal-alpha-decomposition-v1.md.Scienter publishes impersonal market signals of general and regular circulation. Nothing here is investment, legal, or tax advice, or a recommendation to buy, sell, or hold any asset. Scienter is not a registered investment adviser or broker-dealer. Trading digital assets can result in the total loss of your funds — see Disclaimers for the full text.