gloomberb 0.20.6 → 0.20.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/api-client/fund-facts.ts +20 -4
- package/src/api-client/socket.ts +4 -4
- package/src/architecture/shortcut-labels-allowlist.json +1 -0
- package/src/cli/commands/market.ts +33 -17
- package/src/cli/commands/search.ts +19 -3
- package/src/cli/desktop-pane-shot.ts +61 -0
- package/src/cli/pane-functions/dom.ts +4 -4
- package/src/cli/pane-functions/freshness.ts +38 -5
- package/src/cli/pane-functions/screenshot-assessment.ts +16 -4
- package/src/cli/quote-answer.ts +57 -1
- package/src/cli/result.ts +17 -0
- package/src/docs/snapshot.json +55 -16
- package/src/i18n/es.ts +2 -0
- package/src/i18n/ja.ts +2 -0
- package/src/i18n/ko.ts +2 -0
- package/src/i18n/zh-cn.ts +2 -0
- package/src/i18n/zh-tw.ts +2 -0
- package/src/market-data/market/change-basis.ts +49 -8
- package/src/market-data/market/dated-previous-close.ts +133 -10
- package/src/market-data/market/freshness.ts +18 -6
- package/src/market-data/market/status.ts +9 -1
- package/src/market-data/published-nse-sessions.ts +16 -1
- package/src/market-data/quotes/freshness.ts +15 -0
- package/src/plugins/builtin/alerts/alert-engine.ts +15 -0
- package/src/plugins/builtin/alerts/cli.ts +22 -9
- package/src/plugins/builtin/alerts/headless.ts +1 -1
- package/src/plugins/builtin/alerts/index.tsx +5 -1
- package/src/plugins/builtin/alerts/metric-command.ts +1 -1
- package/src/plugins/builtin/holders/fund-holders.ts +22 -1
- package/src/plugins/builtin/holders/headless.ts +5 -4
- package/src/plugins/builtin/holders/pane.tsx +7 -3
- package/src/plugins/builtin/holders/report-header.ts +23 -0
- package/src/plugins/builtin/members/client.ts +1 -1
- package/src/plugins/builtin/members/headless.ts +2 -0
- package/src/plugins/builtin/members/model.ts +10 -8
- package/src/plugins/builtin/members/pane.tsx +4 -1
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +5 -2
- package/src/plugins/builtin/portfolio-list/cli/render.ts +66 -23
- package/src/plugins/builtin/portfolio-list/headless.ts +2 -1
- package/src/plugins/builtin/portfolio-list/income.ts +46 -22
- package/src/plugins/builtin/portfolio-list/pane/data.ts +16 -6
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +5 -4
- package/src/plugins/builtin/portfolio-list/use-throttled-ticker-order.ts +40 -3
- package/src/plugins/builtin/sec/fund-facts.ts +25 -5
- package/src/plugins/builtin/shared/report-freshness.ts +15 -6
- package/src/plugins/builtin/supply-chain/model.ts +18 -6
- package/src/portfolio/column-values.ts +3 -0
- package/src/portfolio/valuation-basis.ts +23 -1
- package/src/state/hooks/quote-streaming.ts +14 -6
- package/src/tickers/instrument-kind.ts +22 -1
- package/src/tickers/search/index.ts +5 -0
- package/src/tickers/terminal-codes.ts +17 -5
- package/src/time-series/fundamentals/current-valuation.ts +244 -0
- package/src/time-series/fundamentals/historical-valuation.ts +99 -0
- package/src/time-series/fundamentals/metric-ids.ts +61 -0
- package/src/time-series/fundamentals/period-points.ts +104 -0
- package/src/time-series/fundamentals/quarterly-ttm.ts +220 -0
- package/src/time-series/fundamentals/series.ts +164 -0
- package/src/time-series/fundamentals/source-statements.ts +177 -0
- package/src/time-series/fundamentals/statement-fields.ts +154 -0
- package/src/time-series/fundamentals/statement-merge.ts +124 -0
- package/src/time-series/fundamentals/statement.ts +114 -0
- package/src/time-series/fundamentals/valuation-multiples.ts +50 -0
- package/src/time-series/fundamentals.ts +18 -1407
- package/src/types/financials.ts +9 -0
- package/src/utils/debug-log.ts +29 -0
package/src/cli/result.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
type CliTableColumn,
|
|
15
15
|
} from "../utils/cli-output";
|
|
16
16
|
import { serializeCsv } from "../utils/csv";
|
|
17
|
+
import { logFailure } from "../utils/log-failure";
|
|
17
18
|
import { formatUtcTime, isEpochMilliseconds, isZonedIsoDateTime } from "../utils/utc-time";
|
|
18
19
|
import { formatFreshnessLine, withSavedCopy, type ReportFreshness } from "./pane-functions/freshness";
|
|
19
20
|
import { withSearchHints, type FredSeriesCheck } from "./not-a-ticker";
|
|
@@ -648,6 +649,22 @@ export function cliOutputWritten(): Promise<void> {
|
|
|
648
649
|
return stdoutWritten;
|
|
649
650
|
}
|
|
650
651
|
|
|
652
|
+
/** How long a command whose report is out waits for reads it stopped waiting for before it exits without them. */
|
|
653
|
+
const LEFT_BEHIND_EXIT_MS = 500;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* For a command whose report is out while reads it gave up on are not
|
|
657
|
+
* (dividends past their deadline): exits once the output has left the
|
|
658
|
+
* process, not when the last of them answers or times out, which held a
|
|
659
|
+
* cold `portfolio show` open for fifteen seconds after it printed. Unref'd,
|
|
660
|
+
* so a process with nothing left exits first, with its own code.
|
|
661
|
+
*/
|
|
662
|
+
export function exitLeavingReadsBehind(): void {
|
|
663
|
+
setTimeout(() => {
|
|
664
|
+
cliOutputWritten().then(() => process.exit()).catch(logFailure("cli.result", "Exit after the report failed"));
|
|
665
|
+
}, LEFT_BEHIND_EXIT_MS).unref();
|
|
666
|
+
}
|
|
667
|
+
|
|
651
668
|
export function printCliResult<T, Row extends Record<string, unknown> = Record<string, unknown>>(
|
|
652
669
|
result: CliResult<T>,
|
|
653
670
|
options: CliGlobalOptions,
|
package/src/docs/snapshot.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": 1,
|
|
3
3
|
"site": "https://gloom.sh",
|
|
4
|
-
"updatedAt": "2026-11-
|
|
4
|
+
"updatedAt": "2026-11-08",
|
|
5
5
|
"categories": [
|
|
6
6
|
{
|
|
7
7
|
"id": "research",
|
|
@@ -1776,7 +1776,7 @@
|
|
|
1776
1776
|
"desktop",
|
|
1777
1777
|
"tui"
|
|
1778
1778
|
],
|
|
1779
|
-
"updatedAt": "2026-11-
|
|
1779
|
+
"updatedAt": "2026-11-08",
|
|
1780
1780
|
"blocks": [
|
|
1781
1781
|
{
|
|
1782
1782
|
"type": "heading",
|
|
@@ -1853,7 +1853,9 @@
|
|
|
1853
1853
|
"**Terminal:** the installer adds `gloom` to your PATH, so open a new terminal window. PowerShell works.",
|
|
1854
1854
|
"**PowerShell line:** installs `gloom.exe` from the latest release into `%USERPROFILE%\\.local\\bin`, checks its SHA-256 and adds the folder to your PATH, with no admin rights. Under Git Bash the bash line points here. With [Bun](https://bun.sh), `bun install -g @gloom-sh/terminal` works too.",
|
|
1855
1855
|
"**Charts:** Windows Terminal has no Kitty graphics, so terminal charts draw as text. The desktop app draws them in full.",
|
|
1856
|
+
"**cmd.exe:** run `chcp 65001` so long dashes, `€` and `·` show, and quote an index symbol (`gloom quote \"^SPX\"`): cmd drops a bare `^`. See [CLI](/docs/cli-functions).",
|
|
1856
1857
|
"**Data:** `%USERPROFILE%\\.gloomberb`, printed by `gloom version`. `GLOOMBERB_HOME` moves it.",
|
|
1858
|
+
"**Exports:** save an export with `--output` (`gloom fn RV NVDA,AMD,ASML:AMS --csv --output rv.csv`), which writes UTF-8 without a byte-order mark; a `>` redirect in Windows PowerShell 5.1 writes UTF-16. See [CLI](/docs/cli-functions).",
|
|
1857
1859
|
"**Git and Bun:** Bun ships with the app; Git does not. Some official plugins (TV, Substack, Interactive Brokers, IBKR Gateway, Public, Robinhood, SimpleFIN, Polls, Prediction Markets, BYOK AI) install from GitHub and need [Git for Windows](https://git-scm.com/download/win). Without it Gloom starts without them, says so, and `gloom doctor` names them.",
|
|
1858
1860
|
"**Versions:** Windows 11 x64 is tested. ARM PCs run the x64 build through Windows' emulation: the desktop app is checked to open and stay open on Windows 11 on Arm, nothing more. Windows 10 is untested."
|
|
1859
1861
|
]
|
|
@@ -5655,7 +5657,7 @@
|
|
|
5655
5657
|
"functions",
|
|
5656
5658
|
"screenshots"
|
|
5657
5659
|
],
|
|
5658
|
-
"updatedAt": "2026-11-
|
|
5660
|
+
"updatedAt": "2026-11-08",
|
|
5659
5661
|
"blocks": [
|
|
5660
5662
|
{
|
|
5661
5663
|
"type": "paragraph",
|
|
@@ -5680,6 +5682,10 @@
|
|
|
5680
5682
|
"`--json`, `--csv`, `--ndjson`",
|
|
5681
5683
|
"Machine-readable output. `--json` is the richest."
|
|
5682
5684
|
],
|
|
5685
|
+
[
|
|
5686
|
+
"`--output file`, `--out file`",
|
|
5687
|
+
"Write the `--csv`, `--json` or `--ndjson` export to a file, in UTF-8 without a byte-order mark, and print `Saved` with its full path, or `Replaced` over a file already there: `gloom financials MSFT --csv --output msft.csv`. Without one of those formats it is refused. On Windows use it rather than a `>` redirect, which Windows PowerShell 5.1 writes as UTF-16 and a spreadsheet misreads. A command with an `--output` of its own keeps it: `fn` writes its report in the format asked for, text included, `shot` writes a PNG, and a plugin command that lists `--output` in `gloom help <command>` writes what it says there"
|
|
5688
|
+
],
|
|
5683
5689
|
[
|
|
5684
5690
|
"`--limit n`",
|
|
5685
5691
|
"Show at most n rows"
|
|
@@ -5695,9 +5701,30 @@
|
|
|
5695
5701
|
[
|
|
5696
5702
|
"`-q`, `--quiet`, `--no-color`",
|
|
5697
5703
|
"Less output, no colour"
|
|
5704
|
+
],
|
|
5705
|
+
[
|
|
5706
|
+
"`--plain`, `--no-plain`",
|
|
5707
|
+
"Text for a screen reader or very large text: no rule lines, arrows as words, and every table column kept, with a dash in an empty cell; a narrow table moves columns under each row instead of dropping them"
|
|
5708
|
+
],
|
|
5709
|
+
[
|
|
5710
|
+
"`--width n`",
|
|
5711
|
+
"Fit tables, help and notes to n columns, in a terminal or piped"
|
|
5698
5712
|
]
|
|
5699
5713
|
]
|
|
5700
5714
|
},
|
|
5715
|
+
{
|
|
5716
|
+
"type": "paragraph",
|
|
5717
|
+
"text": "Plain output is on without the flag when the output is piped or redirected, or when `NO_COLOR` is set to a non-empty value, which also turns colour off; `--no-plain` turns it off. Without `--width`, a terminal's own width applies and piped output fits `COLUMNS` when it is set."
|
|
5718
|
+
},
|
|
5719
|
+
{
|
|
5720
|
+
"type": "heading",
|
|
5721
|
+
"level": 3,
|
|
5722
|
+
"text": "Windows consoles"
|
|
5723
|
+
},
|
|
5724
|
+
{
|
|
5725
|
+
"type": "paragraph",
|
|
5726
|
+
"text": "Output uses UTF-8 characters such as long dashes, `€` and `·`. Windows Terminal and PowerShell show them; in an older cmd.exe console, run `chcp 65001` first. In cmd.exe, write an index symbol in double quotes (`gloom quote \"^SPX\"`): cmd drops a bare `^`."
|
|
5727
|
+
},
|
|
5701
5728
|
{
|
|
5702
5729
|
"type": "heading",
|
|
5703
5730
|
"level": 2,
|
|
@@ -5769,8 +5796,20 @@
|
|
|
5769
5796
|
"Market overview"
|
|
5770
5797
|
],
|
|
5771
5798
|
[
|
|
5772
|
-
"`earnings <symbols
|
|
5773
|
-
"Earnings dates
|
|
5799
|
+
"`earnings <symbols>`",
|
|
5800
|
+
"Earnings dates"
|
|
5801
|
+
],
|
|
5802
|
+
[
|
|
5803
|
+
"`fx <currency>`, `fx <base>/<quote>`, `fx <amount> <from>/<to>`",
|
|
5804
|
+
"A currency into your base currency, a pair as markets quote it (`fx USD/MXN`) with its move on the day, or an amount converted (`fx 5000000 USD/EUR`). Gold, silver, platinum and palladium have no spot quote, so `fx XAU/TRY` is derived from the front-month future (GC=F) and the dollar pair, and says so"
|
|
5805
|
+
],
|
|
5806
|
+
[
|
|
5807
|
+
"`fx <pair> --date <day>`",
|
|
5808
|
+
"The rate at that day's daily FX close (`fx USD/MXN --date 2026-11-06`); a weekend or holiday reads the trading day before it and says so"
|
|
5809
|
+
],
|
|
5810
|
+
[
|
|
5811
|
+
"`fx [amount] <pair> --forward <tenor>`",
|
|
5812
|
+
"The forward implied by both currencies' short rates (covered interest parity), with forward points, not a dealer quote. With an amount, the carry on it over the tenor in your base currency and which side earns it: `fx 5000000 USD/MXN --forward 30d`. Short rates for USD, EUR, GBP, MXN, BRL, SGD and ZAR, and for TRY the CBRT policy rate, named so"
|
|
5774
5813
|
],
|
|
5775
5814
|
[
|
|
5776
5815
|
"`econ [--country all|US|G7|EU|<codes>] [--impact high|medium|low|all] [--search <words>] [--from <date>] [--tz <zone>]`",
|
|
@@ -7443,7 +7482,7 @@
|
|
|
7443
7482
|
"title": "What a stock is",
|
|
7444
7483
|
"summary": "A share is a small slice of a company, so owning one means owning a tiny piece of everything the company has and earns.",
|
|
7445
7484
|
"chapter": "Markets from zero",
|
|
7446
|
-
"minutes":
|
|
7485
|
+
"minutes": 5
|
|
7447
7486
|
},
|
|
7448
7487
|
{
|
|
7449
7488
|
"url": "/academy/markets-from-zero/stocks-funds-and-quotes/funds-etfs-and-indices",
|
|
@@ -7555,7 +7594,7 @@
|
|
|
7555
7594
|
"title": "Panes, focus and linking (WIN, GL, PS, LMA)",
|
|
7556
7595
|
"summary": "Every function opens in a pane, one pane at a time has the focus and receives your keys, and panes can be moved, stacked as tabs, tidied, given a new ticker and linked so they follow a list.",
|
|
7557
7596
|
"chapter": "The terminal and your workspace",
|
|
7558
|
-
"minutes":
|
|
7597
|
+
"minutes": 5
|
|
7559
7598
|
},
|
|
7560
7599
|
{
|
|
7561
7600
|
"url": "/academy/terminal-and-workspace/how-the-terminal-works/layouts-and-desks",
|
|
@@ -7576,7 +7615,7 @@
|
|
|
7576
7615
|
"title": "Free, Pro and how fresh your data is (UPGRADE, CONN)",
|
|
7577
7616
|
"summary": "Every number has an age (real-time, 15 minutes behind, daily or on release), and the help card's Data line and the clock mark on a quote tell you which.",
|
|
7578
7617
|
"chapter": "The terminal and your workspace",
|
|
7579
|
-
"minutes":
|
|
7618
|
+
"minutes": 5
|
|
7580
7619
|
},
|
|
7581
7620
|
{
|
|
7582
7621
|
"url": "/academy/terminal-and-workspace/how-the-terminal-works/the-cli",
|
|
@@ -7616,9 +7655,9 @@
|
|
|
7616
7655
|
{
|
|
7617
7656
|
"url": "/academy/terminal-and-workspace/your-workspace/alerts",
|
|
7618
7657
|
"title": "Alerts (ALRT, SA)",
|
|
7619
|
-
"summary": "An alert watches the market for you, firing on a price level, a valuation or technical level, or an event such as an earnings date, a filing or an insider trade, and ALRT lists them all.",
|
|
7658
|
+
"summary": "An alert watches the market for you, firing on a price level, a day's move, a valuation or technical level, or an event such as an earnings date, a filing or an insider trade, and ALRT lists them all.",
|
|
7620
7659
|
"chapter": "The terminal and your workspace",
|
|
7621
|
-
"minutes":
|
|
7660
|
+
"minutes": 5
|
|
7622
7661
|
},
|
|
7623
7662
|
{
|
|
7624
7663
|
"url": "/academy/terminal-and-workspace/your-workspace/notes-and-theses",
|
|
@@ -7828,7 +7867,7 @@
|
|
|
7828
7867
|
"title": "Dividends and corporate actions (DVD, EVT)",
|
|
7829
7868
|
"summary": "DVD shows a stock's dividend history, yield, payout ratio and growth, and EVT puts dividends, splits, earnings dates and estimates on one timeline.",
|
|
7830
7869
|
"chapter": "Fundamentals and earnings",
|
|
7831
|
-
"minutes":
|
|
7870
|
+
"minutes": 5
|
|
7832
7871
|
},
|
|
7833
7872
|
{
|
|
7834
7873
|
"url": "/academy/fundamentals-and-earnings/events-and-deals/catalysts",
|
|
@@ -7959,9 +7998,9 @@
|
|
|
7959
7998
|
{
|
|
7960
7999
|
"url": "/academy/compare-screen-follow-money/filings-and-attention/attention",
|
|
7961
8000
|
"title": "Social buzz (BUZZ)",
|
|
7962
|
-
"summary": "BUZZ counts the day's posts on X naming a ticker against its usual level, with the top posts and their stance.",
|
|
8001
|
+
"summary": "BUZZ counts the day's posts on X naming a ticker against its usual level, with the top posts and their stance, and alone ranks the tickers whose posts jump most above their own usual level.",
|
|
7963
8002
|
"chapter": "Compare, screen and follow the money",
|
|
7964
|
-
"minutes":
|
|
8003
|
+
"minutes": 4
|
|
7965
8004
|
},
|
|
7966
8005
|
{
|
|
7967
8006
|
"url": "/academy/options-and-volatility/options-from-zero/what-is-an-option",
|
|
@@ -8150,7 +8189,7 @@
|
|
|
8150
8189
|
"title": "Treasury auctions (AUCT)",
|
|
8151
8190
|
"summary": "AUCT lists upcoming and recent US Treasury auctions with the rate each cleared at, how well it was covered and who bought.",
|
|
8152
8191
|
"chapter": "Rates, bonds and credit",
|
|
8153
|
-
"minutes":
|
|
8192
|
+
"minutes": 5
|
|
8154
8193
|
},
|
|
8155
8194
|
{
|
|
8156
8195
|
"url": "/academy/rates-bonds-credit/rates/bond-calculator",
|
|
@@ -8178,7 +8217,7 @@
|
|
|
8178
8217
|
"title": "Debt maturities and covenants (DDIS, CRDOC, COVN)",
|
|
8179
8218
|
"summary": "DDIS shows how much of a company's debt comes due each year, and CRDOC and COVN read its loan and bond documents into a capital structure and covenant headroom.",
|
|
8180
8219
|
"chapter": "Rates, bonds and credit",
|
|
8181
|
-
"minutes":
|
|
8220
|
+
"minutes": 5
|
|
8182
8221
|
},
|
|
8183
8222
|
{
|
|
8184
8223
|
"url": "/academy/macro-markets-and-news/the-economy/economic-calendar",
|
|
@@ -8206,7 +8245,7 @@
|
|
|
8206
8245
|
"title": "Currencies and cross rates (FXC)",
|
|
8207
8246
|
"summary": "FXC is a matrix of exchange rates between the major currencies, each cell saying how many units of the column currency one unit of the row currency buys.",
|
|
8208
8247
|
"chapter": "The big picture: macro, markets and news",
|
|
8209
|
-
"minutes":
|
|
8248
|
+
"minutes": 5
|
|
8210
8249
|
},
|
|
8211
8250
|
{
|
|
8212
8251
|
"url": "/academy/macro-markets-and-news/markets/world-indices-and-venues",
|
package/src/i18n/es.ts
CHANGED
|
@@ -127,6 +127,7 @@ export const es: Record<string, string> = {
|
|
|
127
127
|
"Portfolio": "Cartera",
|
|
128
128
|
"Primary Listing": "Cotización principal",
|
|
129
129
|
"Other Listings": "Otras cotizaciones",
|
|
130
|
+
"Other Matches": "Otras coincidencias",
|
|
130
131
|
"Related": "Relacionados",
|
|
131
132
|
"Saved Layouts": "Diseños guardados",
|
|
132
133
|
"Saved": "Guardados",
|
|
@@ -1159,6 +1160,7 @@ export const es: Record<string, string> = {
|
|
|
1159
1160
|
"Closed-end fund": "Fondo cerrado",
|
|
1160
1161
|
"BDC": "BDC",
|
|
1161
1162
|
"est.": "est.",
|
|
1163
|
+
"nominal": "nominal",
|
|
1162
1164
|
"{count} shares": "{count} acciones",
|
|
1163
1165
|
"No figures for {symbol}: it files with the SEC as a closed-end fund or BDC, but neither the filings Gloom reads nor its sponsor's site state any for it yet.": "No hay cifras para {symbol}: está registrado ante la SEC como fondo cerrado o BDC, pero ni las presentaciones que lee Gloom ni el sitio de su patrocinador indican ninguna todavía.",
|
|
1164
1166
|
"No NAV for {symbol}: {publisher} publishes figures for it, but no NAV.": "No hay valor liquidativo para {symbol}: {publisher} publica cifras del fondo, pero no su valor liquidativo.",
|
package/src/i18n/ja.ts
CHANGED
|
@@ -128,6 +128,7 @@ export const ja: Record<string, string> = {
|
|
|
128
128
|
"Portfolio": "ポートフォリオ",
|
|
129
129
|
"Primary Listing": "主要上場先",
|
|
130
130
|
"Other Listings": "その他の上場先",
|
|
131
|
+
"Other Matches": "その他の一致",
|
|
131
132
|
"Related": "関連",
|
|
132
133
|
"Saved Layouts": "保存済みレイアウト",
|
|
133
134
|
"Saved": "保存済み",
|
|
@@ -1174,6 +1175,7 @@ export const ja: Record<string, string> = {
|
|
|
1174
1175
|
"Closed-end fund": "クローズドエンド型ファンド",
|
|
1175
1176
|
"BDC": "BDC",
|
|
1176
1177
|
"est.": "推定",
|
|
1178
|
+
"nominal": "名目価格",
|
|
1177
1179
|
"{count} shares": "{count} 口",
|
|
1178
1180
|
"No figures for {symbol}: it files with the SEC as a closed-end fund or BDC, but neither the filings Gloom reads nor its sponsor's site state any for it yet.": "{symbol} の数値はありません。SEC にクローズドエンド型ファンドまたは BDC として届け出ていますが、Gloom が読み込む提出書類にもスポンサーのサイトにもまだ掲載がありません。",
|
|
1179
1181
|
"No NAV for {symbol}: {publisher} publishes figures for it, but no NAV.": "{symbol} の基準価額はありません。{publisher} は数値を公表していますが、基準価額は公表していません。",
|
package/src/i18n/ko.ts
CHANGED
|
@@ -126,6 +126,7 @@ export const ko: Record<string, string> = {
|
|
|
126
126
|
"Portfolio": "포트폴리오",
|
|
127
127
|
"Primary Listing": "주 상장",
|
|
128
128
|
"Other Listings": "기타 상장",
|
|
129
|
+
"Other Matches": "기타 일치",
|
|
129
130
|
"Related": "관련",
|
|
130
131
|
"Saved Layouts": "저장된 레이아웃",
|
|
131
132
|
"Saved": "저장됨",
|
|
@@ -1172,6 +1173,7 @@ export const ko: Record<string, string> = {
|
|
|
1172
1173
|
"Closed-end fund": "폐쇄형 펀드",
|
|
1173
1174
|
"BDC": "BDC",
|
|
1174
1175
|
"est.": "추정",
|
|
1176
|
+
"nominal": "명목가",
|
|
1175
1177
|
"{count} shares": "{count}주",
|
|
1176
1178
|
"No figures for {symbol}: it files with the SEC as a closed-end fund or BDC, but neither the filings Gloom reads nor its sponsor's site state any for it yet.": "{symbol}의 수치가 없습니다. SEC에 폐쇄형 펀드 또는 BDC로 신고하지만, Gloom이 읽는 공시와 스폰서 사이트 어디에도 아직 수치가 없습니다.",
|
|
1177
1179
|
"No NAV for {symbol}: {publisher} publishes figures for it, but no NAV.": "{symbol}의 순자산가치가 없습니다. {publisher}는 수치를 공시하지만 순자산가치는 공시하지 않습니다.",
|
package/src/i18n/zh-cn.ts
CHANGED
|
@@ -128,6 +128,7 @@ export const zhCN: Record<string, string> = {
|
|
|
128
128
|
"Portfolio": "投资组合",
|
|
129
129
|
"Primary Listing": "主要上市",
|
|
130
130
|
"Other Listings": "其他上市",
|
|
131
|
+
"Other Matches": "其他匹配",
|
|
131
132
|
"Related": "相关",
|
|
132
133
|
"Saved Layouts": "已存布局",
|
|
133
134
|
"Saved": "已保存",
|
|
@@ -1174,6 +1175,7 @@ export const zhCN: Record<string, string> = {
|
|
|
1174
1175
|
"Closed-end fund": "封闭式基金",
|
|
1175
1176
|
"BDC": "BDC",
|
|
1176
1177
|
"est.": "估计",
|
|
1178
|
+
"nominal": "名义价",
|
|
1177
1179
|
"{count} shares": "{count} 份",
|
|
1178
1180
|
"No figures for {symbol}: it files with the SEC as a closed-end fund or BDC, but neither the filings Gloom reads nor its sponsor's site state any for it yet.": "暂无 {symbol} 的数据:它以封闭式基金或 BDC 身份向 SEC 申报,但 Gloom 读取的申报文件和其发起人的网站均尚未列出任何数据。",
|
|
1179
1181
|
"No NAV for {symbol}: {publisher} publishes figures for it, but no NAV.": "暂无 {symbol} 的资产净值:{publisher} 公布了其数据,但未公布资产净值。",
|
package/src/i18n/zh-tw.ts
CHANGED
|
@@ -128,6 +128,7 @@ export const zhTW: Record<string, string> = {
|
|
|
128
128
|
"Portfolio": "投資組合",
|
|
129
129
|
"Primary Listing": "主要掛牌",
|
|
130
130
|
"Other Listings": "其他掛牌",
|
|
131
|
+
"Other Matches": "其他符合",
|
|
131
132
|
"Related": "相關",
|
|
132
133
|
"Saved Layouts": "已儲存的版面設定",
|
|
133
134
|
"Saved": "已儲存",
|
|
@@ -1174,6 +1175,7 @@ export const zhTW: Record<string, string> = {
|
|
|
1174
1175
|
"Closed-end fund": "封閉式基金",
|
|
1175
1176
|
"BDC": "BDC",
|
|
1176
1177
|
"est.": "估計",
|
|
1178
|
+
"nominal": "名義價",
|
|
1177
1179
|
"{count} shares": "{count} 單位",
|
|
1178
1180
|
"No figures for {symbol}: it files with the SEC as a closed-end fund or BDC, but neither the filings Gloom reads nor its sponsor's site state any for it yet.": "暫無 {symbol} 的數據:它以封閉式基金或 BDC 身分向 SEC 申報,但 Gloom 讀取的申報文件與其發起人的網站均尚未列出任何數據。",
|
|
1179
1181
|
"No NAV for {symbol}: {publisher} publishes figures for it, but no NAV.": "暫無 {symbol} 的資產淨值:{publisher} 公布了其數據,但未公布資產淨值。",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isYieldIndexSymbol } from "../../tickers/index-roots";
|
|
1
2
|
import { classifyInstrumentType, kindFromListingSyntax } from "../../tickers/instrument-kind";
|
|
2
3
|
import { isPerpetualExchange } from "../../tickers/perpetual-listing";
|
|
3
4
|
import type { Quote } from "../../types/financials";
|
|
@@ -9,7 +10,7 @@ import { zonedDateKey } from "../../utils/zoned-date-time";
|
|
|
9
10
|
import { futuresChangeBasis, futuresQuoteMonth, futuresSettleText, isFuturesInstrument } from "../futures-contract";
|
|
10
11
|
import { quoteTradingDay } from "../quotes/day-range";
|
|
11
12
|
import { splitRatioText } from "../quotes/session-split";
|
|
12
|
-
import { hasPublishedSessionCalendar, previousPublishedSession } from "./freshness";
|
|
13
|
+
import { hasPublishedSessionCalendar, isVenueTradingDay, latestRegularSessionOpen, previousPublishedSession, sessionCalendarTimeZone } from "./freshness";
|
|
13
14
|
import { getActiveQuoteDisplay, getRegularSessionDisplay, regularSessionDisplayDate } from "./status";
|
|
14
15
|
|
|
15
16
|
const DAY_MS = 86_400_000;
|
|
@@ -92,8 +93,7 @@ const INDEX_CALENDAR_VENUES: Readonly<Record<string, string>> = {
|
|
|
92
93
|
/** The venue whose published calendar dates the quote's sessions, and whose zone dates its daily bars. */
|
|
93
94
|
export function calendarVenue(quote: Quote): string {
|
|
94
95
|
const venue = quoteVenue(quote);
|
|
95
|
-
|
|
96
|
-
return (index && INDEX_CALENDAR_VENUES[venue]) || venue;
|
|
96
|
+
return (isIndexQuote(quote) && INDEX_CALENDAR_VENUES[venue]) || venue;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
function isCurrencyPair(quote: Quote): boolean {
|
|
@@ -105,12 +105,48 @@ function isCurrencyPair(quote: Quote): boolean {
|
|
|
105
105
|
* The trading day a quote describes (quoteTradingDay); for a currency pair,
|
|
106
106
|
* whose venue has no clock, the FX trading day of its print, which turns at
|
|
107
107
|
* 17:00 New York, so every pair on a board is dated alike. Null for a pair's
|
|
108
|
-
* print made while FX is shut, which belongs to no trading day.
|
|
108
|
+
* print made while FX is shut, which belongs to no trading day. An index
|
|
109
|
+
* whose quote names no session is dated by its home venue (indexPrintSession).
|
|
109
110
|
*/
|
|
110
111
|
function tradingDayOf(quote: Quote): string | null {
|
|
111
112
|
const day = quoteTradingDay(quote);
|
|
112
|
-
if (day || !
|
|
113
|
-
return
|
|
113
|
+
if (day || !Number.isFinite(quote.lastUpdated) || quote.lastUpdated <= 0) return day;
|
|
114
|
+
if (isIndexQuote(quote)) return indexPrintSession(quote);
|
|
115
|
+
return isCurrencyPair(quote) ? fxPrintTradingDay(quote.lastUpdated) : null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function isIndexQuote(quote: Quote): boolean {
|
|
119
|
+
return classifyInstrumentType(quote.instrumentType) === "index" || kindFromListingSyntax(quote.symbol) === "index";
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* One of Cboe's Treasury yield indices (^IRX, ^FVX, ^TNX, ^TYX): computed on
|
|
124
|
+
* the bond market's days, whose holidays (Veterans Day, Columbus Day) the
|
|
125
|
+
* equity calendar Cboe's venue follows does not have.
|
|
126
|
+
*/
|
|
127
|
+
function isCboeYieldIndex(quote: Quote): boolean {
|
|
128
|
+
return isIndexQuote(quote) && isYieldIndexSymbol(quote.symbol);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The session of the venue whose calendar an index follows (calendarVenue)
|
|
133
|
+
* that its last print sits in: the print's date in that venue's zone, when
|
|
134
|
+
* its published calendar has a session that day and the print came after it
|
|
135
|
+
* opened. The S&P 500's closing print at 16:37 New York on Fri 6 Nov 2026 is
|
|
136
|
+
* Friday's, so its move is from Thursday's close. A print before the day's
|
|
137
|
+
* open, on a day the calendar has no session for, or on a venue with no
|
|
138
|
+
* published calendar, names none; nor does a Cboe index's, whose days are
|
|
139
|
+
* Cboe's own (a yield index skips the bond market's holidays).
|
|
140
|
+
*/
|
|
141
|
+
function indexPrintSession(quote: Quote): string | null {
|
|
142
|
+
const venue = calendarVenue(quote);
|
|
143
|
+
if (venue === "CBOE") return null;
|
|
144
|
+
const zone = sessionCalendarTimeZone(venue) ?? quote.indexSession?.timeZone;
|
|
145
|
+
if (!zone) return null;
|
|
146
|
+
const date = zonedDateKey(quote.lastUpdated, zone);
|
|
147
|
+
if (!date || !hasPublishedSessionCalendar(venue, date) || !isVenueTradingDay(venue, date)) return null;
|
|
148
|
+
const open = latestRegularSessionOpen(venue, quote.lastUpdated);
|
|
149
|
+
return open != null && zonedDateKey(open, zone) === date ? date : null;
|
|
114
150
|
}
|
|
115
151
|
|
|
116
152
|
/** A coin on the spot crypto venue: its day is the UTC day. */
|
|
@@ -141,13 +177,16 @@ function previousIndexSession(quote: Quote, date: string): string | null {
|
|
|
141
177
|
* the weekday before; for any other listing the day its own daily closes date
|
|
142
178
|
* its previous close to (`previousCloseDate`, PreviousCloseDates). A thin
|
|
143
179
|
* listing's previous trade before the calendar's session is its own day, and
|
|
144
|
-
* one whose closes cannot name it is left undated.
|
|
180
|
+
* one whose closes cannot name it is left undated. A Cboe yield index is
|
|
181
|
+
* dated by its own closes alone. Null when nothing dates it.
|
|
145
182
|
*/
|
|
146
183
|
function previousSession(quote: Quote, sessionDate: string): DatedChangeBasis | null {
|
|
147
184
|
if (quote.previousCloseUndated) return null;
|
|
148
185
|
const venue = calendarVenue(quote);
|
|
149
186
|
const dated = quote.previousCloseDate && ISO_DATE.test(quote.previousCloseDate) && quote.previousCloseDate < sessionDate
|
|
150
187
|
? quote.previousCloseDate : null;
|
|
188
|
+
// A yield index's days are the bond market's: only its own daily closes date it, never its venue's equity calendar.
|
|
189
|
+
if (isCboeYieldIndex(quote)) return dated ? { kind: "close", date: dated } : null;
|
|
151
190
|
const published = previousPublishedSession(venue, sessionDate);
|
|
152
191
|
// A listing that did not trade in the calendar's session moves from its previous trade, an earlier day.
|
|
153
192
|
if (published && dated && dated < published.date) return { kind: "close", date: dated, venue };
|
|
@@ -162,12 +201,14 @@ function previousSession(quote: Quote, sessionDate: string): DatedChangeBasis |
|
|
|
162
201
|
* Whether something other than the listing's own daily closes dates every
|
|
163
202
|
* move of the quote: a future's terms, a coin's UTC day, a perpetual's 24
|
|
164
203
|
* hours, a currency pair's weekday, or its venue's calendar for the year of
|
|
165
|
-
* `now
|
|
204
|
+
* `now`; never a Cboe yield index's, which its own closes date. A few
|
|
205
|
+
* lookups, for a caller that runs on every tick before it asks
|
|
166
206
|
* quoteChangeBasis.
|
|
167
207
|
*/
|
|
168
208
|
export function isChangeBasisDatedWithoutCloses(quote: Quote, now = Date.now()): boolean {
|
|
169
209
|
if (isSpotCoin(quote) || isCurrencyPair(quote) || isFuturesInstrument(quote.symbol, quote.instrumentType)) return true;
|
|
170
210
|
if (isPerpetualExchange(quote.listingExchangeName || quote.exchangeName)) return true;
|
|
211
|
+
if (isCboeYieldIndex(quote)) return false;
|
|
171
212
|
return hasPublishedSessionCalendar(calendarVenue(quote), new Date(now).toISOString().slice(0, 10));
|
|
172
213
|
}
|
|
173
214
|
|