gloomberb 0.20.12 → 0.20.13

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.
Files changed (512) hide show
  1. package/package.json +1 -1
  2. package/src/account/billing.ts +3 -2
  3. package/src/account/upgrade-dialog.tsx +8 -8
  4. package/src/api-client/index.ts +10 -2
  5. package/src/api-client/install-experiments.ts +146 -0
  6. package/src/api-client/telemetry.ts +47 -0
  7. package/src/api-client/types/market.ts +4 -0
  8. package/src/api-client/types/news.ts +16 -0
  9. package/src/architecture/floating-promise-allowlist.json +17 -33
  10. package/src/brokers/signed-in/adapter.ts +2 -2
  11. package/src/brokers/signed-in/catalog.ts +13 -4
  12. package/src/cli/commands/market.ts +51 -32
  13. package/src/cli/commands/overview.ts +3 -3
  14. package/src/cli/commands/search.ts +103 -9
  15. package/src/cli/commands/ticker.ts +22 -13
  16. package/src/cli/earnings-calendar.ts +33 -53
  17. package/src/cli/history-rows.ts +18 -1
  18. package/src/cli/known-gaps.ts +9 -0
  19. package/src/cli/listing-arg.ts +105 -18
  20. package/src/cli/pane-functions/catalog.ts +55 -7
  21. package/src/cli/pane-functions/dom.ts +8 -1
  22. package/src/cli/pane-functions/freshness.ts +2 -2
  23. package/src/cli/pane-functions/headless.ts +8 -8
  24. package/src/cli/pane-functions/index.ts +1 -1
  25. package/src/cli/pane-functions/report.ts +4 -1
  26. package/src/cli/perpetual-contract.ts +4 -4
  27. package/src/cli/quote-answer.ts +6 -2
  28. package/src/cli/result.ts +2 -1
  29. package/src/components/chart/composite/axis-overlays.tsx +5 -2
  30. package/src/components/chart/composite/composite-chart.tsx +1 -0
  31. package/src/components/chart/composite/format.ts +101 -15
  32. package/src/components/chart/composite/legend.tsx +60 -25
  33. package/src/components/chart/composite/time-axis.ts +51 -29
  34. package/src/components/chart/composite/toolbar.tsx +42 -6
  35. package/src/components/chart/curve/curve-surface.tsx +5 -5
  36. package/src/components/command-bar/list/badge.ts +8 -5
  37. package/src/components/command-bar/list/model.ts +0 -5
  38. package/src/components/command-bar/list/view.tsx +39 -2
  39. package/src/components/command-bar/routes/root/plugin-install.ts +4 -2
  40. package/src/components/command-bar/routes/root/provider-search.ts +23 -3
  41. package/src/components/command-bar/routes/root/results.ts +20 -9
  42. package/src/components/command-bar/routes/root/start-here.ts +1 -2
  43. package/src/components/command-bar/routes/ticker-search/actions.ts +2 -3
  44. package/src/components/command-bar/routes/ticker-search/results.ts +23 -4
  45. package/src/components/data-table/view.tsx +29 -6
  46. package/src/components/form-modal/host.tsx +1 -1
  47. package/src/components/layout/header.tsx +3 -2
  48. package/src/components/layout/market-summary.ts +3 -3
  49. package/src/components/layout/pane/error-boundary.tsx +2 -1
  50. package/src/components/markdown-text.tsx +36 -0
  51. package/src/components/market-board/index.tsx +4 -3
  52. package/src/components/onboarding/first-run-workspace.ts +46 -11
  53. package/src/components/onboarding/onboarding-keyboard.ts +57 -5
  54. package/src/components/onboarding/onboarding-wizard.tsx +91 -24
  55. package/src/components/onboarding/portfolio-step/index.tsx +1 -0
  56. package/src/components/onboarding/portfolio-step/positions-panel.tsx +36 -9
  57. package/src/components/onboarding/portfolio-step/types.ts +2 -0
  58. package/src/components/onboarding/tickers-step-model.ts +140 -0
  59. package/src/components/onboarding/tickers-step.tsx +116 -0
  60. package/src/components/onboarding/use-onboarding-broker-form.ts +1 -1
  61. package/src/components/onboarding/use-onboarding-progress.ts +100 -11
  62. package/src/components/onboarding/use-onboarding-upgrade.ts +3 -2
  63. package/src/components/onboarding/wizard-model.ts +3 -1
  64. package/src/components/onboarding/wizard-tickers.ts +139 -0
  65. package/src/components/price-performance.tsx +2 -2
  66. package/src/components/speedometer-gauge/model.ts +2 -1
  67. package/src/components/speedometer-gauge/terminal.tsx +13 -8
  68. package/src/components/ui/choice-dialog.tsx +101 -32
  69. package/src/components/ui/multi-select/dialog.tsx +1 -7
  70. package/src/components/ui/not-meaningful.ts +16 -0
  71. package/src/components/ui/query-bar.tsx +16 -4
  72. package/src/components/ui/stat-grid.tsx +27 -6
  73. package/src/data/config/store/normalize.ts +2 -0
  74. package/src/docs/snapshot.json +1 -1
  75. package/src/i18n/es.ts +5 -2
  76. package/src/i18n/ja.ts +5 -2
  77. package/src/i18n/ko.ts +5 -2
  78. package/src/i18n/zh-cn.ts +5 -2
  79. package/src/i18n/zh-tw.ts +5 -2
  80. package/src/layout-marketplace/model.ts +2 -1
  81. package/src/market-data/futures-contract.ts +2 -1
  82. package/src/market-data/hooks.tsx +1 -1
  83. package/src/market-data/market/change-basis.ts +27 -5
  84. package/src/market-data/market/format.ts +13 -13
  85. package/src/market-data/quotes/listing-enterprise-value.ts +3 -3
  86. package/src/market-data/quotes/time.ts +17 -10
  87. package/src/market-data/tax-equivalent.ts +3 -2
  88. package/src/news/aggregator.ts +19 -8
  89. package/src/news/hooks.ts +1 -1
  90. package/src/news/news-model.ts +49 -0
  91. package/src/news/types.ts +9 -0
  92. package/src/plugins/builtin/account-management/calendar-tab.tsx +8 -3
  93. package/src/plugins/builtin/account-management/pane.tsx +9 -8
  94. package/src/plugins/builtin/alerts/calendar-events.ts +4 -5
  95. package/src/plugins/builtin/alerts/format.ts +6 -5
  96. package/src/plugins/builtin/alerts/headless.ts +3 -2
  97. package/src/plugins/builtin/alerts/history.ts +2 -1
  98. package/src/plugins/builtin/alerts/pane.tsx +2 -1
  99. package/src/plugins/builtin/alerts/price-text.ts +2 -1
  100. package/src/plugins/builtin/alerts/scheduled.ts +6 -5
  101. package/src/plugins/builtin/analytics/account-returns.ts +6 -7
  102. package/src/plugins/builtin/analytics/display.ts +2 -1
  103. package/src/plugins/builtin/analytics/pane-model.ts +5 -9
  104. package/src/plugins/builtin/analytics/risk-model.ts +6 -6
  105. package/src/plugins/builtin/analytics/risk-pane.tsx +6 -5
  106. package/src/plugins/builtin/analytics/view.tsx +5 -5
  107. package/src/plugins/builtin/attention/model.ts +6 -5
  108. package/src/plugins/builtin/attention/pane.tsx +5 -4
  109. package/src/plugins/builtin/awards/detail.tsx +5 -4
  110. package/src/plugins/builtin/awards/headless.ts +8 -7
  111. package/src/plugins/builtin/awards/model.ts +4 -3
  112. package/src/plugins/builtin/awards/pane.tsx +4 -4
  113. package/src/plugins/builtin/backtest/format.ts +3 -2
  114. package/src/plugins/builtin/backtest/report.ts +3 -2
  115. package/src/plugins/builtin/bond-calculator/headless.ts +2 -1
  116. package/src/plugins/builtin/bond-calculator/pane.tsx +2 -1
  117. package/src/plugins/builtin/broker-manager/add-flow.tsx +1 -1
  118. package/src/plugins/builtin/broker-trading/orders-data.ts +3 -3
  119. package/src/plugins/builtin/broker-trading/orders.tsx +3 -2
  120. package/src/plugins/builtin/broker-trading/ticket.tsx +2 -2
  121. package/src/plugins/builtin/buildout/cells.tsx +2 -1
  122. package/src/plugins/builtin/buildout/company/pane.tsx +4 -3
  123. package/src/plugins/builtin/buildout/data-runtime.ts +21 -23
  124. package/src/plugins/builtin/buildout/detail/values.ts +2 -1
  125. package/src/plugins/builtin/buildout/format.ts +4 -3
  126. package/src/plugins/builtin/buildout/pane/index.tsx +3 -3
  127. package/src/plugins/builtin/catalysts/detail.tsx +2 -1
  128. package/src/plugins/builtin/catalysts/model.ts +6 -5
  129. package/src/plugins/builtin/catalysts/pane.tsx +2 -1
  130. package/src/plugins/builtin/cds/headless.ts +3 -2
  131. package/src/plugins/builtin/cds/model.ts +8 -8
  132. package/src/plugins/builtin/cds/pane.tsx +3 -2
  133. package/src/plugins/builtin/central-bank-rates/headless.ts +2 -1
  134. package/src/plugins/builtin/central-bank-rates/model.ts +3 -2
  135. package/src/plugins/builtin/central-bank-rates/pane.tsx +5 -5
  136. package/src/plugins/builtin/changelog/index.tsx +2 -2
  137. package/src/plugins/builtin/chart-composer/index.tsx +4 -2
  138. package/src/plugins/builtin/chart-composer/pane.tsx +7 -3
  139. package/src/plugins/builtin/chart-composer/use-series-catalog.ts +3 -1
  140. package/src/plugins/builtin/chart-composer/user-series.ts +3 -1
  141. package/src/plugins/builtin/chat/attachments/desktop.tsx +2 -1
  142. package/src/plugins/builtin/chat/controller/utils.ts +2 -1
  143. package/src/plugins/builtin/clinical-trials/model.ts +4 -3
  144. package/src/plugins/builtin/clinical-trials/sponsor-tickers.ts +4 -2
  145. package/src/plugins/builtin/cloud/askg/lock-note.ts +16 -4
  146. package/src/plugins/builtin/cloud/askg/model.ts +2 -1
  147. package/src/plugins/builtin/cloud/askg/pane.tsx +35 -1
  148. package/src/plugins/builtin/cloud/company-picker.tsx +1 -3
  149. package/src/plugins/builtin/cloud/team/pane.tsx +12 -12
  150. package/src/plugins/builtin/cloud/thesis/detail.tsx +13 -8
  151. package/src/plugins/builtin/cloud-tweets/model.ts +2 -2
  152. package/src/plugins/builtin/comment-letters/pane.tsx +2 -1
  153. package/src/plugins/builtin/commodity-balances/headless.ts +3 -2
  154. package/src/plugins/builtin/company-attention/app-rank.tsx +5 -4
  155. package/src/plugins/builtin/company-attention/building-model.ts +7 -7
  156. package/src/plugins/builtin/company-attention/headless.ts +6 -5
  157. package/src/plugins/builtin/company-attention/model.ts +4 -4
  158. package/src/plugins/builtin/company-attention/moves-model.ts +9 -9
  159. package/src/plugins/builtin/company-attention/signals-model.ts +9 -9
  160. package/src/plugins/builtin/company-kpis/headless.ts +2 -1
  161. package/src/plugins/builtin/company-kpis/model.ts +15 -10
  162. package/src/plugins/builtin/company-kpis/pane.tsx +2 -2
  163. package/src/plugins/builtin/congress-trades/detail.tsx +6 -5
  164. package/src/plugins/builtin/congress-trades/headless.ts +2 -1
  165. package/src/plugins/builtin/congress-trades/model.ts +6 -6
  166. package/src/plugins/builtin/congress-trades/table.tsx +7 -6
  167. package/src/plugins/builtin/connections/pane.tsx +5 -5
  168. package/src/plugins/builtin/correlation/headless.ts +2 -2
  169. package/src/plugins/builtin/correlation/index.tsx +4 -1
  170. package/src/plugins/builtin/correlation/matrix/selection.ts +2 -1
  171. package/src/plugins/builtin/correlation/relationship/view-model.ts +3 -3
  172. package/src/plugins/builtin/cot/headless.ts +3 -2
  173. package/src/plugins/builtin/cot/model.ts +2 -1
  174. package/src/plugins/builtin/cot/pane.tsx +4 -3
  175. package/src/plugins/builtin/cpi/headless.ts +4 -3
  176. package/src/plugins/builtin/cpi/model.ts +8 -7
  177. package/src/plugins/builtin/credit-boards/cdx-pane.tsx +5 -4
  178. package/src/plugins/builtin/credit-boards/headless.ts +2 -1
  179. package/src/plugins/builtin/credit-boards/model.ts +5 -5
  180. package/src/plugins/builtin/credit-conditions/headless.ts +2 -1
  181. package/src/plugins/builtin/credit-conditions/index.tsx +2 -2
  182. package/src/plugins/builtin/credit-documents/model.ts +2 -2
  183. package/src/plugins/builtin/crypto-board/defi-view.tsx +7 -7
  184. package/src/plugins/builtin/crypto-board/defi.ts +2 -2
  185. package/src/plugins/builtin/crypto-board/model.ts +4 -3
  186. package/src/plugins/builtin/crypto-board/pane.tsx +8 -8
  187. package/src/plugins/builtin/crypto-board/supply.ts +2 -2
  188. package/src/plugins/builtin/crypto-etf-flows/model.ts +4 -4
  189. package/src/plugins/builtin/custom-view/index.tsx +3 -1
  190. package/src/plugins/builtin/custom-view/pane.tsx +5 -1
  191. package/src/plugins/builtin/custom-view/view-spec.ts +11 -0
  192. package/src/plugins/builtin/debt-maturities/model.ts +3 -3
  193. package/src/plugins/builtin/debt-maturities/pane.tsx +2 -2
  194. package/src/plugins/builtin/dividend-yield/client.ts +7 -3
  195. package/src/plugins/builtin/dividend-yield/headless.ts +16 -11
  196. package/src/plugins/builtin/dividend-yield/pane.tsx +12 -10
  197. package/src/plugins/builtin/dividend-yield/ranking-view.tsx +4 -1
  198. package/src/plugins/builtin/dividend-yield/ranking.ts +19 -11
  199. package/src/plugins/builtin/dividend-yield/types.ts +4 -0
  200. package/src/plugins/builtin/dividend-yield/view.ts +3 -3
  201. package/src/plugins/builtin/docs/use-docs.ts +4 -2
  202. package/src/plugins/builtin/doe/headless.ts +2 -1
  203. package/src/plugins/builtin/doe/model.ts +12 -11
  204. package/src/plugins/builtin/earnings/board-model.ts +14 -8
  205. package/src/plugins/builtin/earnings/board-table.ts +13 -8
  206. package/src/plugins/builtin/earnings/calendar-model.ts +5 -5
  207. package/src/plugins/builtin/earnings/calendar.tsx +2 -1
  208. package/src/plugins/builtin/earnings/format.ts +16 -14
  209. package/src/plugins/builtin/earnings/headless.ts +57 -19
  210. package/src/plugins/builtin/earnings/history-model.ts +11 -7
  211. package/src/plugins/builtin/earnings/history-table.ts +14 -9
  212. package/src/plugins/builtin/earnings/history.tsx +4 -3
  213. package/src/plugins/builtin/earnings-calls/calendar.tsx +2 -1
  214. package/src/plugins/builtin/earnings-calls/format.ts +6 -5
  215. package/src/plugins/builtin/earnings-calls/upcoming.ts +5 -5
  216. package/src/plugins/builtin/earnings-ripple/headless.ts +2 -1
  217. package/src/plugins/builtin/earnings-ripple/model.ts +3 -2
  218. package/src/plugins/builtin/earnings-ripple/pane.tsx +6 -6
  219. package/src/plugins/builtin/econ/calendar-model.ts +2 -2
  220. package/src/plugins/builtin/econ/detail-view.tsx +2 -2
  221. package/src/plugins/builtin/econ/index.tsx +7 -6
  222. package/src/plugins/builtin/econ-statistics/detail.tsx +2 -1
  223. package/src/plugins/builtin/econ-statistics/headless.ts +4 -4
  224. package/src/plugins/builtin/econ-statistics/pane.tsx +2 -2
  225. package/src/plugins/builtin/equity-screener/headless.ts +5 -5
  226. package/src/plugins/builtin/equity-screener/model.ts +6 -4
  227. package/src/plugins/builtin/equity-screener/pane.tsx +7 -7
  228. package/src/plugins/builtin/equity-screener/screen-check.ts +2 -1
  229. package/src/plugins/builtin/equity-screener/ticker-check.tsx +2 -1
  230. package/src/plugins/builtin/estimate-revisions/model.ts +3 -2
  231. package/src/plugins/builtin/estimate-revisions/pane.tsx +8 -8
  232. package/src/plugins/builtin/executives/format.ts +4 -4
  233. package/src/plugins/builtin/exposure/headless.ts +8 -8
  234. package/src/plugins/builtin/exposure/model.ts +4 -3
  235. package/src/plugins/builtin/exposure/pane.tsx +6 -5
  236. package/src/plugins/builtin/fear-greed/format.ts +7 -7
  237. package/src/plugins/builtin/fear-greed/headless.ts +2 -1
  238. package/src/plugins/builtin/filing-events/feed.ts +2 -1
  239. package/src/plugins/builtin/futures/table.tsx +8 -8
  240. package/src/plugins/builtin/futures-curve/headless.ts +18 -18
  241. package/src/plugins/builtin/futures-curve/model.ts +5 -5
  242. package/src/plugins/builtin/futures-curve/pane.tsx +8 -8
  243. package/src/plugins/builtin/fx-matrix/index.tsx +2 -2
  244. package/src/plugins/builtin/fx-matrix/pairs.ts +2 -1
  245. package/src/plugins/builtin/gpu/board.tsx +6 -5
  246. package/src/plugins/builtin/gpu/changes.tsx +2 -1
  247. package/src/plugins/builtin/gpu/equities.tsx +2 -2
  248. package/src/plugins/builtin/gpu/headless.ts +4 -3
  249. package/src/plugins/builtin/gpu/model.ts +8 -7
  250. package/src/plugins/builtin/help/functions-table.tsx +41 -9
  251. package/src/plugins/builtin/help/index.tsx +6 -3
  252. package/src/plugins/builtin/help/keybindings-editor.tsx +35 -7
  253. package/src/plugins/builtin/help/shortcut-table.tsx +19 -7
  254. package/src/plugins/builtin/help/table-cells.tsx +51 -0
  255. package/src/plugins/builtin/holders/pane.tsx +4 -1
  256. package/src/plugins/builtin/insider/base-values.ts +2 -2
  257. package/src/plugins/builtin/insider/display.ts +2 -1
  258. package/src/plugins/builtin/insider/headless.ts +16 -16
  259. package/src/plugins/builtin/insider/insider-data.ts +2 -1
  260. package/src/plugins/builtin/insider/signals-model.ts +3 -3
  261. package/src/plugins/builtin/insider/table-model.ts +27 -13
  262. package/src/plugins/builtin/insider/table.tsx +1 -1
  263. package/src/plugins/builtin/ipo-calendar/model.ts +4 -4
  264. package/src/plugins/builtin/iv-history/format.ts +8 -7
  265. package/src/plugins/builtin/iv-history/headless.ts +9 -8
  266. package/src/plugins/builtin/iv-history/pane.tsx +3 -2
  267. package/src/plugins/builtin/iv-history/screen-pane.tsx +5 -4
  268. package/src/plugins/builtin/jobs/headless.ts +11 -11
  269. package/src/plugins/builtin/jobs/model.ts +2 -2
  270. package/src/plugins/builtin/jobs/pane.tsx +5 -5
  271. package/src/plugins/builtin/jodi/model.ts +2 -2
  272. package/src/plugins/builtin/jodi/pane.tsx +2 -1
  273. package/src/plugins/builtin/kelly-sizer/headless.ts +4 -4
  274. package/src/plugins/builtin/kelly-sizer/model.ts +2 -1
  275. package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -2
  276. package/src/plugins/builtin/macro-day/headless.ts +6 -5
  277. package/src/plugins/builtin/macro-day/model.ts +2 -1
  278. package/src/plugins/builtin/macro-day/pane.tsx +4 -4
  279. package/src/plugins/builtin/market-halts/model.ts +11 -10
  280. package/src/plugins/builtin/market-halts/pane.tsx +2 -1
  281. package/src/plugins/builtin/market-heatmap/index.tsx +4 -4
  282. package/src/plugins/builtin/market-movers/session-table.ts +3 -3
  283. package/src/plugins/builtin/market-movers/session.ts +2 -1
  284. package/src/plugins/builtin/market-movers/table.ts +5 -5
  285. package/src/plugins/builtin/market-valuation/detail.tsx +2 -2
  286. package/src/plugins/builtin/market-valuation/headless.ts +7 -7
  287. package/src/plugins/builtin/market-valuation/pane.tsx +7 -7
  288. package/src/plugins/builtin/members/breadth-pane.tsx +5 -4
  289. package/src/plugins/builtin/members/headless.ts +2 -1
  290. package/src/plugins/builtin/members/model.ts +3 -2
  291. package/src/plugins/builtin/members/pane.tsx +10 -9
  292. package/src/plugins/builtin/mna/distress/model.ts +2 -1
  293. package/src/plugins/builtin/mna/model.ts +5 -5
  294. package/src/plugins/builtin/money-markets/headless.ts +2 -1
  295. package/src/plugins/builtin/money-markets/model.ts +3 -2
  296. package/src/plugins/builtin/money-markets/pane.tsx +4 -4
  297. package/src/plugins/builtin/news/headless.ts +5 -2
  298. package/src/plugins/builtin/news/wire/breaking/notifications.ts +21 -19
  299. package/src/plugins/builtin/news/wire/news/row.ts +3 -1
  300. package/src/plugins/builtin/news/wire/news/table.tsx +3 -2
  301. package/src/plugins/builtin/news/wire/persisted-articles.ts +28 -3
  302. package/src/plugins/builtin/notes/headless.ts +2 -1
  303. package/src/plugins/builtin/notes/model.ts +2 -1
  304. package/src/plugins/builtin/openfda/pane.tsx +4 -3
  305. package/src/plugins/builtin/options/carry.ts +3 -2
  306. package/src/plugins/builtin/options/market-reference.ts +2 -1
  307. package/src/plugins/builtin/options/table.ts +48 -9
  308. package/src/plugins/builtin/options/view.tsx +47 -17
  309. package/src/plugins/builtin/options-calculator/headless.ts +3 -2
  310. package/src/plugins/builtin/options-calculator/pane.tsx +7 -7
  311. package/src/plugins/builtin/options-positioning/headless.ts +8 -7
  312. package/src/plugins/builtin/options-positioning/model.ts +10 -10
  313. package/src/plugins/builtin/options-positioning/pane.tsx +5 -5
  314. package/src/plugins/builtin/options-scenario/collar.ts +5 -4
  315. package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +11 -10
  316. package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +15 -14
  317. package/src/plugins/builtin/options-scenario/csp-screen.ts +2 -1
  318. package/src/plugins/builtin/options-scenario/csp.ts +6 -5
  319. package/src/plugins/builtin/options-scenario/headless.ts +6 -5
  320. package/src/plugins/builtin/options-scenario/hedge.ts +3 -3
  321. package/src/plugins/builtin/options-scenario/pane.tsx +7 -6
  322. package/src/plugins/builtin/options-scenario/strategy-screen.ts +1 -1
  323. package/src/plugins/builtin/pe-band/headless.ts +9 -8
  324. package/src/plugins/builtin/pe-band/pane.tsx +7 -7
  325. package/src/plugins/builtin/perps/cascade.ts +3 -2
  326. package/src/plugins/builtin/perps/headless.ts +10 -9
  327. package/src/plugins/builtin/perps/model.ts +14 -14
  328. package/src/plugins/builtin/perps/pane.tsx +3 -2
  329. package/src/plugins/builtin/portfolio-list/header.tsx +2 -2
  330. package/src/plugins/builtin/portfolio-list/index.tsx +3 -2
  331. package/src/plugins/builtin/portfolio-list/pane/futures-terms.ts +4 -2
  332. package/src/plugins/builtin/portfolio-list/pane/period-pnl.ts +2 -1
  333. package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +4 -2
  334. package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +2 -2
  335. package/src/plugins/builtin/portfolio-list/settings.ts +4 -1
  336. package/src/plugins/builtin/portfolio-list/summary/index.tsx +4 -4
  337. package/src/plugins/builtin/power/detail.tsx +6 -5
  338. package/src/plugins/builtin/power/gas-model.ts +8 -7
  339. package/src/plugins/builtin/power/gas.tsx +2 -1
  340. package/src/plugins/builtin/power/headless.ts +7 -6
  341. package/src/plugins/builtin/power/model.ts +3 -2
  342. package/src/plugins/builtin/power/prices-headless.ts +10 -9
  343. package/src/plugins/builtin/power/prices-model.ts +3 -2
  344. package/src/plugins/builtin/power/prices.tsx +2 -1
  345. package/src/plugins/builtin/primary-dealers/model.ts +3 -3
  346. package/src/plugins/builtin/primary-dealers/pane.tsx +2 -2
  347. package/src/plugins/builtin/rate-path/headless.ts +8 -7
  348. package/src/plugins/builtin/rate-path/model.ts +6 -5
  349. package/src/plugins/builtin/rate-path/pane.tsx +6 -5
  350. package/src/plugins/builtin/realized-vol/fx-proxy.ts +2 -1
  351. package/src/plugins/builtin/realized-vol/headless.ts +11 -10
  352. package/src/plugins/builtin/realized-vol/pane.tsx +5 -4
  353. package/src/plugins/builtin/relative-rotation/headless.ts +2 -1
  354. package/src/plugins/builtin/relative-rotation/pane.tsx +6 -6
  355. package/src/plugins/builtin/research/analyst-headless.ts +5 -5
  356. package/src/plugins/builtin/research/analyst-model.ts +7 -7
  357. package/src/plugins/builtin/research/analyst-pane.tsx +7 -7
  358. package/src/plugins/builtin/research/client.ts +14 -0
  359. package/src/plugins/builtin/research/corporate-actions-pane.tsx +40 -30
  360. package/src/plugins/builtin/research/event-model.ts +55 -22
  361. package/src/plugins/builtin/research/event-sources.ts +26 -8
  362. package/src/plugins/builtin/research/relative-valuation-columns.ts +20 -12
  363. package/src/plugins/builtin/research/relative-valuation-currency.ts +16 -0
  364. package/src/plugins/builtin/research/relative-valuation-headless.ts +33 -21
  365. package/src/plugins/builtin/research/relative-valuation-model.ts +31 -17
  366. package/src/plugins/builtin/research/relative-valuation-pane.tsx +29 -14
  367. package/src/plugins/builtin/research-search/model.ts +2 -1
  368. package/src/plugins/builtin/research-search/saved-view.tsx +4 -3
  369. package/src/plugins/builtin/revenue-breakdown/model.ts +4 -4
  370. package/src/plugins/builtin/reverse-dcf/headless.ts +7 -7
  371. package/src/plugins/builtin/reverse-dcf/model.ts +4 -4
  372. package/src/plugins/builtin/reverse-dcf/pane.tsx +2 -2
  373. package/src/plugins/builtin/scanner/flow-model.ts +7 -4
  374. package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
  375. package/src/plugins/builtin/scanner/headless.ts +3 -2
  376. package/src/plugins/builtin/scanner/hilo-model.ts +2 -1
  377. package/src/plugins/builtin/scanner/live-headless.ts +2 -2
  378. package/src/plugins/builtin/scanner/live-model.ts +3 -2
  379. package/src/plugins/builtin/scanner/live-pane.tsx +5 -5
  380. package/src/plugins/builtin/seasonality/headless.ts +2 -1
  381. package/src/plugins/builtin/seasonality/pane.tsx +4 -3
  382. package/src/plugins/builtin/sec/filing-display.tsx +12 -15
  383. package/src/plugins/builtin/sec/fund-facts.ts +2 -2
  384. package/src/plugins/builtin/sec/headless.ts +2 -1
  385. package/src/plugins/builtin/sec/index.tsx +6 -2
  386. package/src/plugins/builtin/sectors/headless.ts +4 -4
  387. package/src/plugins/builtin/sectors/index.tsx +7 -7
  388. package/src/plugins/builtin/shared/earnings-calendar.ts +90 -6
  389. package/src/plugins/builtin/shared/earnings-report.ts +13 -6
  390. package/src/plugins/builtin/shared/research-cells.tsx +2 -2
  391. package/src/plugins/builtin/shared/source-footer.ts +2 -1
  392. package/src/plugins/builtin/shared/trend.ts +2 -2
  393. package/src/plugins/builtin/shared/use-quote-board.ts +9 -8
  394. package/src/plugins/builtin/short-interest/headless.ts +6 -6
  395. package/src/plugins/builtin/short-interest/model.ts +9 -9
  396. package/src/plugins/builtin/short-interest/publications-model.ts +5 -5
  397. package/src/plugins/builtin/short-interest/publications-pane.tsx +3 -2
  398. package/src/plugins/builtin/short-interest/watch-headless.ts +5 -5
  399. package/src/plugins/builtin/short-interest/watch-pane.tsx +6 -6
  400. package/src/plugins/builtin/short-volume/model.ts +5 -5
  401. package/src/plugins/builtin/short-volume/pane.tsx +4 -4
  402. package/src/plugins/builtin/social-mentions/headless.ts +2 -1
  403. package/src/plugins/builtin/social-mentions/model.ts +4 -4
  404. package/src/plugins/builtin/supply-chain/graph-model.ts +2 -1
  405. package/src/plugins/builtin/supply-chain/graph-pane.tsx +2 -2
  406. package/src/plugins/builtin/supply-chain/headless.ts +3 -2
  407. package/src/plugins/builtin/supply-chain/model.ts +4 -4
  408. package/src/plugins/builtin/supply-chain/pane.tsx +2 -2
  409. package/src/plugins/builtin/supply-chain/row-evidence.tsx +2 -1
  410. package/src/plugins/builtin/themes/headless.ts +2 -1
  411. package/src/plugins/builtin/themes/model.ts +3 -2
  412. package/src/plugins/builtin/themes/pane.tsx +3 -2
  413. package/src/plugins/builtin/thirteenf/format.ts +9 -9
  414. package/src/plugins/builtin/thirteenf/headless.ts +3 -2
  415. package/src/plugins/builtin/thirteenf/model.ts +2 -1
  416. package/src/plugins/builtin/thirteenf/overlap-pane.tsx +2 -1
  417. package/src/plugins/builtin/thirteenf/pane.tsx +5 -4
  418. package/src/plugins/builtin/thirteenf/report-notes.ts +2 -1
  419. package/src/plugins/builtin/thirteenf/signals-pane.tsx +3 -2
  420. package/src/plugins/builtin/thirteenf/table.ts +6 -5
  421. package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -3
  422. package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +4 -4
  423. package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +3 -3
  424. package/src/plugins/builtin/ticker-detail/financials/model.ts +83 -35
  425. package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +3 -1
  426. package/src/plugins/builtin/ticker-detail/financials/ratios.ts +2 -2
  427. package/src/plugins/builtin/ticker-detail/financials/schema.ts +14 -18
  428. package/src/plugins/builtin/ticker-detail/financials/tab.tsx +8 -13
  429. package/src/plugins/builtin/ticker-detail/headless.ts +7 -5
  430. package/src/plugins/builtin/ticker-detail/overview/chart-scale.ts +52 -0
  431. package/src/plugins/builtin/ticker-detail/overview/components.tsx +4 -4
  432. package/src/plugins/builtin/ticker-detail/overview/model.ts +24 -13
  433. package/src/plugins/builtin/ticker-detail/overview/pane.tsx +6 -0
  434. package/src/plugins/builtin/ticker-detail/overview/tax-equivalent.ts +2 -1
  435. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +33 -7
  436. package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +7 -5
  437. package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +4 -4
  438. package/src/plugins/builtin/ticker-detail/settings.ts +17 -0
  439. package/src/plugins/builtin/time-sales/headless.ts +3 -2
  440. package/src/plugins/builtin/time-sales/model.ts +7 -5
  441. package/src/plugins/builtin/time-sales/pane.tsx +7 -6
  442. package/src/plugins/builtin/trace-bonds/model.ts +3 -2
  443. package/src/plugins/builtin/trace-bonds/pane.tsx +3 -2
  444. package/src/plugins/builtin/treasury-auctions/client.ts +2 -1
  445. package/src/plugins/builtin/treasury-auctions/headless.ts +6 -6
  446. package/src/plugins/builtin/treasury-auctions/hk-headless.ts +3 -2
  447. package/src/plugins/builtin/treasury-auctions/hk-view.tsx +10 -9
  448. package/src/plugins/builtin/treasury-auctions/hk.ts +5 -5
  449. package/src/plugins/builtin/treasury-auctions/model.ts +4 -4
  450. package/src/plugins/builtin/treasury-auctions/pane.tsx +18 -18
  451. package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +2 -1
  452. package/src/plugins/builtin/treasury-daily/model.ts +2 -2
  453. package/src/plugins/builtin/vol-surface/events.ts +5 -4
  454. package/src/plugins/builtin/vol-surface/headless.ts +19 -18
  455. package/src/plugins/builtin/vol-surface/heat-grid.tsx +2 -1
  456. package/src/plugins/builtin/vol-surface/pane.tsx +8 -7
  457. package/src/plugins/builtin/vol-surface/stored.ts +2 -1
  458. package/src/plugins/builtin/vol-surface/tables.ts +4 -3
  459. package/src/plugins/builtin/volatility/headless.ts +5 -4
  460. package/src/plugins/builtin/volatility/pane.tsx +6 -6
  461. package/src/plugins/builtin/world-indices/headless.ts +7 -7
  462. package/src/plugins/builtin/world-indices/index.tsx +3 -1
  463. package/src/plugins/builtin/world-venue-map/headless.ts +2 -1
  464. package/src/plugins/builtin/world-venue-map/layered-pane.tsx +2 -1
  465. package/src/plugins/builtin/world-venue-map/layers.ts +3 -2
  466. package/src/plugins/builtin/world-venue-map/use-geo.ts +4 -2
  467. package/src/plugins/builtin/yield-curve/curves.ts +3 -3
  468. package/src/plugins/builtin/yield-curve/headless.ts +7 -6
  469. package/src/plugins/builtin/yield-curve/index.tsx +5 -4
  470. package/src/plugins/builtin/yield-curve/swaps.tsx +2 -1
  471. package/src/portfolio/allocation.ts +5 -5
  472. package/src/portfolio/column-values.ts +47 -41
  473. package/src/portfolio/futures-positions.ts +2 -1
  474. package/src/renderers/electrobun/bun/desktop/backend-requests.ts +7 -1
  475. package/src/renderers/opentui/ui-host.tsx +32 -2
  476. package/src/renderers/share/layout-view.tsx +2 -1
  477. package/src/sources/gloomberb-cloud/news.ts +9 -0
  478. package/src/sources/gloomberb-cloud/normalizers.ts +2 -0
  479. package/src/sources/provider-router/search.ts +15 -10
  480. package/src/state/hooks/inline-tickers.ts +3 -2
  481. package/src/state/hooks/quote-streaming.ts +9 -10
  482. package/src/team/collections-sync.ts +8 -3
  483. package/src/telemetry/usage-counts.ts +26 -0
  484. package/src/tickers/company-name-listing.ts +2 -2
  485. package/src/tickers/company-name.ts +17 -1
  486. package/src/tickers/listing-venues.ts +26 -1
  487. package/src/tickers/renamed-listings.ts +2 -1
  488. package/src/tickers/search/index.ts +19 -0
  489. package/src/tickers/starter-symbols.ts +7 -0
  490. package/src/time-series/fundamentals/statement-fields.ts +11 -14
  491. package/src/time-series/history-acquisition.ts +1 -1
  492. package/src/time-series/log-scale.ts +9 -0
  493. package/src/time-series/reporting.ts +3 -3
  494. package/src/time-series/resolve.ts +6 -4
  495. package/src/time-series/transforms.ts +10 -5
  496. package/src/types/config.ts +9 -0
  497. package/src/types/data-provider.ts +3 -2
  498. package/src/types/financials.ts +15 -0
  499. package/src/types/instrument.ts +6 -0
  500. package/src/types/plugin-panes.ts +1 -1
  501. package/src/types/plugin-reports.ts +8 -0
  502. package/src/utils/datetime-format.ts +74 -33
  503. package/src/utils/financial-statements.ts +39 -15
  504. package/src/utils/format.ts +4 -9
  505. package/src/utils/fundamentals.ts +38 -16
  506. package/src/utils/growth.ts +67 -0
  507. package/src/utils/keyboard.ts +6 -0
  508. package/src/utils/options.ts +1 -1
  509. package/src/utils/report-timing.ts +2 -2
  510. package/src/utils/served-rates.ts +45 -0
  511. package/src/utils/text-wrap.ts +84 -3
  512. package/src/utils/zoned-date-time.ts +47 -22
