Value foreign companies on their home listing and answer in the user's US line - #28
Merged
Merged
Conversation
…s US line
A foreign company's US line was valued against the S&P 500, which it barely
moves with. AstraZeneca's NYSE shares gave a beta of 0.50 (the floor) against
0.96 for its London shares. With the same risk-free rate, premium, cost of debt
and tax, the model published a $159.47 fair value on one line and withheld a
$106.61 one on the other.
A US line of a non-US company (AZN, SHEL, HSBC, BABA, TM, TSM, ...) is now
valued on its home listing, and the answer is stated back per US share in
dollars. A company the user names, rather than types, is answered in its
US-exchange line when it has one.
- src/listing_view.py (new):
- home_line_for decides the move. It requires the same issuer on its home
exchange, not OTC and not a receipt, a quote unit the scraper reads, a
receipt ratio from Yahoo's share counts, a US price within 25% of the home
price times the ratio, and an exchange rate the scraper can convert with.
- us_line_for finds the US line of a named company.
- build_view, view_figures and lead_paragraph produce the per-US-share
figures, including the Street's mean target, and the answer's opening.
- The templates open in the user's line.
- The guard:
- Where per-home-share figures differ from per-US-share ones (a London
Shell share is half an NYSE share), only the per-US-share figures count as
published.
- Withheld figures are matched as whole numbers.
- The Street block names the share its targets are for.
- Result cards, price evidence and follow-up report lookups use the user's
line.
Fixed while validating (each reproduced on live data):
- UL was valued as Hindustan Unilever. One-word names must now match exactly,
and a candidate's domicile must match the issuer's.
- SPOT was valued on a Frankfurt line that trades 430 shares a day, against
the DAX. The currency swap now needs the home market or a line traded at
scale, so Stellantis keeps Milan.
- The withheld and published templates labelled figures with the listing's
currency. AstraZeneca's dollar range printed as pounds, and Alibaba's yuan
figures as dollars ("$729.76" for a $108.76 stock).
- Alibaba's Hong Kong line was invisible to the search, because its short name
is "BABA-W". Hong Kong now counts as home for issuers domiciled in China.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A company that reports to the SEC as a US company (Form 10-K) trades mainly in the US. Examples: Yum China (Delaware, NYSE, with a secondary Hong Kong listing), Waste Connections and Shopify (both also listed in Toronto). These companies are no longer moved to a home listing. When a named one resolves to its foreign line, it is valued on the US line instead. Trading volume could not tell them from a foreign company with a busy ADR: Infosys's NYSE line trades 1.8x its Mumbai line, Yum China's 1.9x Hong Kong's. Yahoo does not mark receipts. The SEC's filer status does (10-K versus 20-F or 40-F); src/sec_filer.py reads it from the SEC's public ticker table and each company's filings, cached on disk. The reference-data User-Agent named vynn.ai, another company's domain; it now names vynnai.com. 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.
Why
A foreign company's US line was valued against the S&P 500, which it barely moves with. AstraZeneca's NYSE shares gave a beta of 0.50 (the floor) against 0.96 for its London shares. With the same risk-free rate, premium, cost of debt and tax, the model published a $159.47 fair value on one line and withheld a $106.61 one on the other. Answers were also given in whichever listing the valuation happened to run on, often in pounds, pence or yen, for a user who asked about a US ticker.
What changes
Value on the home listing. A US line of a non-US company moves to its home listing (AZN → AZN.L, TM → 7203.T, BABA → 9988.HK, SHEL → SHEL.L, …) only when all of these hold:
Answer in the user's listing. The answer opens in the US line, with ticker, exchange, dollar price, ratio, exchange rate, VYNN's figures per US share and the Street's mean target per US share. For example:
The same view covers named companies with an exchange-listed US line: Toyota → TM, Shell → SHEL. A home ticker the user typed (7203.T) is answered as typed.
The guard. Where per-home-share figures differ from per-US-share ones (a London Shell share is half a SHEL share), only the per-US-share figures count as published. Withheld figures are matched as whole numbers. The Street block is labelled with its share basis.
Cards, price evidence and follow-up reports use the user's line. A follow-up
read_reportfinds a report filed under the home listing.Production bugs fixed along the way (each reproduced on live data)
Resolver fixes behind these:
Behaviour changes to know
Validation
US filers stay on their US line (second commit)
As you asked, a company whose main market is the US is valued and answered entirely on its US line. "Main market" is the SEC's filer status, read by
src/sec_filer.py(public files, cached on disk):Why the SEC and not trading volume: Infosys's NYSE ADR trades 1.8× its Mumbai line and Yum China's NYSE line 1.9× Hong Kong's. Yahoo reports dollar accounts on both lines for both, and marks no receipts, so nothing else separated them.
gate25 (8 questions, production vs candidate), canary PASS:
Other outcomes:
The SEC answers without a contact email today, but its fair-access policy asks for one in the User-Agent. The reference-data User-Agent also named vynn.ai (another company's domain); it now names vynnai.com.
Tests: 1,682 pass; the 5 new mutations are caught.
Ready to merge.
🤖 Generated with Claude Code