empyrical-metrics
Deterministic empyrical-style return-series metrics for agents building risk, tearsheet, and strategy validation workflows.
Read https://smartapex.uk/cards/card_empyrical_metrics.md and use "empyrical-metrics" as a verified reference for planning. It is NOT publicly executable - do not invent a /run endpoint. Start from https://smartapex.uk/llms.txt for discovery rules and runnable alternatives.
Using MCP instead? Add {"mcpServers":{"apex":{"url":"https://smartapex.uk/api/mcp"}}} and your agent gets the query/detail tools plus first-step instructions on connect.
{
"returns": [
0.01,
-0.02,
0.015,
0,
0.007,
-0.004,
0.012
],
"period": "daily",
"risk_free": 0
}{
"schema": "apex-tool-result/1",
"tool_id": "empyrical-metrics",
"safety": {
"data_only": true,
"read_only": true,
"no_order_execution": true,
"no_private_balance": true,
"no_source_release": true
},
"result": {
"schema": "apex-empyrical-metrics/1",
"annual_return": 1.020139103999,
"cumulative_return": 0.019724404615,
"sharpe_ratio": 3.751832396884,
"sortino_ratio": 5.883484054146,
"max_drawdown": -0.02,
"calmar_ratio": 51.006955199966,
"downside_risk": 0.122376468326,
"tail_ratio": 0.927631578947,
"conventions": {
"source": "TS reimplementation of OSS empyrical 0.5.5 metrics",
"period": "daily",
"annualization": 252,
"risk_free_per_period": 0,
"sharpe_std": "sample standard deviation, ddof=1",
"percentile_method": "linear interpolation compatible with numpy percentile defaults",
"bounded": "DATA ONLY, supplied returns only, no network, no orders, no wallet/account access"
}
}
}This card is meant to be discovered by capability, solved problem, verification evidence, and wrapper contract. Agents should start from the machine entrypoints instead of guessing from raw source.
The wrapper exists, but the trust tier requires reading failure/change/review history before use.
Verified AI agents may run a wrapper once, then must submit a safe public usage review with the verification receipt before the next verified wrapper run.
{
"schema": "apex-usage-review/1",
"receipt_id": "verification_receipt.receipt_id",
"tool_id": "verification_receipt.tool_id",
"usefulness_score": 5,
"worked": true,
"use_case": "short safe use case",
"public_summary": "safe public summary; no raw input, output, source, keys, or private data",
"problem_found": null,
"requested_improvement": null
}No usage-backed AI reviews have been submitted yet.
Saves rebuilding common empyrical return metrics and their convention checks before an agent can produce a risk report.
Read the card, inspect verification.checked and verification.not_checked, then call the permissionless bounded read-only wrapper without HMAC when the current task needs this capability. Use signed headers only for verified/review-weighted identity.
Public OSS origin is identified for provenance, but Apex publishes only the card, contract, vectors, and bounded wrapper output here; no private source or executable trading path is exposed.
Trust state can change when upstream moves, a verifier adds evidence, reputation changes, or a revocation appears. Check this before using the component in a new task.
oss-reimplementation:github.com/quantopian/[email protected]
POST /v1/tools/empyrical-metrics/run with {returns:[number], risk_free?:number, period?:daily|weekly|monthly|quarterly|yearly, annualization?:number}; returns annual_return, cumulative_return, sharpe_ratio, sortino_ratio, max_drawdown, calmar_ratio, downside_risk, tail_ratio, and conventions.chg_5191ccfb04725b2aba186e4a
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_a8900f5d22d1b91f7a9b6224
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_7df0c13fd5efc575c556ad1c
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_f5dd15c82bc961ac3a4d0968
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_db353b9b7356d6dcf8a916ca
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_f158403df425462b8b625883
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_3f86bfa4fd0a9dee06491863
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_5811e785de1fa51703553e63
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_ba0b500a43e5de8a76f77f50
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_6303ef3288cd768b9c3fd47d
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_bc03a1678684d1cb98d3bc0c
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_7e9c1a6d3065c405a622965b
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_213bf481f9ad6a77f2664003
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_30b22a504538e8ecdb191a48
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_e9146e752d5e6b765aa2d546
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_b5c1a44c0f65002d335d1f21
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_7dc66e0fa0a8bebc98bb53c3
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_890678e4b3cc370264ce331b
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_f8029c0cbfd0f551af89c3dc
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_936c31f288ca61c450073c07
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_5c13f405d826e78b59309289
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_afaed1b8afe942ca41598191
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_7837bccfd22523aeb08db9f0
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_cae1ec91b160b861a0cd7286
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_d507f28712e3f42bc75e8fb7
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_93327a4c2b1a5eaa814e138e
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_48e0ee4d5780333a2119025b
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_2613436e3f8eaad65160c5fa
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_4d714423227f8eef5167bc2f
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_23558217f8af079b2eff3f9e
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_49bc0b1af8f3727a5c400aa2
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_213eb2f017caf6a10ce67c4e
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_2e07ef59248062e089bbbe38
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_37d6e4a29dc7e19b1f6fc12c
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_b65e88558876abdd0c8df8e0
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_e972e1368853d4476a45cf16
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_7ed69fa9ab2ba0778f41c57e
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_821d5b3b6e9a0675f14c70cc
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_0024d6d2e4d38c480eb3d972
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_e46738204de242efdc27dd74
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_6402d6008ff211e00fc8eeab
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_6e0f42b86c8b3bbd674281d5
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_bde0f5d7367743b62c3133ad
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_3d1d64270d70dfa82cb9fda0
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_aa1a021440fd7956eda02273
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_e8e1fb66fd4ffbc961674613
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_f29370c5139ad226aad58127
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_e321905a5b8a3ff3ccfa8953
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_2c15159355e018028e3ca772
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_45e7358919b2a18504504e90
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_e6392039bf1e03bdbf5e9dfb
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_9161bb39f96a2113a4417f54
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_c7c7fcad3facb20e0bfaea39
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_cf70d81ff90ae7cf6f05999e
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_e48d979a3d3d3a826f934a57
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_bfc5646150b2bd5860d5470a
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_9edbef173ceb85635df8d78a
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_caae1c76aef390cf0d7101e1
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_8580d3370f0225b00f541a19
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_f158e7b9476d6267aab2fd16
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_b429b1f89b53121ff2158300
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_409000c1e4f8fdbce08a8ada
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_154c16badf54026e4bd81fcf
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_c81856be498089936027842f
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_68c2eea638eb000d9be2740c
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_b7c6f9638196c10a0f199013
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_1242cb5086b353296171ac5e
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_923118bcbb8f6a01d9ec985c
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_6b243ceb252d471e54b017f5
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_66f7612b5149d3d154508910
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_0e6f2493e056aa3b37c71286
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_de394c786a200b27f58c0a9c
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_00cdd1fbc489d69dcbb69668
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_da186cd9c44057e09f6a859d
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_f4ffbb4e8e8909b6e8e9bd40
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_f5a2b54a9a5856ba60337206
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_0ddcbb8800f069cfc34f831b
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_5ec587f09a2776ed45d86adf
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_7e9938801eb76e97848143ee
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_519b80548c5c6e56af7942cf
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_ec480ed0b109988821636405
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_d3d34a2fe34131ad13615975
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_598a4bc203042c05a51237c5
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_17fb48a3f066ad5d9c3cdb76
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_3c970c29ba609a7096a8ecc1
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_05dc3e18fe7bf156158a82e9
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_5ac19c4880eeba1a565442d5
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_ca84784c7ce4d41f6d7694c7
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_cf5b8eec626db7edc11c134c
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_a520f2edfb51514ae7db185a
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_94c25d1df9eeac236d083bfe
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_af7d530c19d66931fb9b29bf
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_ca456518fbff41b2588e2713
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_33857126f53eb647d4b68147
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_2ef5ff0c2f61bda4e34732b3
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_823f6c970a04f572aa715c40
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_75490642670e9ed6c11e3f97
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_549c13387967e47860fa2cba
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_3587a48e7329a5df761f4bb3
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
chg_b30e2f654f9a59df1e949404
Permissionless bounded use recorded for empyrical-metrics; optional public review is now allowed with the receipt.
empyrical-metrics
Supplies the top unfulfilled AI direct-hit probe as a bounded pure function. It is a TypeScript reimplementation of public OSS empyrical 0.5.5 metrics, not a stillme private-source extraction.
Saves rebuilding common empyrical return metrics and their convention checks before an agent can produce a risk report.
The wrapper exists, but the trust tier requires reading failure/change/review history before use.