@@ -9,7 +9,7 @@ import { barCloseSession } from "../../market-data/market/bar-period";
9
9
  import type { EarningsEvent, MarketDataRequestContext, QuoteBatchResult, QuoteSubscriptionTarget, SecFilingItem } from "../../types/data-provider";
10
10
  import { companyDataNotes, type CompanyFrom } from "../../types/company-from";
11
11
  import type { NewsArticle, NewsFeed, NewsQuery } from "../../news/types";
12
- import { newsSummaryLine } from "../../news/news-model";
12
+ import { listedRowHeadline, newsSummaryLine, routineNoticeFields } from "../../news/news-model";
13
13
  import { shortStoryId } from "../../news/story-id";
14
14
  import type {
15
15
  AnalystResearchData,
@@ -33,7 +33,7 @@ import {
33
33
  quoteSessionStateLabel,
34
34
  type ExtendedSession,
35
35
  } from "../../market-data/market/status";
36
- import { formatCompact, formatCurrency, formatDistributionAmount, formatNumber, formatPercent } from "../../utils/format";
36
+ import { MISSING_VALUE, formatCompact, formatCurrency, formatDistributionAmount, formatNumber, formatPercent } from "../../utils/format";
37
37
  import { withCliServices, withMarketData } from "../context";
38
38
  import { isoDate, parsePositiveInt, requireOneArg, takeFlag, takeOption, typedCompanyName } from "./command-utils";
39
39
  import type { BuiltinCliCommandDef } from "../command-options";
@@ -234,7 +234,7 @@ import { DAY_SO_FAR_TEXT, dailyOrLongerBarSize, withSessionBar } from "../../tim
234
234
  import { requestedBarSize } from "../../time-series/bar-spacing";
235
235
  import { isFiniteNumber } from "../../utils/guards";
236
236
  import { exportedFundamentals } from "../../utils/price-earnings";
237
- import { withBankEnterpriseValue } from "../../utils/fundamentals";
237
+ import { withFinancialEnterpriseValue } from "../../utils/fundamentals";
238
238
  import { fundamentalsFreshness, quotesFreshness, rowsFreshness, valuationFreshness } from "../freshness";
239
239
  import { fxPairListing, fxQuoteRateMove, fxQuoteRateObservation, METAL_NAMES, readFxQuoteRate } from "../fx-quote-rate";
240
240
  import { quoteBarNotes } from "../../market-data/quotes/intraday-bar";
@@ -265,6 +265,7 @@ import {
265
265
  import {
266
266
  calendarEventOf,
267
267
  calendarStatus,
268
+ listingDay,
268
269
  newYorkDay,
269
270
  resolveListingEvents,
270
271
  withResolvedEarnings,
@@ -308,7 +309,7 @@ import {
308
309
  analyzeTaxEquivalent, distributionBasis, loadTreasuryTenors, noBondFigures, parseTaxRates, TAX_RATE_HELP_OPTIONS, taxEquivalentJson, type TaxRates,
309
310
  } from "../../market-data/tax-equivalent";
310
311
  import { CBOE_YIELD_INDEX_CLOSE } from "../../plugins/builtin/shared/treasury-cutoffs";
311
- import { earningsCalendarFailure, earningsChoiceNote, earningsDateLabel, isListingAbroad, lastReportedDay, noListingCalendarNote, undatedListingsNote } from "../earnings-calendar";
312
+ import { earningsCalendarFailure, earningsChoiceNote, earningsDateLabel, undatedListingNote } from "../earnings-calendar";
312
313
  import { formatBasisPoints, toBasisPoints } from "../../utils/basis-points";
313
314
  import { isUnservedWithoutReason, notATickerSymbol, providerMissReason } from "../../sources/provider-errors";
314
315
  import { isNetworkFailure } from "../../utils/network-failure";
@@ -1022,6 +1023,8 @@ function newsRows(articles: NewsArticle[]) {
1022
1023
  url: article.url,
1023
1024
  importance: article.importance,
1024
1025
  breaking: article.isBreaking,
1026
+ // A row standing for a company's routine notices (a buy-back's daily ones): how many, since when.
1027
+ ...routineNoticeFields(article),
1025
1028
  }));
1026
1029
  }
