Standard RSI, listing-currency financials, and published figures in analyses - #26
Merged
Merged
Conversation
…nalyses
Three problems found in the 2026-09-28 answers.
RSI. get_technicals averaged the last 14 gains and losses (Cutler's RSI),
not Wilder's smoothed RSI(14) that every broker shows. Realty Income read
4.8 after three weeks of falling closes; the standard figure is 17.4.
NVDA read 44 (55) and TSLA 64 (55). wilder_rsi seeds with the simple mean
of the first 14 moves and smooths after that; it reproduces the
StockCharts ChartSchool worked example exactly. An RSI of 0 now keeps its
finding card (the check was truthiness).
Currency. get_financials returned a cross-listing's price in the currency
the company reports in and its market cap, which is in the listing's
currency, under that same label: Shell's London line came out as
"current_price 47.80 USD" beside get_prices' 3,611 GBp, and a market cap of
206 billion labelled USD that is in pounds ($272.7 billion). Answers said
"a market capitalization of about USD 207 billion". listing_figures returns
the price and market cap in the listing's currency and offers the
reporting-currency conversions only when the scraper had an exchange
rate (without one it leaves them unconverted). A ticker the user typed
is resolved as typed ("shel" is NYSE SHEL); the preference for a home
listing stays for a company the user names.
Published figures. For a published rating, the analysis check refused a
section that named the model's own DCF values, so MSFT sometimes
answered with the fixed statement alone. The guard records the published
view (rating, fair value, DCF legs, target, upside); the deterministic
check masks exactly those before looking for claims, and the yes/no check
is told them. A different rating, another figure or a valuation verdict
still counts. The figure pattern also stopped missing a decimal followed
by a comma ("a fair value of 180.50, per the report" was not a claim).
Verified: 1593 tests; 7 mutations each caught; production vs candidate on
real questions: Realty Income's RSI 4.8 -> 17; "should i buy Shell?"
market cap "USD 207" -> "£208 billion"; "shel" resolved as typed; MSFT
kept its analysis where production fell back; XOM and news unchanged;
valuation canary PASS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Three problems found in the 2026-09-28 answers, each verified on real data before fixing.
RSI was not the RSI brokers show
get_technicalsaveraged the last 14 gains and losses (Cutler's RSI). Brokers show Wilder's smoothed RSI(14).wilder_rsireproduces the StockCharts ChartSchool worked example exactly: all 19 values.Cross-listings mislabelled their price and market cap
For Shell's London line,
get_financialsreturned:get_prices' 3,611 GBp;As a result, answers said "a market capitalization of about USD 207 billion".
The fix,
listing_figures:A ticker the user types is now resolved as typed: "shel" is NYSE SHEL. The home-listing preference stays for a company the user names.
Published ratings lost their analysis
For a published rating, the yes/no check refused sections that named the model's own DCF values. MSFT sometimes answered with the fixed statement alone.
The fix:
Also fixed: the figure pattern missed a decimal followed by a comma. "a fair value of 180.50, per the report" was not treated as a claim.
Verification
🤖 Generated with Claude Code