Repository navigation
feat(leaderboard): daily Sharpe with its 95% interval - #704
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oard Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rval Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The boards call daily_sharpe_interval on their GET path. Skip non-mapping points, out-of-range timestamps, NaT and ints past float range instead of raising, and log ERROR when a non-empty curve yields no usable close or the seed is not a positive number, so a broken curve does not pass for "pending" or "no variation". Pin the baseline side of the Live reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both boards sorted on sharpe_ratio alone, so a row showing "—" (an old payload's hourly number, or an ok row missing a bound) sorted by a hidden value. Sort keys now follow the formatter. Both formatters also stop printing "-0.00" and stop inventing "Based on 0 trading days" when the payload omits sharpe_days. Escape num_trades and snapshot_end in the Live detail pane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sink A board run off the published capital must give the same daily Sharpe once rescaled (fails if the reader takes the unscaled curve). Hold the two board formatters together on off-type payload values, and pin each Sharpe interpolation inside escapeHtml/homeEscape by source, since no fixture can show a missing escape while the formatters emit only numbers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A Live row whose stored final value is NULL renders "—" in every cell, but its Sharpe cell and detail still carried the "Based on N trading days" tooltip and sorted by the hidden figure. Gate both on the row having prints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both boards compute daily Sharpe per request, so one unreadable curve or seed logged the same ERROR on every page load. Log each distinct break once per process (bounded set), as live.py's _warned_live_config does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ender helper Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Live: a stored curve with no point on the month axis is pending with an ERROR (live.curve_unplottable, once per process), not a ranked flat line whose Sharpe reads "Returns never moved". - Live: a row with no recorded seed is not rescaled, so E_0 is its own first mark, not display_capital (a $10k run read about -90% on day 1). - A bad seed is status "undefined", logged from the first close rather than behind "Needs 5 trading days"; an account at or below 0 and overflow are "undefined" too, not "no_variation". - liveFormatSharpe delegates to formatBoardSharpe; both boards sort through one boardSharpeValue predicate (no string building per comparison). - Home rank row carries the interval in visually hidden text in the cell. - CLAUDE.md: the Live GET rule names what it forbids, not "compute". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FlyM1ss
marked this pull request as ready for review
October 31, 2026 02:40
computedocean
pushed a commit
to computedocean/AgenticTrading
that referenced
this pull request
Oct 31, 2026
Open-Finance-Lab#704 and Open-Finance-Lab#705 each fit under the ceiling against their own base; merged together they put main at 40,004. Drop one redundant word (39,994). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE until the owner has approved the landing copy (
docs/superpowers/plans/2026-10-14-live-board-fixes-p7-records.md, Task 7.3 Step 0) and the copy PR (feat(live): Live Leaderboard copy and catching-up badge) and the landing PR (feat(landing): Live Leaderboard copy and Sharpe interval) can merge the same week. From this deploy until the landing PR merges,/shows the new daily Sharpe under its old "annualized from hourly results" tooltip, with no interval.Do not merge from 22:15 UTC on a weekday until that night's live refresh has finished (the check is in
docs/superpowers/plans/2026-10-14-live-board-fixes.md, Merging and records). GitHub starts the 22:30 UTC cron as late as 03:05 UTC, and the refresh keeps running on Render after the workflow run ends. The merge auto-deploys prod, and the restart kills a running refresh, so the sessions it had not checkpointed are billed again on the next night.Math.sqrt/stdevout of the board JS.run.get("sharpe_ratio") or 0is gone).sharpe_ci_low,sharpe_ci_high,sharpe_days,sharpe_status(ok|insufficient_days|no_variation|undefined|pending); basis block atlive_status.sharpe(Live) andsharpe_basis(Competition).calc_metricsand the storedagent_runs.sharpe_ratioare unchanged, so run-level APIs still show the hourly figure until the engine rewrite.-0.00; no invented "Based on 0 trading days"; Live detail escapesnum_trades/snapshot_end.live.curve_unplottable, once per process), not a ranked flat line reading "Returns never moved". A Live row with no recorded seed takesE_0from its own first mark (it is not rescaled), notdisplay_capital(day 1 read about -90% for a $10k run). A bad seed is its own status,undefined("Cannot be computed"), logged from the first close instead of hiding behind "Needs 5 trading days"; so is an account at or below 0 and overflow.liveFormatSharpedelegates toformatBoardSharpe(one wording, no parity copy) and both boards sort through oneboardSharpeValuepredicate. The home rank row's interval is also in visually hidden text inside the cell. CLAUDE.md's Live-GET rule now says what it forbids (fetch, run recompute, deploy, scheduled refresh), not "compute".Review notes for the owner
undefinedreads "Cannot be computed" on both boards (it used to share "Returns never moved").calc_metrics/agent_runs.sharpe_ratiostay hourly, so the run APIs,/api/v2/leaderboard, Discord and the SDK publish a second Sharpe under the same name until the engine rewrite (themetrics.pyP19 block says so; moving the stored column here would redefine every user's run metric); a median-of-repeats row's interval is that one run's day-to-day noise (plan review focus 6); home sample rows show—(focus 7). P19 counts every session in the window, so a session with no print is a 0% day (pinned bytest_live_sessions_before_the_first_print_count_as_idle_days).titleand screen-reader text carry it): a visible sub-line needs a row-height change instyles.css, off-limits here and unverifiable without a browser./is the landing PR's change.styles.cssis off-limits in this PR.Test plan
pytest dashboard/backend/tests -q -p no:cacheproviderlocally: 7583 passed, 190 skipped, 25 xfailed on 766984d; the 12 failures are the known local-only ones (test_report_pdf.pyx7, no reportlab;test_robinhood_mcp_transport.pyx5, mcp 1.28.1 vs pin 1.30.0).git status --shortempty afterwards (seed DB untouched).gh pr ready.js/live-leaderboard.jsmain=6 / branch=7,js/leaderboard.jsmain=38 / branch=39,home-page.jsmain=55 / branch=56. If main moved, rebase and bump again (and thetest_frontend_fast_boot.pypins for the last two).User-facing docs this makes stale
Not edited here (owner batches these):
dashboard/landing/src/components/home/BoardPreview.tsx:649: "annualized from hourly results" tooltip; and the same string in the built bundledashboard/frontend/assets/index-Dpn97z5M.js.dashboard/landing/src/lib/leaderboard.ts:20-25,:159-169: comments citingrun.get("sharpe_ratio") or 0, which this PR removes.dashboard/landing/src/components/home/Race.tsx:139: Sharpe column note.docs/landing-narrative-copy.md:55,:65: "Sharpe" with no basis.docs/source/lab/agent_api.rst:48:GET /api/v2/leaderboardkeeps the stored hourly Sharpe, so after this PR it disagrees with the Competition and Live boards. Not wrong, but the bases differ.🤖 Generated with Claude Code