1027
1030
 
@@ -1059,16 +1062,16 @@ function analystSummary(data: AnalystResearchData, quote: Quote | null): string
1059
1062
  const mix = formatRecommendationMix(data);
1060
1063
  const entries: Array<[string, string]> = [
1061
1064
  ["Average Target", formatAnalystPrice(target?.average, currency)],
1062
- ["Upside", upside == null ? "-" : formatPercent(upside)],
1063
- ["Upside vs", upside == null ? "-" : formatAnalystReference(reference, currency)],
1065
+ ["Upside", upside == null ? MISSING_VALUE : formatPercent(upside)],
1066
+ ["Upside vs", upside == null ? MISSING_VALUE : formatAnalystReference(reference, currency)],
1064
1067
  ["Low / Median / High", target && [target.low, target.median, target.high].some((value) => value != null)
1065
1068
  ? [target.low, target.median, target.high].map((value) => formatAnalystPrice(value, currency)).join(" / ")
1066
- : "-"],
1069
+ : MISSING_VALUE],
1067
1070
  ["Rating", formatRatingLabel(data.recommendationRating)],
1068
- ["Analysts", analysts == null ? "-" : String(analysts)],
1071
+ ["Analysts", analysts == null ? MISSING_VALUE : String(analysts)],
1069
1072
  ["Mix", mix],
1070
1073
  ];
1071
- const populated = entries.filter(([, value]) => value !== "-");
1074
+ const populated = entries.filter(([, value]) => value !== MISSING_VALUE);
1072
1075
  return populated.length > 0 ? renderStats(populated) : "";
1073
1076
  }
1074
1077
 
@@ -1103,7 +1106,7 @@ function corporateActionRows(data: CorporateActionsData) {
1103
1106
  const earningsCurrency = reportedCurrencies.size === 1 ? [...reportedCurrencies][0] : undefined;
1104
1107
  // To the cent, as ERN and EE show it; a consensus average carries more digits.
1105
1108
  const eps = (value: number | undefined, unit: string | undefined) => (
1106
- value == null || !Number.isFinite(value) ? "-"
1109
+ value == null || !Number.isFinite(value) ? MISSING_VALUE
1107
1110
  : !unit ? formatNumber(value, 2)
1108
1111
  : /^[A-Z]{3}$/.test(unit) ? formatCurrency(value, unit, 2) : `${formatNumber(value, 2)} ${unit}`
1109
1112
  );
@@ -1113,7 +1116,7 @@ function corporateActionRows(data: CorporateActionsData) {
1113
1116
  const quarter = quarterLabel(event.fiscalPeriod);
1114
1117
  const basis = earningsEpsBasis(event.epsBasis);
1115
1118
  // History rows are keyed by fiscal quarter end, upcoming ones by announcement date.
1116
- const note = [event.dateType === "fiscal-period-end" ? "period end" : null, quarter === "-" ? null : quarter].filter(Boolean).join(", ");
1119
+ const note = [event.dateType === "fiscal-period-end" ? "period end" : null, quarter === MISSING_VALUE ? null : quarter].filter(Boolean).join(", ");
1117
1120
  return {
1118
1121
  type: "earnings",
1119
1122
  date: event.date,
@@ -1313,7 +1316,9 @@ async function runQuote(rawArgs: string[], ctx: Parameters<CliCommandDef["execut
1313
1316
  // quote can fail where its history still says when it stopped (FRC), and an unreachable service fails it at once.
1314
1317
  // The service's "not a ticker" for a bare symbol says no listing anywhere carries it, so no bars or search row
1315
1318
  // would say it stopped: a symbol it knows from before answers its last quote or no data, never that.
1316
- const lastTraded = await Promise.all(answers.map(async ({ result, listing }) => !result.quote && answers.length <= MAX_CHOICE_LOOKUPS
1319
+ // A symbol several companies list asks which, whatever line of it once stopped (MBG: Mercedes-Benz on Xetra, MB Gold on ASX).
1320
+ const lastTraded = await Promise.all(answers.map(async ({ result, listing, failure }) => !result.quote && !failure?.choose
1321
+ && answers.length <= MAX_CHOICE_LOOKUPS
1317
1322
  && (listing.exchange || !isNotATickerMessage(errorMessage(result.error)))
1318
1323
  ? await loadNoQuoteLastTraded(listing.request, market.dataProvider, now) ?? await searchedDelisting(listing, market)
1319
1324
  : null));
@@ -2297,6 +2302,8 @@ const HISTORY_FLAG_TEXT_COLUMN: CliResultColumn = {
2297
2302
  row.partial ? cliStyles.muted("partial") : "",
2298
2303
  row.filled ? cliStyles.muted("filled") : "",
2299
2304
  row.unsettled ? cliStyles.muted("unsettled") : "",
2305
+ row.sessionClose ? cliStyles.muted("close") : "",
2306
+ row.beforeClose ? cliStyles.muted("before close") : "",
2300
2307
  row.roll && typeof row.contract === "string" ? cliStyles.muted(`roll to ${row.contract}`) : "",
2301
2308
  row.thin ? cliStyles.muted("thin") : "",
2302
2309
  row.settleOnly ? cliStyles.muted("settle only") : "",
@@ -2974,7 +2981,7 @@ async function runFinancials(rawArgs: string[], ctx: Parameters<CliCommandDef["e
2974
2981
  } : {},
2975
2982
  // A bank's EV and EV/revenue are null with why: n/m for banks.
2976
2983
  fundamentals: priced.fundamentals && exportedDividendFundamentals(
2977
- exportedFundamentals(withBankEnterpriseValue(priced.fundamentals, priced.profile))!, report.distributions),
2984
+ exportedFundamentals(withFinancialEnterpriseValue(priced.fundamentals, priced.profile))!, report.distributions),
2978
2985
  // A bond fund's sponsor figures; fundamentals.dividendYield is then its distribution yield, not its SEC yield.
2979
2986
  ...bond ? { bondFund: bond } : {},
2980
2987
  ...view === "fundamentals" ? { statementFilings, bank: bank.bank, ...bank.note ? { bankNote: bank.note } : {} } : {},
@@ -3044,13 +3051,21 @@ const NEWS_COLUMNS = [
3044
3051
  format: (value: unknown) => typeof value === "string" ? formatUtcTime(value) : "",
3045
3052
  },
3046
3053
  { key: "source", header: "Source" },
3047
- { key: "title", header: "Title" },
3054
+ // "Transaction in own shares (8 notices since 30 Oct)" for a folded row; exports keep the title and the count apart.
3055
+ { key: "title", header: "Title", format: listedRowHeadline },
3048
3056
  { key: "tickers", header: "Tickers" },
3049
3057
  // The short id `fn news-story-pane` opens the story by; exports keep the whole id.
3050
3058
  { key: "id", header: "ID", format: (value: unknown) => typeof value === "string" ? shortStoryId(value) : "" },
3051
3059
  { key: "url", header: "URL", optional: true },
3052
3060
  ];
3053
3061
 
3062
+ /** CSV's columns: the text table's, and how many routine notices a folded row stands for and since when. */
3063
+ const NEWS_EXPORT_COLUMNS = [
3064
+ ...NEWS_COLUMNS,
3065
+ { key: "routineNotices", header: "Routine notices" },
3066
+ { key: "routineSince", header: "Routine since" },
3067
+ ];
3068
+
3054
3069
  /**
3055
3070
  * A story's summary under its row, on one line, cut to the width (`rowNote`): the figure a headline leaves out.
3056
3071
  * None for a summary that only repeats the headline; exports keep the summary whole.
@@ -3096,7 +3111,8 @@ async function printNewsSearch(
3096
3111
  }, {
3097
3112
  heading: newsSearchHeading(text, [reason, closestReason].filter(Boolean).join(" · ") || undefined),
3098
3113
  rows: newsRows,
3099
- columns: NEWS_COLUMNS,
3114
+ columns: NEWS_EXPORT_COLUMNS,
3115
+ textColumns: NEWS_COLUMNS,
3100
3116
  rowNote: newsRowNote,
3101
3117
  empty: named ? noStoriesMessage(text, route) : empty ?? (searched ? noStoriesMessage(text, null) : "No stories to show."),
3102
3118
  ...(listing ? { footnote: listing.note } : {}),
@@ -3141,7 +3157,8 @@ async function printMetalNews(route: MetalNewsRoute, limit: number, ctx: Paramet
3141
3157
  }, {
3142
3158
  heading: metalNewsHeading(route),
3143
3159
  rows: newsRows,
3144
- columns: NEWS_COLUMNS,
3160
+ columns: NEWS_EXPORT_COLUMNS,
3161
+ textColumns: NEWS_COLUMNS,
3145
3162
  rowNote: newsRowNote,
3146
3163
  empty: failure === undefined ? noMetalStoriesMessage(route) : "No stories to show.",
3147
3164
  ...(ticker ? { footnote: `${word} ${cliArrow("→")} ${route.metal}'s market news. For ${ticker.name ?? ticker.symbol} (ticker ${ticker.symbol}), try: ${companyNews}` } : {}),
@@ -3289,7 +3306,8 @@ async function runNews(rawArgs: string[], ctx: Parameters<CliCommandDef["execute
3289
3306
  }, {
3290
3307
  ...(identity ? { heading: listingHeading(identity) } : {}),
3291
3308
  rows: newsRows,
3292
- columns: NEWS_COLUMNS,
3309
+ columns: NEWS_EXPORT_COLUMNS,
3310
+ textColumns: NEWS_COLUMNS,
3293
3311
  rowNote: newsRowNote,
3294
3312
  ...(empty ? { empty } : {}),
3295
3313
  ...(wordHint ? { footnote: wordHint } : {}),
@@ -4628,35 +4646,36 @@ async function runEarnings(rawArgs: string[], ctx: Parameters<CliCommandDef["exe
4628
4646
  }
4629
4647
  // Each date is resolved as events, EE, ERN and OSA resolve it: one that has come is read against the
4630
4648
  // company's quarters on record, for its actual and the next report on record (shared/earnings-calendar).
4631
- const today = newYorkDay();
4649
+ // A date is read on its listing's own day: SIE:XETRA's 12 Nov report has passed on Berlin's Friday.
4650
+ const now = Date.now();
4651
+ const today = newYorkDay(now);
4652
+ const dayOf = (listing: CliListing) => listingDay(listing.request.exchange || listing.exchange, now);
4632
4653
  const resolved = await resolveListingEvents(services.dataProvider, listings.map((listing) => ({
4633
- key: listing.key, symbol: listing.request.symbol, exchange: listing.request.exchange,
4654
+ key: listing.key, symbol: listing.request.symbol, exchange: listing.request.exchange, today: dayOf(listing),
4634
4655
  })), calendar, today);
4635
4656
  const events: ResolvedEarningsEvent[] = calendar
4636
- .map((event) => resolved.get(event.symbol.toUpperCase()) ?? { ...event, dateStatus: calendarStatus(event, today) })
4657
+ .map((event) => {
4658
+ const listing = listings.find((entry) => entry.key.toUpperCase() === event.symbol.toUpperCase());
4659
+ return resolved.get(event.symbol.toUpperCase()) ?? { ...event, dateStatus: calendarStatus(event, listing ? dayOf(listing) : today) };
4660
+ })
4637
4661
  .sort((left, right) => left.earningsDate.getTime() - right.earningsDate.getTime());
4638
4662
  const eventOf = (listing: CliListing) => events.find((event) => event.symbol.toUpperCase() === listing.key.toUpperCase());
4639
- const [abroadNotes, choiceNotes] = await Promise.all([
4640
- // A listing abroad with no date of its own says so, with its US line's date when that line is the same company.
4641
- Promise.all(listings.filter((listing) => isListingAbroad(listing) && !eventOf(listing))
4642
- .map((listing) => noListingCalendarNote(listing, services))),
4663
+ // A listing the calendar has no date for is named, with when it last reported and where its headlines are: a
4664
+ // list never drops a symbol unsaid. Each costs reads, so a long list names the rest without them.
4665
+ const undatedListings = listings.filter((listing) => !eventOf(listing));
4666
+ const [undatedNotes, choiceNotes] = await Promise.all([
4667
+ Promise.all(undatedListings.map((listing, index) => undatedListingNote(listing, services, { now, lookup: index < MAX_CHOICE_LOOKUPS }))),
4643
4668
  Promise.all(listings.map(async (listing) => {
4644
4669
  const listed = venues.get(listing);
4645
4670
  return listed ? earningsChoiceNote(listing, eventOf(listing), await listed) : null;
4646
4671
  })),
4647
4672
  ]);
4648
- // A listing at home the calendar has no date for is named as well, with when it last reported: a list never
4649
- // drops a symbol unsaid.
4650
- const homeUndated = listings.filter((listing) => !isListingAbroad(listing) && !eventOf(listing));
4651
- const lastReported = new Map(await Promise.all(homeUndated.slice(0, MAX_CHOICE_LOOKUPS)
4652
- .map(async (listing) => [listing.key, await lastReportedDay(services.dataProvider, listing, today)] as const)));
4653
- const undated = undatedListingsNote(homeUndated, lastReported);
4654
- const noCalendar = [...abroadNotes, ...undated ? [undated] : []].join("\n");
4673
+ const noCalendar = undatedNotes.join("\n");
4655
4674
  // Text prints the listings without a calendar under the table; other formats carry them as warnings.
4656
4675
  const warnings = [
4657
4676
  ...listings.flatMap(listingReadNotes),
4658
4677
  ...choiceNotes.filter((note): note is string => !!note),
4659
- ...ctx.cliOptions.format === "text" ? [] : [...abroadNotes, ...undated ? undated.split("\n") : []],
4678
+ ...ctx.cliOptions.format === "text" ? [] : undatedNotes,
4660
4679
  ];
4661
4680
  ctx.printResult({
4662
4681
  data: events,
@@ -5,7 +5,7 @@ import type { CliCommandDef } from "../../types/plugin";
5
5
  import { withCliServices, withConfigData, withMarketData } from "../context";
6
6
  import { CLI_ERROR_CODE, failWithFields } from "../errors";
7
7
  import type { CliResultColumn } from "../result";
8
- import { formatCompact } from "../../utils/format";
8
+ import { MISSING_VALUE, formatCompact } from "../../utils/format";
9
9
  import { DATE_OPTION_EXAMPLES, DATE_OPTION_FORMATS, dateOptionError, readCalendarDate } from "../../utils/calendar-date";
10
10
  import {
11
11
  fetchPreferredMarketMovers,
@@ -997,12 +997,12 @@ async function runYieldCurve(rawArgs: string[], ctx: Parameters<CliCommandDef["e
997
997
  ...(closedDay ? { footnote: closedDay, exportNotes: [closedDay] } : {}),
998
998
  textColumns: [
999
999
  { key: "tenor", header: "Tenor", value: (row) => YIELD_TENORS[String(row.seriesId)] ?? row.seriesId },
1000
- { key: "value", header: "Yield %", align: "right", format: (value) => typeof value === "number" ? value.toFixed(2) : "-" },
1000
+ { key: "value", header: "Yield %", align: "right", format: (value) => typeof value === "number" ? value.toFixed(2) : MISSING_VALUE },
1001
1001
  {
1002
1002
  key: "changeBasisPoints",
1003
1003
  header: "1D bp",
1004
1004
  align: "right",
1005
- format: (value) => typeof value === "number" ? formatBasisPoints(value / 100, 1) : "-",
1005
+ format: (value) => typeof value === "number" ? formatBasisPoints(value / 100, 1) : MISSING_VALUE,
1006
1006
  },
1007
1007
  { key: "date", header: "Date" },
1008
1008
  { key: "seriesId", header: "Series" },
@@ -36,7 +36,8 @@ import { isTitleCaseWord, readBrokerIndexCode } from "../listing-arg";
36
36
  import { knownGapMessage, commandPointer } from "../known-gaps";
37
37
  import { instrumentTypeLabel } from "../../tickers/instrument-kind";
38
38
  import { canonicalExchange, isKnownExchangeCode, isUsListingExchange } from "../../utils/exchanges";
39
- import { addedCompanyWords, companyLines, companyNameExtraWords, groupByCompany, namedByService, sameCompany } from "../../tickers/company-name";
39
+ import { addedCompanyWords, companyLines, companyNameExtraWords, groupByCompany, namedByService, sameCompany, sameCompanyName } from "../../tickers/company-name";
40
+ import { isDebtLine } from "../../tickers/company-name-listing";
40
41
  import { isLowQualityTickerName } from "../../tickers/search/result";
41
42
  import { findCatalogSeries, renderSeriesMatches, type SeriesMatch } from "../series-search";
42
43
  import { centralBankAskedAbout, centralBankCiting, type CentralBank } from "../../utils/central-banks";
@@ -139,7 +140,7 @@ export async function searchCandidatesForCli({
139
140
  // A word written as a name (`Aeon`) whose company search leads with keeps it first, as `quote Aeon` reads it.
140
141
  const named = leadsWithNamedCompany(trimmedQuery, candidates, quote);
141
142
  const ordered = withQuotedNames(symbol, withUsLineOfPrimary(withHomeListingPrimary(trimmedQuery, withPrimaryListingFirst(symbol, candidates, named ? null : quote))), quote);
142
- return withOtherCompaniesApart(ordered, named ? trimmedQuery : null).slice(0, totalLimit);
143
+ return cutKeepingCompanies(withOtherCompaniesApart(ordered, named ? trimmedQuery : null), totalLimit, symbol);
143
144
  } catch (error) {
144
145
  // Not "No matches found": a script or a reader would take that for a name nothing lists.
145
146
  if (isProviderBusy(error)) failRetryable(SEARCH_BUSY_MESSAGE, SEARCH_BUSY_CODE);
@@ -272,6 +273,43 @@ function formerIssuerNotes(candidates: readonly TickerSearchCandidate[], fate: S
272
273
  /** A query that is a bare symbol (CAR, BRK.B), not a name or a phrase. */
273
274
  const BARE_SYMBOL = /^[A-Z0-9][A-Z0-9.\-]{0,11}$/;
274
275
 
276
+ /**
277
+ * Whether two lines are one company's: by the data service's company ids when
278
+ * both carry one (DHL Group AG on Xetra and Deutsche Post AG in Vienna), else
279
+ * by their names, or by a name one's company is known by besides its own.
280
+ */
281
+ function sameSearchCompany(left: TickerSearchCandidate, right: TickerSearchCandidate): boolean {
282
+ const ids = [left.result?.companyId, right.result?.companyId];
283
+ if (ids[0] && ids[1]) return ids[0] === ids[1];
284
+ if (sameCompany(resolveSearchName(left), resolveSearchName(right))) return true;
285
+ // A line with no id named as the other's company is known besides (a former name the service sends on its rows).
286
+ const knownAs = (known: TickerSearchCandidate, line: TickerSearchCandidate) => !!known.result?.companyId
287
+ && [...known.nameAliases ?? [], known.result.formerName].some((name) => sameCompanyName(name, resolveSearchName(line)));
288
+ return knownAs(left, right) || knownAs(right, left);
289
+ }
290
+
291
+ /**
292
+ * The companies whose lines `candidates` are, each in search order: lines
293
+ * with one company id together, then each line without one with the company
294
+ * of a line it is named like (Deutsche Post AG in Hanover with DHL Group's
295
+ * Vienna line of that name), else a company of its own. A line named nothing
296
+ * is no company's.
297
+ */
298
+ function searchCompanies(candidates: readonly TickerSearchCandidate[]): TickerSearchCandidate[][] {
299
+ const groups: TickerSearchCandidate[][] = [];
300
+ const place = (candidate: TickerSearchCandidate) => {
301
+ const group = groups.find((members) => members.some((member) => sameSearchCompany(member, candidate)));
302
+ if (group) group.push(candidate);
303
+ else groups.push([candidate]);
304
+ };
305
+ const identified = candidates.filter((candidate) => candidate.result?.companyId);
306
+ identified.forEach(place);
307
+ groupByCompany(candidates.filter((candidate) => !identified.includes(candidate)), resolveSearchName).flat().forEach(place);
308
+ const order = (candidate: TickerSearchCandidate) => candidates.indexOf(candidate);
309
+ return groups.map((group) => group.sort((left, right) => order(left) - order(right)))
310
+ .sort((left, right) => order(left[0]!) - order(right[0]!));
311
+ }
312
+
275
313
  /**
276
314
  * For a bare symbol several companies list (CAR: Avis, Carrefour, CAR Group),
277
315
  * the company of the listing `quote CAR` reads goes first, under its home
@@ -289,10 +327,16 @@ function withPrimaryListingFirst(
289
327
  const exact = candidates.filter((candidate) => candidate.symbol.toUpperCase() === symbol);
290
328
  if (exact.some((candidate) => candidate.kind === "ticker" || candidate.saved)) return candidates;
291
329
  const listed = exact.filter((candidate) => candidate.kind === "search" && (candidate.instrumentClass === "equity" || candidate.instrumentClass === "other"));
292
- const companies = groupByCompany(listed, resolveSearchName);
293
- if (companies.length < 2) return candidates;
294
- const quoted = quotedCandidate(listed, quote);
295
- if (!quoted) return candidates;
330
+ const companies = searchCompanies(listed);
331
+ if (companies.length < 2) return withHomeLineFirst(candidates, listed);
332
+ const read = quotedCandidate(listed, quote);
333
+ if (!read) return candidates;
334
+ // A debt or preferred line never leads where another company's common share has its home line under the symbol, as
335
+ // the bare symbol reads: DTG is Daimler Truck on Xetra, not DTE Energy's debentures in New York.
336
+ // An equity line alone: a fund, whatever its name, is no debt line (TIP, the iShares TIPS Bond ETF).
337
+ const debt = (candidate: TickerSearchCandidate) => candidate.instrumentClass === "equity"
338
+ && isDebtLine(candidate.result?.type ?? "", candidate.result?.name);
339
+ const quoted = debt(read) ? listed.find((candidate) => candidate.result?.homeListing === true && !debt(candidate)) ?? read : read;
296
340
  // That company leads with its home line where it lists one under the symbol too (TD on TSX before NYSE).
297
341
  const primary = companies.find((group) => group.includes(quoted))?.find((candidate) => candidate.result?.homeListing === true) ?? quoted;
298
342
  const firsts = companies.filter((group) => !group.includes(primary)).map((group) => group[0]!);
@@ -306,6 +350,20 @@ function withPrimaryListingFirst(
306
350
  ));
307
351
  }
308
352
 
353
+ /**
354
+ * One company's lines of a symbol lead with the one the service marks as its
355
+ * home, never a thin secondary line search ranked first: DHL is DHL Group's
356
+ * Xetra line, not the Vienna one.
357
+ */
358
+ function withHomeLineFirst(candidates: TickerSearchCandidate[], listed: readonly TickerSearchCandidate[]): TickerSearchCandidate[] {
359
+ const home = listed.find((candidate) => candidate.result?.homeListing === true);
360
+ const lead = candidates.find((candidate) => candidate.category === "Primary Listing");
361
+ if (!home || !lead || home === lead || !listed.includes(lead)) return candidates;
362
+ const rest = candidates.filter((candidate) => candidate !== home);
363
+ const at = rest.indexOf(lead);
364
+ return [...rest.slice(0, at), { ...home, category: "Primary Listing" as const }, { ...lead, category: "Other Listings" as const }, ...rest.slice(at + 1)];
365
+ }
366
+
309
367
  /**
310
368
  * Whether a word written as a company's name (`Aeon`) leads search with the
311
369
  * home line of the company named that word (Aeon Co., Ltd.'s 8267 on JPX)
@@ -398,7 +456,7 @@ function withQuotedNames(symbol: string, candidates: TickerSearchCandidate[], qu
398
456
  const onVenue = quotedCandidate(exact, quote);
399
457
  const name = onVenue ? quotedListingName(candidateExchange(onVenue), quote) : null;
400
458
  if (!onVenue || !name) return candidates;
401
- const company = groupByCompany(exact, resolveSearchName).find((group) => group.includes(onVenue)) ?? [onVenue];
459
+ const company = searchCompanies(exact).find((group) => group.includes(onVenue)) ?? [onVenue];
402
460
  return candidates.map((candidate) => {
403
461
  if (!company.includes(candidate) || resolveSearchName(candidate) === name) return candidate;
404
462
  const [, ...rest] = candidate.detail.split(" | ");
@@ -428,7 +486,12 @@ function withOtherCompaniesApart(candidates: TickerSearchCandidate[], namedWord:
428
486
  ?? (lead?.category === "Saved" && lead.instrumentClass === "equity" ? lead : undefined);
429
487
  // A primary line search names no company for gives nothing to tell its company's lines by.
430
488
  if (!primary || nameless(primary)) return candidates;
431
- const names = [resolveSearchName(primary), primary.result?.formerName, ...primary.nameAliases ?? []];
489
+ // The company ids decide where the primary and a line both carry one; the names of the primary's identified lines
490
+ // (Deutsche Post AG, its Vienna line) are its names for a line without one.
491
+ const id = primary.result?.companyId;
492
+ const sameId = (candidate: TickerSearchCandidate) => !!id && candidate.result?.companyId === id;
493
+ const names = [resolveSearchName(primary), primary.result?.formerName, ...primary.nameAliases ?? [],
494
+ ...candidates.filter(sameId).map(resolveSearchName)];
432
495
  // A name with more words that another business goes by is not the primary's (`companyLines`): Mitsubishi UFJ
433
496
  // Financial Group, which lists in Tokyo beside Mitsubishi Corporation, is not one of its lines.
434
497
  const lines = new Set(companyLines(primary, candidates.filter((candidate) => candidate === primary || (candidate.kind === "search"
@@ -444,7 +507,8 @@ function withOtherCompaniesApart(candidates: TickerSearchCandidate[], namedWord:
444
507
  const otherLeads = new Set(elsewhere.map((candidate) => addedCompanyWords(resolveSearchName(candidate), primaryName)[0]).filter(Boolean));
445
508
  const anotherBusiness = (candidate: TickerSearchCandidate) => elsewhere.includes(candidate)
446
509
  || otherLeads.has(addedCompanyWords(resolveSearchName(candidate), primaryName)[0] ?? "");
447
- const ownLine = (candidate: TickerSearchCandidate) => nameless(candidate)
510
+ const ownLine = (candidate: TickerSearchCandidate) => id && candidate.result?.companyId ? sameId(candidate)
511
+ : nameless(candidate)
448
512
  ? baseSymbol(candidate.symbol) === baseSymbol(primary.symbol)
449
513
  : names.some((company) => sameCompany(resolveSearchName(candidate), company))
450
514
  && !anotherBusiness(candidate)
@@ -457,6 +521,33 @@ function withOtherCompaniesApart(candidates: TickerSearchCandidate[], namedWord:
457
521
  return [...kept.slice(0, at), ...apart, ...kept.slice(at)];
458
522
  }
459
523
 
524
+ /**
525
+ * The first `limit` rows, with each other company's first line of the symbol
526
+ * kept in place of the primary company's last venues: `search DTG` lists
527
+ * Daimler Truck's lines and still DTE Energy's debenture. Only a line of
528
+ * another company (`searchCompanies`, by id where both carry one) takes a
529
+ * venue's place: never one of the primary company's own lines named as it
530
+ * was (Deutsche Post AG for DHL Group).
531
+ */
532
+ function cutKeepingCompanies(candidates: TickerSearchCandidate[], limit: number, symbol: string): TickerSearchCandidate[] {
533
+ const head = candidates.slice(0, limit);
534
+ if (candidates.length <= limit || !BARE_SYMBOL.test(symbol)) return head;
535
+ // Each company of the symbol shown above the cut, its own lines and its lines named as it was among them.
536
+ const companies = searchCompanies(candidates.filter((candidate) => candidate.symbol.toUpperCase() === symbol));
537
+ const shown = new Set(head.flatMap((candidate) => companies.filter((group) => group.includes(candidate))));
538
+ const missing = companies.filter((group) => !shown.has(group))
539
+ .flatMap((group) => group.find((candidate) => candidate.category === "Other Matches") ?? []);
540
+ const venues = head.filter((candidate) => candidate.category === "Other Listings");
541
+ // The primary company keeps at least one other venue.
542
+ const room = Math.min(missing.length, Math.max(0, venues.length - 1));
543
+ if (room === 0) return head;
544
+ const dropped = new Set(venues.slice(-room));
545
+ const kept = head.filter((candidate) => !dropped.has(candidate));
546
+ const at = kept.findLastIndex((candidate) => candidate.category === "Other Listings" || candidate.category === "Other Matches"
547
+ || candidate.category === "Primary Listing") + 1;
548
+ return [...kept.slice(0, at), ...missing.slice(0, room), ...kept.slice(at)];
549
+ }
550
+
460
551
  /** "Saved", or the broker a row came from; never the data service's internal id. */
461
552
  function searchSourceLabel(candidate: TickerSearchCandidate): string {
462
553
  return isSavedCandidate(candidate) ? "Saved" : candidate.result?.brokerLabel || "";
@@ -522,6 +613,9 @@ function searchCandidateRows(candidates: TickerSearchCandidate[]) {
522
613
  source: searchSourceLabel(candidate),
523
614
  providerId: candidate.result?.providerId ?? "",
524
615
  saved: isSavedCandidate(candidate),
616
+ // The company the data service identifies the line as one of: lines with one id are one company, whatever each venue names it.
617
+ ...typeof candidate.result?.companyId === "string" && candidate.result.companyId
618
+ ? { companyId: candidate.result.companyId } : {},
525
619
  // The company that merged into this one, whose old name the query is.
526
620
  ...candidate.result?.formerIssuer ? { formerIssuer: candidate.result.formerIssuer } : {},
527
621
  // The name a renamed company had, which the query is.
@@ -3,13 +3,15 @@ import { ebitdaLacksDepreciation } from "../../utils/ebitda";
3
3
  import { formatShortDate, parseDisplayDate } from "../../utils/datetime-format";
4
4
  import { formatReportedMoney, REPORTING_CURRENCY_NOT_SOURCED } from "../../utils/reported-money";
5
5
  import {
6
- appTtmRate, BANK_ENTERPRISE_VALUE, computedEnterpriseValueNote, convertedPriceEarningsNote, enterpriseValueLabel,
6
+ appTtmRate, computedEnterpriseValueNote, convertedPriceEarningsNote, enterpriseValueLabel,
7
7
  enterpriseValueReconciliationNote,
8
- epsConversionNote, fundamentalsCurrency, isBankEnterpriseValue, reportedEnterpriseValue, trailingEpsFiscalYear, trailingEpsSourceNote, ttmAtAppRate, ttmConversionNote,
9
- withBankEnterpriseValue,
8
+ epsConversionNote, financialEnterpriseValue, fundamentalsCurrency, isFinancialEnterpriseValueReason, reportedEnterpriseValue, trailingEpsFiscalYear, trailingEpsSourceNote, ttmAtAppRate, ttmConversionNote,
9
+ withFinancialEnterpriseValue,
10
10
  } from "../../utils/fundamentals";
11
11
  import { latestFinancialPeriod } from "../../utils/latest-financial-period";
12
12
  import { halfYearGrowthPeriod } from "../../utils/financial-statements";
13
+ import { servedRatesNotMeaningful, type ServedRate } from "../../utils/served-rates";
14
+ import { NOT_MEANINGFUL_TEXT } from "../../utils/growth";
13
15
  import { burnsCash, cashRunway, SHORT_RUNWAY_HISTORY, formatRunwayMonths, offeringNote, offeringsAfter, runwayMethod, type CashRunway, type OfferingFiling, type RunwayEstimate } from "../../utils/cash-runway";
14
16
  import { exportedFundamentals, formatPriceEarnings, forwardFiscalYear, NOT_MEANINGFUL, priceEarningsOnEarnings } from "../../utils/price-earnings";
15
17
  import { describeFundamentalMarketCap, marketCapBasisNote, selectMarketCapitalization, viewMarketCapitalization, withheldMarketCap } from "../../utils/market-capitalization";
@@ -645,8 +647,9 @@ function unsourcedCurrencyNote(metrics: readonly FundamentalsMetric[]): string |
645
647
  * a loss is.
646
648
  */
647
649
  function enterpriseValueFigure(figure: MetricFigure, fundamentals: TickerFinancials["fundamentals"]): MetricFigure {
648
- // A bank's: its deposits are funding, not debt.
649
- if (isBankEnterpriseValue(fundamentals)) return { text: BANK_ENTERPRISE_VALUE, value: "N/M", unit: figure.unit };
650
+ // A bank's, an insurer's or a broker's: its deposits, float or repos are funding, not debt.
651
+ const financial = financialEnterpriseValue(fundamentals);
652
+ if (financial) return { text: financial, value: "N/M", unit: figure.unit };
650
653
  const label = enterpriseValueLabel(fundamentals);
651
654
  if (label === "not-meaningful") return { ...multipleFigure(NOT_MEANINGFUL), unit: figure.unit };
652
655
  // A withdrawn EV the bridge stands in for shows the bridge (listingEnterpriseView).
@@ -871,13 +874,19 @@ function fundamentalsMetrics(
871
874
  epsYear?: string,
872
875
  /** A half-year reporter's latest period growth compares halves, not quarters: "H1 2026 vs H1 2025" (halfYearGrowthPeriod). */
873
876
  growthPeriod?: string | null,
877
+ /** Why a served margin or revenue growth is N/M (servedRatesNotMeaningful), as DES and RV read it. */
878
+ notMeaningful: Partial<Record<ServedRate, string>> = {},
874
879
  ): FundamentalsMetric[] {
875
880
  const signed = (value: number) => colorBySign(formatPercent(value), value);
881
+ // N/M where the source's figure is a number that says nothing: a margin over revenue at or below zero, growth off it.
882
+ // The value is null, as an export's column of figures holds only numbers; the text says N/M.
883
+ const rate = (key: ServedRate, format: (value: number) => string): MetricFigure => notMeaningful[key] && fundamentals?.[key] != null
884
+ ? { text: NOT_MEANINGFUL_TEXT, value: null, unit: "%" } : percentFigure(fundamentals?.[key], format);
876
885
  const receipt = fundamentals?.sharesOutstanding != null && sharesOutstandingInReceipts(quote, fundamentals, profile?.description);
877
886
  const withdrawn = fundamentals?.notMeaningful ?? {};
878
887
  return [
879
888
  { label: "Market Cap", ...marketCap },
880
- { label: "Enterprise Value", ...enterpriseValueFigure(enterpriseValue, withBankEnterpriseValue(fundamentals, profile)) },
889
+ { label: "Enterprise Value", ...enterpriseValueFigure(enterpriseValue, withFinancialEnterpriseValue(fundamentals, profile)) },
881
890
  // A multiple over a loss is N/M, even beside a positive one the source served from an older period, and so is one
882
891
  // withdrawn as no multiple of the share (a warrant's, an EPS that is not net income over the shares; share-multiples).
883
892
  { label: epsYear ? `P/E ${epsYear}` : "P/E (TTM)", ...multipleFigure(withdrawn.trailingPE ? NOT_MEANINGFUL : priceEarningsOnEarnings(fundamentals?.trailingPE, fundamentals?.eps)) },
@@ -900,10 +909,10 @@ function fundamentalsMetrics(
900
909
  { label: "Operating Cash Flow (TTM)", ...reportedMoney(fundamentals?.operatingCashFlow, reportingCurrency) },
901
910
  { label: "Free Cash Flow (TTM)", ...reportedMoney(fundamentals?.freeCashFlow, reportingCurrency) },
902
911
  // Levels, not changes, so they carry no sign.
903
- { label: "Operating Margin", ...percentFigure(fundamentals?.operatingMargin, formatFractionPercentCell) },
904
- { label: "Profit Margin", ...percentFigure(fundamentals?.profitMargin, formatFractionPercentCell) },
905
- { label: "Revenue Growth", ...percentFigure(fundamentals?.revenueGrowth, signed) },
906
- { label: growthPeriod ? `Revenue ${growthPeriod}` : "Last Quarter Growth", ...percentFigure(fundamentals?.lastQuarterGrowth, signed) },
912
+ { label: "Operating Margin", ...rate("operatingMargin", formatFractionPercentCell) },
913
+ { label: "Profit Margin", ...rate("profitMargin", formatFractionPercentCell) },
914
+ { label: "Revenue Growth", ...rate("revenueGrowth", signed) },
915
+ { label: growthPeriod ? `Revenue ${growthPeriod}` : "Last Quarter Growth", ...rate("lastQuarterGrowth", signed) },
907
916
  { label: "1Y Return", ...percentFigure(priceReturns.return1Y, signed) },
908
917
  { label: "3Y Return", ...percentFigure(priceReturns.return3Y, signed) },
909
918
  {
@@ -1003,7 +1012,7 @@ function fundamentalsNotes(
1003
1012
  // A bank's EV line says why it is n/m.
1004
1013
  const bridged = metrics.some((metric) => metric.label === "Enterprise Value" && typeof metric.value === "number")
1005
1014
  && enterpriseValueLabel(fundamentals) === "unavailable";
1006
- const enterpriseValue = shown("Enterprise Value") && !metrics.some((metric) => metric.text === BANK_ENTERPRISE_VALUE)
1015
+ const enterpriseValue = shown("Enterprise Value") && !metrics.some((metric) => isFinancialEnterpriseValueReason(metric.text))
1007
1016
  ? bridged ? listingNote : [enterpriseValueReconciliationNote(fundamentals, enterpriseValueCurrency(priced.quote, fundamentals), priced)
1008
1017
  ?? computedEnterpriseValueNote(fundamentals), listingNote].filter(Boolean).join(" ") || undefined
1009
1018
  : undefined;
@@ -1156,7 +1165,7 @@ function fundamentalsReportMetrics(snapshot: FundamentalsReportData, view: "fund
1156
1165
  : { text: "—" };
1157
1166
  const metrics = withoutStockRows(fundamentalsMetrics(quote, fundamentals, financials.profile, marketCap, computeTickerPriceReturns(financials),
1158
1167
  fundamentalsCurrency(financials), listingEnterpriseView(snapshot).figure, snapshot.distributions ?? null, snapshot.bondFund ?? null, snapshot.currencyCodes === true,
1159
- trailingEpsFiscalYear(financials), halfYearGrowthPeriod(financials)),
1168
+ trailingEpsFiscalYear(financials), halfYearGrowthPeriod(financials), servedRatesNotMeaningful(fundamentals, financials)),
1160
1169
  resolveTickerInstrumentKind(null, financials) === "fund");
1161
1170
  if (view === "fundamentals") {
1162
1171
  return [...metrics, ...floatAndShortInterestMetrics(quote, fundamentals, financials.profile)]
@@ -1517,7 +1526,7 @@ export async function buildTickerReport({
1517
1526
  const listing = { listedSince: ipo ? ipo.deal.listingDate ?? ipo.deal.firstDay?.session ?? null : null };
1518
1527
  const metrics = withoutStockRows(fundamentalsMetrics(quote, priced.fundamentals, profile, { text: marketCapText }, priceReturns,
1519
1528
  fundamentalsCurrency(financials, listing), { text: enterpriseValueText, ...listingEv.value != null ? { value: listingEv.value } : {} }, distributions, bondFund, codes, trailingEpsFiscalYear(financials),
1520
- halfYearGrowthPeriod(financials)), isFund);
1529
+ halfYearGrowthPeriod(financials), servedRatesNotMeaningful(priced.fundamentals, financials)), isFund);
1521
1530
  const reportedCurrency = financials.financialCurrency?.trim();
1522
1531
  const statements = [...financials.annualStatements, ...financials.quarterlyStatements];
1523
1532
  const fallbackCurrency = reportedCurrency && statements.every((row) => !row.currency?.trim() || row.currency.trim() === reportedCurrency)