kensho-kfinance 3.2.4__py3-none-any.whl → 4.0.0__py3-none-any.whl

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 (57) hide show
  1. {kensho_kfinance-3.2.4.dist-info → kensho_kfinance-4.0.0.dist-info}/METADATA +3 -3
  2. {kensho_kfinance-3.2.4.dist-info → kensho_kfinance-4.0.0.dist-info}/RECORD +57 -56
  3. kfinance/CHANGELOG.md +51 -0
  4. kfinance/client/batch_request_handling.py +3 -1
  5. kfinance/client/fetch.py +127 -54
  6. kfinance/client/kfinance.py +38 -39
  7. kfinance/client/meta_classes.py +50 -20
  8. kfinance/client/models/date_and_period_models.py +32 -7
  9. kfinance/client/models/decimal_with_unit.py +14 -2
  10. kfinance/client/models/response_models.py +33 -0
  11. kfinance/client/models/tests/test_decimal_with_unit.py +9 -0
  12. kfinance/client/tests/test_batch_requests.py +5 -4
  13. kfinance/client/tests/test_fetch.py +134 -58
  14. kfinance/client/tests/test_objects.py +207 -145
  15. kfinance/conftest.py +10 -0
  16. kfinance/domains/business_relationships/business_relationship_tools.py +17 -8
  17. kfinance/domains/business_relationships/tests/test_business_relationship_tools.py +18 -16
  18. kfinance/domains/capitalizations/capitalization_models.py +7 -5
  19. kfinance/domains/capitalizations/capitalization_tools.py +38 -20
  20. kfinance/domains/capitalizations/tests/test_capitalization_tools.py +66 -36
  21. kfinance/domains/companies/company_models.py +22 -2
  22. kfinance/domains/companies/company_tools.py +49 -16
  23. kfinance/domains/companies/tests/test_company_tools.py +27 -9
  24. kfinance/domains/competitors/competitor_tools.py +19 -5
  25. kfinance/domains/competitors/tests/test_competitor_tools.py +22 -19
  26. kfinance/domains/cusip_and_isin/cusip_and_isin_tools.py +29 -8
  27. kfinance/domains/cusip_and_isin/tests/test_cusip_and_isin_tools.py +13 -8
  28. kfinance/domains/earnings/earning_tools.py +73 -29
  29. kfinance/domains/earnings/tests/test_earnings_tools.py +52 -43
  30. kfinance/domains/line_items/line_item_models.py +372 -16
  31. kfinance/domains/line_items/line_item_tools.py +198 -46
  32. kfinance/domains/line_items/tests/test_line_item_tools.py +305 -39
  33. kfinance/domains/mergers_and_acquisitions/merger_and_acquisition_models.py +46 -2
  34. kfinance/domains/mergers_and_acquisitions/merger_and_acquisition_tools.py +55 -74
  35. kfinance/domains/mergers_and_acquisitions/tests/test_merger_and_acquisition_tools.py +61 -59
  36. kfinance/domains/prices/price_models.py +7 -6
  37. kfinance/domains/prices/price_tools.py +24 -16
  38. kfinance/domains/prices/tests/test_price_tools.py +47 -39
  39. kfinance/domains/segments/segment_models.py +17 -3
  40. kfinance/domains/segments/segment_tools.py +102 -42
  41. kfinance/domains/segments/tests/test_segment_tools.py +166 -37
  42. kfinance/domains/statements/statement_models.py +17 -3
  43. kfinance/domains/statements/statement_tools.py +130 -46
  44. kfinance/domains/statements/tests/test_statement_tools.py +251 -49
  45. kfinance/integrations/local_mcp/kfinance_mcp.py +1 -1
  46. kfinance/integrations/tests/test_example_notebook.py +57 -16
  47. kfinance/integrations/tool_calling/all_tools.py +5 -1
  48. kfinance/integrations/tool_calling/static_tools/get_n_quarters_ago.py +5 -0
  49. kfinance/integrations/tool_calling/static_tools/tests/test_get_lastest.py +13 -10
  50. kfinance/integrations/tool_calling/static_tools/tests/test_get_n_quarters_ago.py +2 -1
  51. kfinance/integrations/tool_calling/tests/test_tool_calling_models.py +15 -4
  52. kfinance/integrations/tool_calling/tool_calling_models.py +18 -6
  53. kfinance/version.py +2 -2
  54. {kensho_kfinance-3.2.4.dist-info → kensho_kfinance-4.0.0.dist-info}/WHEEL +0 -0
  55. {kensho_kfinance-3.2.4.dist-info → kensho_kfinance-4.0.0.dist-info}/licenses/AUTHORS.md +0 -0
  56. {kensho_kfinance-3.2.4.dist-info → kensho_kfinance-4.0.0.dist-info}/licenses/LICENSE +0 -0
  57. {kensho_kfinance-3.2.4.dist-info → kensho_kfinance-4.0.0.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,61 @@
1
+ from dataclasses import dataclass
2
+ from datetime import date
1
3
  from decimal import Decimal
2
4
  from itertools import chain
3
- from typing import TypedDict
5
+ from typing import Any, TypedDict
4
6
 
5
- from pydantic import BaseModel
7
+ from pydantic import BaseModel, Field
8
+ from strenum import StrEnum
6
9
 
10
+ from kfinance.client.models.response_models import Source
7
11
 
8
- class LineItemResponse(BaseModel):
9
- line_item: dict[str, Decimal]
12
+
13
+ class CalendarType(StrEnum):
14
+ fiscal = "fiscal"
15
+ calendar = "calendar"
16
+
17
+
18
+ class LineItem(BaseModel):
19
+ name: str
20
+ value: Decimal | None
21
+ sources: list[Source] = Field(default_factory=list)
22
+
23
+
24
+ class LineItemPeriodData(BaseModel):
25
+ period_end_date: date
26
+ num_months: int
27
+ line_item: LineItem
28
+
29
+
30
+ class BasePeriodsResp(BaseModel):
31
+ """Base model for responses with a periods -> data mapping.
32
+
33
+ Adds a convenience function to remove all periods other than the
34
+ most recent one.
35
+ """
36
+
37
+ periods: dict[str, Any] # override in subclasses
38
+
39
+ def remove_all_periods_other_than_the_most_recent_one(self) -> None:
40
+ """Remove all period data other than the most recent one."""
41
+ if self.periods:
42
+ most_recent_period = max(self.periods.keys())
43
+ most_recent_period_data = self.periods[most_recent_period]
44
+ self.periods = {most_recent_period: most_recent_period_data}
45
+
46
+
47
+ class LineItemResp(BasePeriodsResp):
48
+ currency: str | None
49
+ periods: dict[str, LineItemPeriodData] # period -> line item and period data
50
+
51
+
52
+ @dataclass
53
+ class LineItemScore:
54
+ """Represents a line item match with its similarity score."""
55
+
56
+ name: str
57
+ description: str
58
+ score: float
10
59
 
11
60
 
12
61
  class LineItemType(TypedDict):
@@ -14,6 +63,7 @@ class LineItemType(TypedDict):
14
63
  aliases: set[str]
15
64
  dataitemid: int
16
65
  spgi_name: str
66
+ description: str
17
67
 
18
68
 
19
69
  # all of these values must be lower case keys
@@ -23,82 +73,113 @@ LINE_ITEMS: list[LineItemType] = [
23
73
  "aliases": {"normal_revenue", "regular_revenue"},
24
74
  "dataitemid": 112,
25
75
  "spgi_name": "Revenue",
76
+ "description": "Revenue recognized from primary business activities (excludes non-operating income).",
26
77
  },
27
78
  {
28
79
  "name": "finance_division_revenue",
29
80
  "aliases": set(),
30
81
  "dataitemid": 52,
31
82
  "spgi_name": "Finance Div. Revenue",
83
+ "description": "Revenue generated by a company's finance or captive lending operations.",
32
84
  },
33
85
  {
34
86
  "name": "insurance_division_revenue",
35
87
  "aliases": set(),
36
88
  "dataitemid": 70,
37
89
  "spgi_name": "Insurance Div. Revenue",
90
+ "description": "Revenue attributable to insurance activities within a diversified company.",
38
91
  },
39
92
  {
40
93
  "name": "revenue_from_sale_of_assets",
41
94
  "aliases": set(),
42
95
  "dataitemid": 104,
43
96
  "spgi_name": "Gain(Loss) on Sale Of Assets (Rev)",
97
+ "description": "Revenue recognized from selling long-lived assets outside normal product sales.",
44
98
  },
45
99
  {
46
100
  "name": "revenue_from_sale_of_investments",
47
101
  "aliases": set(),
48
102
  "dataitemid": 106,
49
103
  "spgi_name": "Gain(Loss) on Sale Of Invest. (Rev)",
104
+ "description": "Revenue recognized from disposing of investment securities or ownership stakes.",
50
105
  },
51
106
  {
52
107
  "name": "revenue_from_interest_and_investment_income",
53
108
  "aliases": set(),
54
109
  "dataitemid": 110,
55
110
  "spgi_name": "Interest And Invest. Income (Rev)",
111
+ "description": "Interest and investment returns classified within revenue rather than other income.",
112
+ },
113
+ {
114
+ "name": "other_revenue",
115
+ "aliases": set(),
116
+ "dataitemid": 90,
117
+ "spgi_name": "Other Revenue",
118
+ "description": "Miscellaneous revenue that does not fall into primary operating categories.",
56
119
  },
57
- {"name": "other_revenue", "aliases": set(), "dataitemid": 90, "spgi_name": "Other Revenue"},
58
120
  {
59
121
  "name": "total_other_revenue",
60
122
  "aliases": set(),
61
123
  "dataitemid": 357,
62
124
  "spgi_name": "Other Revenue, Total",
125
+ "description": "Aggregate of all non-core or miscellaneous revenue categories.",
63
126
  },
64
127
  {
65
128
  "name": "fees_and_other_income",
66
129
  "aliases": set(),
67
130
  "dataitemid": 168,
68
131
  "spgi_name": "Fees and Other Income",
132
+ "description": "Fee-based revenue combined with ancillary income streams in one line item.",
133
+ },
134
+ {
135
+ "name": "total_revenue",
136
+ "aliases": set(),
137
+ "dataitemid": 28,
138
+ "spgi_name": "Total Revenue",
139
+ "description": "Sum of operating and non-operating revenue streams for the period.",
69
140
  },
70
- {"name": "total_revenue", "aliases": set(), "dataitemid": 28, "spgi_name": "Total Revenue"},
71
141
  {
72
142
  "name": "cost_of_goods_sold",
73
143
  "aliases": {"cogs"},
74
144
  "dataitemid": 34,
75
145
  "spgi_name": "Cost Of Goods Sold",
146
+ "description": "Direct costs attributable to producing goods sold during the period.",
76
147
  },
77
148
  {
78
149
  "name": "finance_division_operating_expense",
79
150
  "aliases": {"operating_expense_finance_division"},
80
151
  "dataitemid": 51,
81
152
  "spgi_name": "Finance Div. Operating Exp.",
153
+ "description": "Operating expenses incurred within the company's finance or captive lending division.",
82
154
  },
83
155
  {
84
156
  "name": "insurance_division_operating_expense",
85
157
  "aliases": {"operating_expense_insurance_division"},
86
158
  "dataitemid": 69,
87
159
  "spgi_name": "Insurance Div. Operating Exp.",
160
+ "description": "Operating expenses tied to insurance operations inside a diversified company.",
88
161
  },
89
162
  {
90
163
  "name": "finance_division_interest_expense",
91
164
  "aliases": {"interest_expense_finance_division"},
92
165
  "dataitemid": 50,
93
166
  "spgi_name": "Interest Expense - Finance Division",
167
+ "description": "Interest expense recognized by the finance or captive lending division.",
94
168
  },
95
169
  {
96
170
  "name": "cost_of_revenue",
97
171
  "aliases": {"cor"},
98
172
  "dataitemid": 1,
99
173
  "spgi_name": "Cost Of Revenue",
174
+ "description": "Direct costs associated with delivering goods or services that generate revenue.",
175
+ },
176
+ {
177
+ "name": "gross_profit",
178
+ "aliases": set(),
179
+ "dataitemid": 10,
180
+ "spgi_name": "Gross Profit",
181
+ "description": "Revenue minus cost_of_goods_sold or cost_of_revenue for the reported period.",
100
182
  },
101
- {"name": "gross_profit", "aliases": set(), "dataitemid": 10, "spgi_name": "Gross Profit"},
102
183
  {
103
184
  "name": "selling_general_and_admin_expense",
104
185
  "aliases": {
@@ -109,6 +190,7 @@ LINE_ITEMS: list[LineItemType] = [
109
190
  },
110
191
  "dataitemid": 102,
111
192
  "spgi_name": "Selling General & Admin Exp.",
193
+ "description": "Combined selling, general, and administrative operating expenses.",
112
194
  },
113
195
  {
114
196
  "name": "exploration_and_drilling_costs",
@@ -117,6 +199,7 @@ LINE_ITEMS: list[LineItemType] = [
117
199
  },
118
200
  "dataitemid": 49,
119
201
  "spgi_name": "Exploration/Drilling Costs",
202
+ "description": "Costs incurred for exploration and drilling activities in energy sectors.",
120
203
  },
121
204
  {
122
205
  "name": "provision_for_bad_debts",
@@ -125,6 +208,7 @@ LINE_ITEMS: list[LineItemType] = [
125
208
  },
126
209
  "dataitemid": 95,
127
210
  "spgi_name": "Provision for Bad Debts",
211
+ "description": "Allowance for credit losses on receivables recorded during the period.",
128
212
  },
129
213
  {
130
214
  "name": "pre_opening_costs",
@@ -133,6 +217,7 @@ LINE_ITEMS: list[LineItemType] = [
133
217
  },
134
218
  "dataitemid": 96,
135
219
  "spgi_name": "Pre-Opening Costs",
220
+ "description": "Costs associated with opening new locations or facilities before revenue starts.",
136
221
  },
137
222
  {
138
223
  "name": "total_selling_general_and_admin_expense",
@@ -143,6 +228,7 @@ LINE_ITEMS: list[LineItemType] = [
143
228
  },
144
229
  "dataitemid": 23,
145
230
  "spgi_name": "SG&A Exp., Total",
231
+ "description": "Aggregate SG&A expenses including all subcategories.",
146
232
  },
147
233
  {
148
234
  "name": "research_and_development_expense",
@@ -155,6 +241,7 @@ LINE_ITEMS: list[LineItemType] = [
155
241
  },
156
242
  "dataitemid": 100,
157
243
  "spgi_name": "R & D Exp.",
244
+ "description": "Expenses incurred for research and development activities.",
158
245
  },
159
246
  {
160
247
  "name": "depreciation_and_amortization",
@@ -164,12 +251,14 @@ LINE_ITEMS: list[LineItemType] = [
164
251
  },
165
252
  "dataitemid": 41,
166
253
  "spgi_name": "Depreciation & Amort.",
254
+ "description": "Combined depreciation and amortization expense for the period.",
167
255
  },
168
256
  {
169
257
  "name": "amortization_of_goodwill_and_intangibles",
170
258
  "aliases": set(),
171
259
  "dataitemid": 31,
172
260
  "spgi_name": "Amort. of Goodwill and Intangibles",
261
+ "description": "Amortization expense tied to goodwill and other intangible assets.",
173
262
  },
174
263
  {
175
264
  "name": "impairment_of_oil_gas_and_mineral_properties",
@@ -179,6 +268,7 @@ LINE_ITEMS: list[LineItemType] = [
179
268
  },
180
269
  "dataitemid": 71,
181
270
  "spgi_name": "Impair. of Oil, Gas & Mineral Prop.",
271
+ "description": "Impairment charges related to oil, gas, or mineral property valuations.",
182
272
  },
183
273
  {
184
274
  "name": "total_depreciation_and_amortization",
@@ -188,18 +278,21 @@ LINE_ITEMS: list[LineItemType] = [
188
278
  },
189
279
  "dataitemid": 2,
190
280
  "spgi_name": "Depreciation & Amort., Total",
281
+ "description": "Total depreciation and amortization expense reported for the period.",
191
282
  },
192
283
  {
193
284
  "name": "other_operating_expense",
194
285
  "aliases": set(),
195
286
  "dataitemid": 260,
196
287
  "spgi_name": "Other Operating Expense/(Income)",
288
+ "description": "Operating expenses not classified under standard categories.",
197
289
  },
198
290
  {
199
291
  "name": "total_other_operating_expense",
200
292
  "aliases": set(),
201
293
  "dataitemid": 380,
202
294
  "spgi_name": "Other Operating Exp., Total",
295
+ "description": "Aggregate of operating expenses not categorized elsewhere.",
203
296
  },
204
297
  {
205
298
  "name": "total_operating_expense",
@@ -208,54 +301,63 @@ LINE_ITEMS: list[LineItemType] = [
208
301
  },
209
302
  "dataitemid": 373,
210
303
  "spgi_name": "Total Operating Expenses",
304
+ "description": "Sum of all operating expenses for the reporting period.",
211
305
  },
212
306
  {
213
307
  "name": "operating_income",
214
308
  "aliases": set(),
215
309
  "dataitemid": 21,
216
310
  "spgi_name": "Operating Income",
311
+ "description": "Operating profit after subtracting operating expenses from operating revenue.",
217
312
  },
218
313
  {
219
314
  "name": "interest_expense",
220
315
  "aliases": set(),
221
316
  "dataitemid": 82,
222
317
  "spgi_name": "Interest Expense",
318
+ "description": "Total interest expense recognized during the period.",
223
319
  },
224
320
  {
225
321
  "name": "interest_and_investment_income",
226
322
  "aliases": set(),
227
323
  "dataitemid": 65,
228
324
  "spgi_name": "Interest and Invest. Income",
325
+ "description": "Income from interest-bearing assets and investment returns outside core operations.",
229
326
  },
230
327
  {
231
328
  "name": "net_interest_expense",
232
329
  "aliases": set(),
233
330
  "dataitemid": 368,
234
331
  "spgi_name": "Net Interest Exp.",
332
+ "description": "Interest expense net of any interest income for the period.",
235
333
  },
236
334
  {
237
335
  "name": "income_from_affiliates",
238
336
  "aliases": set(),
239
337
  "dataitemid": 47,
240
338
  "spgi_name": "Income / (Loss) from Affiliates",
339
+ "description": "Equity-method income earned from affiliated companies.",
241
340
  },
242
341
  {
243
342
  "name": "currency_exchange_gains",
244
343
  "aliases": set(),
245
344
  "dataitemid": 38,
246
345
  "spgi_name": "Currency Exchange Gains (Loss)",
346
+ "description": "Gains arising from favorable foreign currency movements.",
247
347
  },
248
348
  {
249
349
  "name": "other_non_operating_income",
250
350
  "aliases": set(),
251
351
  "dataitemid": 85,
252
352
  "spgi_name": "Other Non-Operating Inc. (Exp.)",
353
+ "description": "Non-operating income items not captured in other categories.",
253
354
  },
254
355
  {
255
356
  "name": "total_other_non_operating_income",
256
357
  "aliases": set(),
257
358
  "dataitemid": 371,
258
359
  "spgi_name": "Other Non-Operating Exp., Total",
360
+ "description": "Aggregate of non-operating income items (e.g., investment income, gains).",
259
361
  },
260
362
  {
261
363
  "name": "ebt_excluding_unusual_items",
@@ -264,44 +366,57 @@ LINE_ITEMS: list[LineItemType] = [
264
366
  },
265
367
  "dataitemid": 4,
266
368
  "spgi_name": "EBT Excl Unusual Items",
369
+ "description": "Earnings before taxes with unusual/non-recurring items removed.",
267
370
  },
268
371
  {
269
372
  "name": "restructuring_charges",
270
373
  "aliases": set(),
271
374
  "dataitemid": 98,
272
375
  "spgi_name": "Restructuring Charges",
376
+ "description": "Charges related to restructuring initiatives such as layoffs or facility closures.",
273
377
  },
274
378
  {
275
379
  "name": "merger_charges",
276
380
  "aliases": set(),
277
381
  "dataitemid": 80,
278
382
  "spgi_name": "Merger & Related Restruct. Charges",
383
+ "description": "Costs incurred during merger transactions.",
279
384
  },
280
385
  {
281
386
  "name": "merger_and_restructuring_charges",
282
387
  "aliases": set(),
283
388
  "dataitemid": 363,
284
389
  "spgi_name": "Merger & Restruct. Charges",
390
+ "description": "Combined charges stemming from merger and restructuring activities.",
285
391
  },
286
392
  {
287
393
  "name": "impairment_of_goodwill",
288
394
  "aliases": set(),
289
395
  "dataitemid": 209,
290
396
  "spgi_name": "Impairment of Goodwill",
397
+ "description": "Write-downs of goodwill carrying value due to impairment testing.",
291
398
  },
292
399
  {
293
400
  "name": "gain_from_sale_of_assets",
294
401
  "aliases": set(),
295
402
  "dataitemid": 62,
296
403
  "spgi_name": "Gain (Loss) On Sale Of Invest.",
404
+ "description": "Gain recognized from disposing tangible or intangible assets.",
297
405
  },
298
406
  {
299
407
  "name": "gain_from_sale_of_investments",
300
408
  "aliases": set(),
301
409
  "dataitemid": 56,
302
410
  "spgi_name": "Gain (Loss) On Sale Of Assets",
411
+ "description": "Gain realized from selling investment holdings.",
412
+ },
413
+ {
414
+ "name": "asset_writedown",
415
+ "aliases": set(),
416
+ "dataitemid": 32,
417
+ "spgi_name": "Asset Writedown",
418
+ "description": "Reduction in asset carrying value due to impairment or obsolescence.",
303
419
  },
304
- {"name": "asset_writedown", "aliases": set(), "dataitemid": 32, "spgi_name": "Asset Writedown"},
305
420
  {
306
421
  "name": "in_process_research_and_development_expense",
307
422
  "aliases": {
@@ -313,30 +428,35 @@ LINE_ITEMS: list[LineItemType] = [
313
428
  },
314
429
  "dataitemid": 72,
315
430
  "spgi_name": "In Process R & D Exp.",
431
+ "description": "Expense recognized for acquired in-process R&D projects.",
316
432
  },
317
433
  {
318
434
  "name": "insurance_settlements",
319
435
  "aliases": set(),
320
436
  "dataitemid": 73,
321
437
  "spgi_name": "Insurance Settlements",
438
+ "description": "Proceeds or expenses arising from insurance claim settlements.",
322
439
  },
323
440
  {
324
441
  "name": "legal_settlements",
325
442
  "aliases": set(),
326
443
  "dataitemid": 77,
327
444
  "spgi_name": "Legal Settlements",
445
+ "description": "Amounts paid or received to resolve legal actions.",
328
446
  },
329
447
  {
330
448
  "name": "other_unusual_items",
331
449
  "aliases": set(),
332
450
  "dataitemid": 87,
333
451
  "spgi_name": "Other Unusual Items",
452
+ "description": "Unusual or infrequent items not captured elsewhere.",
334
453
  },
335
454
  {
336
455
  "name": "total_other_unusual_items",
337
456
  "aliases": set(),
338
457
  "dataitemid": 374,
339
458
  "spgi_name": "Other Unusual Items, Total",
459
+ "description": "Aggregate impact of all unusual items except those categorized separately.",
340
460
  },
341
461
  {
342
462
  "name": "total_unusual_items",
@@ -345,6 +465,7 @@ LINE_ITEMS: list[LineItemType] = [
345
465
  },
346
466
  "dataitemid": 19,
347
467
  "spgi_name": "Total Unusual Items",
468
+ "description": "Aggregate impact of all unusual or non-recurring items for the reporting period.",
348
469
  },
349
470
  {
350
471
  "name": "ebt_including_unusual_items",
@@ -353,6 +474,7 @@ LINE_ITEMS: list[LineItemType] = [
353
474
  },
354
475
  "dataitemid": 139,
355
476
  "spgi_name": "EBT Incl. Unusual Items",
477
+ "description": "Earnings before taxes, including unusual or non-recurring items.",
356
478
  },
357
479
  {
358
480
  "name": "income_tax_expense",
@@ -362,6 +484,7 @@ LINE_ITEMS: list[LineItemType] = [
362
484
  },
363
485
  "dataitemid": 75,
364
486
  "spgi_name": "Income Tax Expense",
487
+ "description": "Total income tax expense recognized for the period.",
365
488
  },
366
489
  {
367
490
  "name": "earnings_from_continued_operations",
@@ -370,6 +493,7 @@ LINE_ITEMS: list[LineItemType] = [
370
493
  },
371
494
  "dataitemid": 7,
372
495
  "spgi_name": "Earnings from Cont. Ops.",
496
+ "description": "Earnings from ongoing operations excluding discontinued segments.",
373
497
  },
374
498
  {
375
499
  "name": "earnings_from_discontinued_operations",
@@ -378,18 +502,21 @@ LINE_ITEMS: list[LineItemType] = [
378
502
  },
379
503
  "dataitemid": 40,
380
504
  "spgi_name": "Earnings of Discontinued Ops.",
505
+ "description": "Net earnings attributable to discontinued operations.",
381
506
  },
382
507
  {
383
508
  "name": "extraordinary_item_and_accounting_change",
384
509
  "aliases": set(),
385
510
  "dataitemid": 42,
386
511
  "spgi_name": "Extraord. Item & Account. Change",
512
+ "description": "Combined impact of extraordinary items and accounting changes.",
387
513
  },
388
514
  {
389
515
  "name": "net_income_to_company",
390
516
  "aliases": set(),
391
517
  "dataitemid": 41571,
392
518
  "spgi_name": "Net Income to Company",
519
+ "description": "Net income attributable to the parent company.",
393
520
  },
394
521
  {
395
522
  "name": "minority_interest_in_earnings",
@@ -398,55 +525,70 @@ LINE_ITEMS: list[LineItemType] = [
398
525
  },
399
526
  "dataitemid": 83,
400
527
  "spgi_name": "Minority Int. in Earnings",
528
+ "description": "Earnings attributable to minority interest holders.",
529
+ },
530
+ {
531
+ "name": "net_income",
532
+ "aliases": set(),
533
+ "dataitemid": 15,
534
+ "spgi_name": "Net Income",
535
+ "description": "Bottom-line profit attributable to common shareholders.",
401
536
  },
402
- {"name": "net_income", "aliases": set(), "dataitemid": 15, "spgi_name": "Net Income"},
403
537
  {
404
538
  "name": "premium_on_redemption_of_preferred_stock",
405
539
  "aliases": set(),
406
540
  "dataitemid": 279,
407
541
  "spgi_name": "Premium on Redemption of Pref. Stock",
542
+ "description": "Premium paid when redeeming preferred shares above par value.",
408
543
  },
409
544
  {
410
545
  "name": "preferred_stock_dividend",
411
546
  "aliases": set(),
412
547
  "dataitemid": 280,
413
548
  "spgi_name": "Preferred Stock Dividend",
549
+ "description": "Dividends paid to preferred shareholders.",
414
550
  },
415
551
  {
416
552
  "name": "other_preferred_stock_adjustments",
417
553
  "aliases": set(),
418
554
  "dataitemid": 281,
419
555
  "spgi_name": "Other Pref. Stock Adjustments",
556
+ "description": "Adjustments related to preferred stock outside dividends and redemption premiums.",
420
557
  },
421
558
  {
422
559
  "name": "other_adjustments_to_net_income",
423
560
  "aliases": set(),
424
561
  "dataitemid": 259,
425
562
  "spgi_name": "Other Adjustments to Net Income",
563
+ "description": "Miscellaneous adjustments applied to net income calculations.",
426
564
  },
427
565
  {
428
566
  "name": "preferred_dividends_and_other_adjustments",
429
567
  "aliases": set(),
430
568
  "dataitemid": 97,
431
569
  "spgi_name": "Pref. Dividends and Other Adj.",
570
+ "description": "Combined preferred dividend and adjustment line item.",
432
571
  },
433
572
  {
434
573
  "name": "net_income_allocable_to_general_partner",
435
574
  "aliases": set(),
436
575
  "dataitemid": 249,
437
576
  "spgi_name": "Net Income Allocable to General Partner",
577
+ "description": "Net income portion allocated to the general partner.",
438
578
  },
439
579
  {
440
580
  "name": "net_income_to_common_shareholders_including_extra_items",
441
581
  "aliases": set(),
442
582
  "dataitemid": 16,
443
583
  "spgi_name": "NI to Common Incl. Extra Items",
584
+ "description": "Net income available to common shareholders inclusive of extraordinary items.",
444
585
  },
445
586
  {
446
587
  "name": "net_income_to_common_shareholders_excluding_extra_items",
447
588
  "aliases": set(),
448
589
  "dataitemid": 379,
449
590
  "spgi_name": "NI to Common Excl. Extra Items",
591
+ "description": "Net income to common shareholders excluding extraordinary items.",
450
592
  },
451
593
  {
452
594
  "name": "cash_and_equivalents",
@@ -456,18 +598,21 @@ LINE_ITEMS: list[LineItemType] = [
456
598
  },
457
599
  "dataitemid": 1096,
458
600
  "spgi_name": "Cash And Equivalents",
601
+ "description": "Cash on hand plus cash-equivalent short-term investments.",
459
602
  },
460
603
  {
461
604
  "name": "short_term_investments",
462
605
  "aliases": set(),
463
606
  "dataitemid": 1069,
464
607
  "spgi_name": "Short Term Investments",
608
+ "description": "Short-term investments readily convertible to cash.",
465
609
  },
466
610
  {
467
611
  "name": "trading_asset_securities",
468
612
  "aliases": set(),
469
613
  "dataitemid": 1244,
470
614
  "spgi_name": "Trading Asset Securities",
615
+ "description": "Trading securities held as short-term financial assets.",
471
616
  },
472
617
  {
473
618
  "name": "total_cash_and_short_term_investments",
@@ -476,6 +621,7 @@ LINE_ITEMS: list[LineItemType] = [
476
621
  },
477
622
  "dataitemid": 1002,
478
623
  "spgi_name": "Total Cash & ST Investments",
624
+ "description": "Total cash plus short-term investment balance.",
479
625
  },
480
626
  {
481
627
  "name": "accounts_receivable",
@@ -485,6 +631,7 @@ LINE_ITEMS: list[LineItemType] = [
485
631
  },
486
632
  "dataitemid": 1021,
487
633
  "spgi_name": "Accounts Receivable",
634
+ "description": "Accounts receivable balance due from customers.",
488
635
  },
489
636
  {
490
637
  "name": "other_receivables",
@@ -494,6 +641,7 @@ LINE_ITEMS: list[LineItemType] = [
494
641
  },
495
642
  "dataitemid": 1206,
496
643
  "spgi_name": "Other Receivables",
644
+ "description": "Receivables that are not trade receivables (e.g., tax refunds, employee advances).",
497
645
  },
498
646
  {
499
647
  "name": "notes_receivable",
@@ -503,6 +651,7 @@ LINE_ITEMS: list[LineItemType] = [
503
651
  },
504
652
  "dataitemid": 1048,
505
653
  "spgi_name": "Notes Receivable",
654
+ "description": "Amounts owed to the company via promissory notes.",
506
655
  },
507
656
  {
508
657
  "name": "total_receivables",
@@ -515,6 +664,7 @@ LINE_ITEMS: list[LineItemType] = [
515
664
  },
516
665
  "dataitemid": 1001,
517
666
  "spgi_name": "Total Receivables",
667
+ "description": "Aggregate receivable balance across categories.",
518
668
  },
519
669
  {
520
670
  "name": "inventory",
@@ -523,6 +673,7 @@ LINE_ITEMS: list[LineItemType] = [
523
673
  },
524
674
  "dataitemid": 1043,
525
675
  "spgi_name": "Inventory",
676
+ "description": "Inventory balance reported for the period.",
526
677
  },
527
678
  {
528
679
  "name": "prepaid_expense",
@@ -531,6 +682,7 @@ LINE_ITEMS: list[LineItemType] = [
531
682
  },
532
683
  "dataitemid": 1212,
533
684
  "spgi_name": "Prepaid Exp.",
685
+ "description": "Prepaid expenses for goods or services yet to be received.",
534
686
  },
535
687
  {
536
688
  "name": "finance_division_loans_and_leases_short_term",
@@ -541,6 +693,7 @@ LINE_ITEMS: list[LineItemType] = [
541
693
  },
542
694
  "dataitemid": 1032,
543
695
  "spgi_name": "Finance Div. Loans and Leases, ST",
696
+ "description": "Short-term loans and leases held by the finance division.",
544
697
  },
545
698
  {
546
699
  "name": "finance_division_other_current_assets",
@@ -551,12 +704,14 @@ LINE_ITEMS: list[LineItemType] = [
551
704
  },
552
705
  "dataitemid": 1029,
553
706
  "spgi_name": "Finance Div. Other Curr. Assets",
707
+ "description": "Other current assets specific to a company's finance division.",
554
708
  },
555
709
  {
556
710
  "name": "loans_held_for_sale",
557
711
  "aliases": set(),
558
712
  "dataitemid": 1185,
559
713
  "spgi_name": "Loans Held For Sale",
714
+ "description": "Loans designated for sale rather than retention on the balance sheet.",
560
715
  },
561
716
  {
562
717
  "name": "deferred_tax_asset_current_portion",
@@ -566,18 +721,21 @@ LINE_ITEMS: list[LineItemType] = [
566
721
  },
567
722
  "dataitemid": 1117,
568
723
  "spgi_name": "Deferred Tax Assets, Curr.",
724
+ "description": "Current portion of deferred tax assets expected to be realized within a year.",
569
725
  },
570
726
  {
571
727
  "name": "restricted_cash",
572
728
  "aliases": set(),
573
729
  "dataitemid": 1104,
574
730
  "spgi_name": "Restricted Cash",
731
+ "description": "Cash balances with usage restrictions (e.g., escrow, collateral).",
575
732
  },
576
733
  {
577
734
  "name": "other_current_assets",
578
735
  "aliases": set(),
579
736
  "dataitemid": 1055,
580
737
  "spgi_name": "Other Current Assets",
738
+ "description": "Miscellaneous current assets not classified elsewhere.",
581
739
  },
582
740
  {
583
741
  "name": "total_current_assets",
@@ -588,6 +746,7 @@ LINE_ITEMS: list[LineItemType] = [
588
746
  },
589
747
  "dataitemid": 1008,
590
748
  "spgi_name": "Total Current Assets",
749
+ "description": "Sum of all assets classified as current for the reporting date.",
591
750
  },
592
751
  {
593
752
  "name": "gross_property_plant_and_equipment",
@@ -597,12 +756,14 @@ LINE_ITEMS: list[LineItemType] = [
597
756
  },
598
757
  "dataitemid": 1169,
599
758
  "spgi_name": "Gross Property, Plant & Equipment",
759
+ "description": "Gross value of PP&E before accumulated depreciation.",
600
760
  },
601
761
  {
602
762
  "name": "accumulated_depreciation",
603
763
  "aliases": set(),
604
764
  "dataitemid": 1075,
605
765
  "spgi_name": "Accumulated Depreciation",
766
+ "description": "Cumulative depreciation recorded against property, plant, and equipment.",
606
767
  },
607
768
  {
608
769
  "name": "net_property_plant_and_equipment",
@@ -614,6 +775,7 @@ LINE_ITEMS: list[LineItemType] = [
614
775
  },
615
776
  "dataitemid": 1004,
616
777
  "spgi_name": "Net Property, Plant & Equipment",
778
+ "description": "Net property, plant, and equipment after accumulated depreciation.",
617
779
  },
618
780
  {
619
781
  "name": "long_term_investments",
@@ -622,13 +784,21 @@ LINE_ITEMS: list[LineItemType] = [
622
784
  },
623
785
  "dataitemid": 1054,
624
786
  "spgi_name": "Long-term Investments",
787
+ "description": "Non-current investments intended to be held longer than one year.",
788
+ },
789
+ {
790
+ "name": "goodwill",
791
+ "aliases": set(),
792
+ "dataitemid": 1171,
793
+ "spgi_name": "Goodwill",
794
+ "description": "",
625
795
  },
626
- {"name": "goodwill", "aliases": set(), "dataitemid": 1171, "spgi_name": "Goodwill"},
627
796
  {
628
797
  "name": "other_intangibles",
629
798
  "aliases": set(),
630
799
  "dataitemid": 1040,
631
800
  "spgi_name": "Other Intangibles",
801
+ "description": "Intangible assets other than goodwill (e.g., patents, trademarks).",
632
802
  },
633
803
  {
634
804
  "name": "finance_division_loans_and_leases_long_term",
@@ -639,6 +809,7 @@ LINE_ITEMS: list[LineItemType] = [
639
809
  },
640
810
  "dataitemid": 1033,
641
811
  "spgi_name": "Finance Div. Loans and Leases, LT",
812
+ "description": "",
642
813
  },
643
814
  {
644
815
  "name": "finance_division_other_non_current_assets",
@@ -649,6 +820,7 @@ LINE_ITEMS: list[LineItemType] = [
649
820
  },
650
821
  "dataitemid": 1034,
651
822
  "spgi_name": "Finance Div. Other LT Assets",
823
+ "description": "",
652
824
  },
653
825
  {
654
826
  "name": "long_term_accounts_receivable",
@@ -657,6 +829,7 @@ LINE_ITEMS: list[LineItemType] = [
657
829
  },
658
830
  "dataitemid": 1088,
659
831
  "spgi_name": "Accounts Receivable Long-Term",
832
+ "description": "",
660
833
  },
661
834
  {
662
835
  "name": "long_term_loans_receivable",
@@ -666,6 +839,7 @@ LINE_ITEMS: list[LineItemType] = [
666
839
  },
667
840
  "dataitemid": 1050,
668
841
  "spgi_name": "Loans Receivable Long-Term",
842
+ "description": "",
669
843
  },
670
844
  {
671
845
  "name": "long_term_deferred_tax_assets",
@@ -674,6 +848,7 @@ LINE_ITEMS: list[LineItemType] = [
674
848
  },
675
849
  "dataitemid": 1026,
676
850
  "spgi_name": "Deferred Tax Assets, LT",
851
+ "description": "",
677
852
  },
678
853
  {
679
854
  "name": "long_term_deferred_charges",
@@ -682,6 +857,7 @@ LINE_ITEMS: list[LineItemType] = [
682
857
  },
683
858
  "dataitemid": 1025,
684
859
  "spgi_name": "Deferred Charges, LT",
860
+ "description": "Deferred charges expected to provide benefits beyond one year.",
685
861
  },
686
862
  {
687
863
  "name": "other_long_term_assets",
@@ -692,6 +868,7 @@ LINE_ITEMS: list[LineItemType] = [
692
868
  },
693
869
  "dataitemid": 1060,
694
870
  "spgi_name": "Other Long-Term Assets",
871
+ "description": "",
695
872
  },
696
873
  {
697
874
  "name": "total_assets",
@@ -700,18 +877,21 @@ LINE_ITEMS: list[LineItemType] = [
700
877
  },
701
878
  "dataitemid": 1007,
702
879
  "spgi_name": "Total Assets",
880
+ "description": "",
703
881
  },
704
882
  {
705
883
  "name": "accounts_payable",
706
884
  "aliases": set(),
707
885
  "dataitemid": 1018,
708
886
  "spgi_name": "Accounts Payable",
887
+ "description": "",
709
888
  },
710
889
  {
711
890
  "name": "accrued_expenses",
712
891
  "aliases": set(),
713
892
  "dataitemid": 1016,
714
893
  "spgi_name": "Accrued Expenses",
894
+ "description": "Accrued expenses and other short-term liabilities awaiting payment.",
715
895
  },
716
896
  {
717
897
  "name": "short_term_borrowings",
@@ -722,6 +902,7 @@ LINE_ITEMS: list[LineItemType] = [
722
902
  },
723
903
  "dataitemid": 1046,
724
904
  "spgi_name": "Short-term Borrowings",
905
+ "description": "Borrowings that mature within twelve months of the reporting date.",
725
906
  },
726
907
  {
727
908
  "name": "current_portion_of_long_term_debt",
@@ -731,6 +912,7 @@ LINE_ITEMS: list[LineItemType] = [
731
912
  },
732
913
  "dataitemid": 1297,
733
914
  "spgi_name": "Current Portion of Long Term Debt",
915
+ "description": "Portion of long-term debt due within the next year.",
734
916
  },
735
917
  {
736
918
  "name": "current_portion_of_capital_leases",
@@ -741,6 +923,7 @@ LINE_ITEMS: list[LineItemType] = [
741
923
  },
742
924
  "dataitemid": 1090,
743
925
  "spgi_name": "Curr. Port. of Cap. Leases",
926
+ "description": "Short-term portion of capital lease obligations due within 12 months.",
744
927
  },
745
928
  {
746
929
  "name": "current_portion_of_long_term_debt_and_capital_leases",
@@ -757,18 +940,21 @@ LINE_ITEMS: list[LineItemType] = [
757
940
  },
758
941
  "dataitemid": 1279,
759
942
  "spgi_name": "Curr. Port. of LT Debt/Cap. Leases",
943
+ "description": "Combined current portion of long-term debt and capital leases.",
760
944
  },
761
945
  {
762
946
  "name": "finance_division_debt_current_portion",
763
947
  "aliases": set(),
764
948
  "dataitemid": 1030,
765
949
  "spgi_name": "Finance Div. Debt Current",
950
+ "description": "Current portion of debt held within the finance division.",
766
951
  },
767
952
  {
768
953
  "name": "finance_division_other_current_liabilities",
769
954
  "aliases": set(),
770
955
  "dataitemid": 1031,
771
956
  "spgi_name": "Finance Div. Other Curr. Liab.",
957
+ "description": "Other current liabilities associated with the finance division.",
772
958
  },
773
959
  {
774
960
  "name": "current_income_taxes_payable",
@@ -777,6 +963,7 @@ LINE_ITEMS: list[LineItemType] = [
777
963
  },
778
964
  "dataitemid": 1094,
779
965
  "spgi_name": "Curr. Income Taxes Payable",
966
+ "description": "Current portion of income taxes owed but not yet paid (balance sheet liability).",
780
967
  },
781
968
  {
782
969
  "name": "current_unearned_revenue",
@@ -785,12 +972,14 @@ LINE_ITEMS: list[LineItemType] = [
785
972
  },
786
973
  "dataitemid": 1074,
787
974
  "spgi_name": "Unearned Revenue, Current",
975
+ "description": "Unearned revenue expected to be recognized within one year.",
788
976
  },
789
977
  {
790
978
  "name": "current_deferred_tax_liability",
791
979
  "aliases": set(),
792
980
  "dataitemid": 1119,
793
981
  "spgi_name": "Def. Tax Liability, Curr.",
982
+ "description": "Deferred tax liabilities classified as current.",
794
983
  },
795
984
  {
796
985
  "name": "other_current_liability",
@@ -799,6 +988,7 @@ LINE_ITEMS: list[LineItemType] = [
799
988
  },
800
989
  "dataitemid": 1057,
801
990
  "spgi_name": "Other Current Liabilities",
991
+ "description": "Miscellaneous current liability category.",
802
992
  },
803
993
  {
804
994
  "name": "total_current_liabilities",
@@ -807,6 +997,7 @@ LINE_ITEMS: list[LineItemType] = [
807
997
  },
808
998
  "dataitemid": 1009,
809
999
  "spgi_name": "Total Current Liabilities",
1000
+ "description": "Total balance of current liabilities reported.",
810
1001
  },
811
1002
  {
812
1003
  "name": "long_term_debt",
@@ -815,6 +1006,7 @@ LINE_ITEMS: list[LineItemType] = [
815
1006
  },
816
1007
  "dataitemid": 1049,
817
1008
  "spgi_name": "Long-Term Debt",
1009
+ "description": "Debt obligations with maturity dates beyond one year.",
818
1010
  },
819
1011
  {
820
1012
  "name": "capital_leases",
@@ -824,6 +1016,7 @@ LINE_ITEMS: list[LineItemType] = [
824
1016
  },
825
1017
  "dataitemid": 1183,
826
1018
  "spgi_name": "Capital Leases",
1019
+ "description": "Long-term obligations arising from capital lease arrangements.",
827
1020
  },
828
1021
  {
829
1022
  "name": "finance_division_debt_non_current_portion",
@@ -834,6 +1027,7 @@ LINE_ITEMS: list[LineItemType] = [
834
1027
  },
835
1028
  "dataitemid": 1035,
836
1029
  "spgi_name": "Finance Div. Debt Non-Curr.",
1030
+ "description": "Non-current portion of debt held within the finance division.",
837
1031
  },
838
1032
  {
839
1033
  "name": "finance_division_other_non_current_liabilities",
@@ -842,6 +1036,7 @@ LINE_ITEMS: list[LineItemType] = [
842
1036
  },
843
1037
  "dataitemid": 1036,
844
1038
  "spgi_name": "Finance Div. Other Non-Curr. Liab.",
1039
+ "description": "Other non-current liabilities reported by the finance division.",
845
1040
  },
846
1041
  {
847
1042
  "name": "non_current_unearned_revenue",
@@ -850,18 +1045,21 @@ LINE_ITEMS: list[LineItemType] = [
850
1045
  },
851
1046
  "dataitemid": 1256,
852
1047
  "spgi_name": "Unearned Revenue, Non-Current",
1048
+ "description": "Revenue received in advance that will be recognized beyond one year.",
853
1049
  },
854
1050
  {
855
1051
  "name": "pension_and_other_post_retirement_benefit",
856
1052
  "aliases": set(),
857
1053
  "dataitemid": 1213,
858
1054
  "spgi_name": "Pension & Other Post-Retire. Benefits",
1055
+ "description": "Liabilities for pension and post-retirement benefit obligations.",
859
1056
  },
860
1057
  {
861
1058
  "name": "non_current_deferred_tax_liability",
862
1059
  "aliases": set(),
863
1060
  "dataitemid": 1027,
864
1061
  "spgi_name": "Def. Tax Liability, Non-Curr.",
1062
+ "description": "Deferred tax liabilities not expected to be settled within one year.",
865
1063
  },
866
1064
  {
867
1065
  "name": "other_non_current_liabilities",
@@ -872,6 +1070,7 @@ LINE_ITEMS: list[LineItemType] = [
872
1070
  },
873
1071
  "dataitemid": 1062,
874
1072
  "spgi_name": "Other Non-Current Liabilities",
1073
+ "description": "Miscellaneous non-current liability categories.",
875
1074
  },
876
1075
  {
877
1076
  "name": "total_liabilities",
@@ -880,6 +1079,7 @@ LINE_ITEMS: list[LineItemType] = [
880
1079
  },
881
1080
  "dataitemid": 1276,
882
1081
  "spgi_name": "Total Liabilities",
1082
+ "description": "Total liabilities including both current and non-current obligations.",
883
1083
  },
884
1084
  {
885
1085
  "name": "preferred_stock_redeemable",
@@ -888,6 +1088,7 @@ LINE_ITEMS: list[LineItemType] = [
888
1088
  },
889
1089
  "dataitemid": 1217,
890
1090
  "spgi_name": "Pref. Stock, Redeemable",
1091
+ "description": "Redeemable preferred stock outstanding.",
891
1092
  },
892
1093
  {
893
1094
  "name": "preferred_stock_non_redeemable",
@@ -896,6 +1097,7 @@ LINE_ITEMS: list[LineItemType] = [
896
1097
  },
897
1098
  "dataitemid": 1216,
898
1099
  "spgi_name": "Pref. Stock, Non-Redeem.",
1100
+ "description": "Non-redeemable preferred stock outstanding.",
899
1101
  },
900
1102
  {
901
1103
  "name": "preferred_stock_convertible",
@@ -904,6 +1106,7 @@ LINE_ITEMS: list[LineItemType] = [
904
1106
  },
905
1107
  "dataitemid": 1214,
906
1108
  "spgi_name": "Pref. Stock, Convertible",
1109
+ "description": "Preferred shares that can be converted into common stock.",
907
1110
  },
908
1111
  {
909
1112
  "name": "preferred_stock_other",
@@ -912,6 +1115,7 @@ LINE_ITEMS: list[LineItemType] = [
912
1115
  },
913
1116
  "dataitemid": 1065,
914
1117
  "spgi_name": "Pref. Stock, Other",
1118
+ "description": "Other preferred equity categories not classified elsewhere.",
915
1119
  },
916
1120
  {
917
1121
  "name": "preferred_stock_additional_paid_in_capital",
@@ -920,6 +1124,7 @@ LINE_ITEMS: list[LineItemType] = [
920
1124
  },
921
1125
  "dataitemid": 1085,
922
1126
  "spgi_name": "Additional Paid In Capital - Preferred Stock",
1127
+ "description": "Additional paid-in capital attributable to preferred stock.",
923
1128
  },
924
1129
  {
925
1130
  "name": "preferred_stock_equity_adjustment",
@@ -928,6 +1133,7 @@ LINE_ITEMS: list[LineItemType] = [
928
1133
  },
929
1134
  "dataitemid": 1215,
930
1135
  "spgi_name": "Equity Adjustment - Preferred Stock",
1136
+ "description": "Equity adjustment related to preferred stock balances.",
931
1137
  },
932
1138
  {
933
1139
  "name": "treasury_stock_preferred_stock_convertible",
@@ -938,6 +1144,7 @@ LINE_ITEMS: list[LineItemType] = [
938
1144
  },
939
1145
  "dataitemid": 1249,
940
1146
  "spgi_name": "Treasury Stock : Preferred Stock Convertible",
1147
+ "description": "",
941
1148
  },
942
1149
  {
943
1150
  "name": "treasury_stock_preferred_stock_non_redeemable",
@@ -948,6 +1155,7 @@ LINE_ITEMS: list[LineItemType] = [
948
1155
  },
949
1156
  "dataitemid": 1250,
950
1157
  "spgi_name": "Treasury Stock : Preferred Stock Non Redeemable",
1158
+ "description": "",
951
1159
  },
952
1160
  {
953
1161
  "name": "treasury_stock_preferred_stock_redeemable",
@@ -958,6 +1166,7 @@ LINE_ITEMS: list[LineItemType] = [
958
1166
  },
959
1167
  "dataitemid": 1251,
960
1168
  "spgi_name": "Treasury Stock : Preferred Stock Redeemable",
1169
+ "description": "Treasury shares held for redeemable preferred stock classes.",
961
1170
  },
962
1171
  {
963
1172
  "name": "total_preferred_equity",
@@ -968,26 +1177,42 @@ LINE_ITEMS: list[LineItemType] = [
968
1177
  },
969
1178
  "dataitemid": 1005,
970
1179
  "spgi_name": "Total Pref. Equity",
1180
+ "description": "Total preferred equity including all preferred share classes.",
1181
+ },
1182
+ {
1183
+ "name": "common_stock",
1184
+ "aliases": set(),
1185
+ "dataitemid": 1103,
1186
+ "spgi_name": "Common Stock",
1187
+ "description": "Par value of common stock issued and outstanding.",
971
1188
  },
972
- {"name": "common_stock", "aliases": set(), "dataitemid": 1103, "spgi_name": "Common Stock"},
973
1189
  {
974
1190
  "name": "additional_paid_in_capital",
975
1191
  "aliases": set(),
976
1192
  "dataitemid": 1084,
977
1193
  "spgi_name": "Additional Paid In Capital",
1194
+ "description": "Capital paid by shareholders above par value for common stock.",
978
1195
  },
979
1196
  {
980
1197
  "name": "retained_earnings",
981
1198
  "aliases": set(),
982
1199
  "dataitemid": 1222,
983
1200
  "spgi_name": "Retained Earnings",
1201
+ "description": "Accumulated retained earnings available to common shareholders.",
1202
+ },
1203
+ {
1204
+ "name": "treasury_stock",
1205
+ "aliases": set(),
1206
+ "dataitemid": 1248,
1207
+ "spgi_name": "Treasury Stock",
1208
+ "description": "Cost of company shares repurchased and held in treasury.",
984
1209
  },
985
- {"name": "treasury_stock", "aliases": set(), "dataitemid": 1248, "spgi_name": "Treasury Stock"},
986
1210
  {
987
1211
  "name": "other_equity",
988
1212
  "aliases": set(),
989
1213
  "dataitemid": 1028,
990
1214
  "spgi_name": "Comprehensive Inc. and Other",
1215
+ "description": "Other equity components not categorized elsewhere.",
991
1216
  },
992
1217
  {
993
1218
  "name": "total_common_equity",
@@ -996,6 +1221,7 @@ LINE_ITEMS: list[LineItemType] = [
996
1221
  },
997
1222
  "dataitemid": 1006,
998
1223
  "spgi_name": "Total Common Equity",
1224
+ "description": "Total equity attributable to common shareholders.",
999
1225
  },
1000
1226
  {
1001
1227
  "name": "total_equity",
@@ -1006,6 +1232,7 @@ LINE_ITEMS: list[LineItemType] = [
1006
1232
  },
1007
1233
  "dataitemid": 1275,
1008
1234
  "spgi_name": "Total Equity",
1235
+ "description": "Total shareholders' equity including preferred and common components.",
1009
1236
  },
1010
1237
  {
1011
1238
  "name": "total_liabilities_and_equity",
@@ -1014,60 +1241,70 @@ LINE_ITEMS: list[LineItemType] = [
1014
1241
  },
1015
1242
  "dataitemid": 1013,
1016
1243
  "spgi_name": "Total Liabilities And Equity",
1244
+ "description": "Total liabilities plus shareholders' equity to balance assets.",
1017
1245
  },
1018
1246
  {
1019
1247
  "name": "common_shares_outstanding",
1020
1248
  "aliases": set(),
1021
1249
  "dataitemid": 1100,
1022
1250
  "spgi_name": "Common Shares Outstanding",
1251
+ "description": "Weighted or period-end count of common shares outstanding.",
1023
1252
  },
1024
1253
  {
1025
1254
  "name": "adjustments_to_cash_flow_net_income",
1026
1255
  "aliases": set(),
1027
1256
  "dataitemid": 21523,
1028
1257
  "spgi_name": "Adjustments to Cash Flow Net Income",
1258
+ "description": "Adjustments reconciling net income to operating cash flow.",
1029
1259
  },
1030
1260
  {
1031
1261
  "name": "other_amortization",
1032
1262
  "aliases": set(),
1033
1263
  "dataitemid": 2014,
1034
1264
  "spgi_name": "Other Amortization",
1265
+ "description": "Amortization charges not captured in major categories.",
1035
1266
  },
1036
1267
  {
1037
1268
  "name": "total_other_non_cash_items",
1038
1269
  "aliases": set(),
1039
1270
  "dataitemid": 2179,
1040
1271
  "spgi_name": "Other Non-Cash Items, Total",
1272
+ "description": "Aggregate of non-cash items affecting operating cash flow.",
1041
1273
  },
1042
1274
  {
1043
1275
  "name": "net_decrease_in_loans_originated_and_sold",
1044
1276
  "aliases": set(),
1045
1277
  "dataitemid": 2033,
1046
1278
  "spgi_name": "Net (Increase)/Decrease in Loans Orig/Sold",
1279
+ "description": "Net decrease in loans originated and sold impacting cash flow.",
1047
1280
  },
1048
1281
  {
1049
1282
  "name": "provision_for_credit_losses",
1050
1283
  "aliases": set(),
1051
1284
  "dataitemid": 2112,
1052
1285
  "spgi_name": "Provision for Credit Losses",
1286
+ "description": "Provision recorded for credit losses within the period.",
1053
1287
  },
1054
1288
  {
1055
1289
  "name": "loss_on_equity_investments",
1056
1290
  "aliases": set(),
1057
1291
  "dataitemid": 2086,
1058
1292
  "spgi_name": "(Income) Loss on Equity Invest.",
1293
+ "description": "Loss recognized on equity method or other equity investments.",
1059
1294
  },
1060
1295
  {
1061
1296
  "name": "stock_based_compensation",
1062
1297
  "aliases": set(),
1063
1298
  "dataitemid": 2127,
1064
1299
  "spgi_name": "Stock-Based Compensation",
1300
+ "description": "Expense recognized for stock-based employee compensation.",
1065
1301
  },
1066
1302
  {
1067
1303
  "name": "tax_benefit_from_stock_options",
1068
1304
  "aliases": set(),
1069
1305
  "dataitemid": 2135,
1070
1306
  "spgi_name": "Tax Benefit from Stock Options",
1307
+ "description": "Tax benefit realized from employee stock option exercises.",
1071
1308
  },
1072
1309
  {
1073
1310
  "name": "net_cash_from_discontinued_operation",
@@ -1076,66 +1313,77 @@ LINE_ITEMS: list[LineItemType] = [
1076
1313
  },
1077
1314
  "dataitemid": 2081,
1078
1315
  "spgi_name": "Net Cash From Discontinued Ops.",
1316
+ "description": "Net cash flow attributable to discontinued operations.",
1079
1317
  },
1080
1318
  {
1081
1319
  "name": "other_operating_activities",
1082
1320
  "aliases": set(),
1083
1321
  "dataitemid": 2047,
1084
1322
  "spgi_name": "Other Operating Activities",
1323
+ "description": "Other operating cash flow adjustments not listed elsewhere.",
1085
1324
  },
1086
1325
  {
1087
1326
  "name": "change_in_trading_asset_securities",
1088
1327
  "aliases": set(),
1089
1328
  "dataitemid": 2134,
1090
1329
  "spgi_name": "Change in Trad. Asset Securities",
1330
+ "description": "Cash impact from changes in trading asset securities.",
1091
1331
  },
1092
1332
  {
1093
1333
  "name": "change_in_accounts_receivable",
1094
1334
  "aliases": set(),
1095
1335
  "dataitemid": 2018,
1096
1336
  "spgi_name": "Change In Accounts Receivable",
1337
+ "description": "Operating cash flow impact from changes in accounts receivable.",
1097
1338
  },
1098
1339
  {
1099
1340
  "name": "change_in_inventories",
1100
1341
  "aliases": set(),
1101
1342
  "dataitemid": 2099,
1102
1343
  "spgi_name": "Change In Inventories",
1344
+ "description": "Change in inventory balances, typically from the cash flow statement.",
1103
1345
  },
1104
1346
  {
1105
1347
  "name": "change_in_accounts_payable",
1106
1348
  "aliases": set(),
1107
1349
  "dataitemid": 2017,
1108
1350
  "spgi_name": "Change in Acc. Payable",
1351
+ "description": "Operating cash flow impact from changes in accounts payable.",
1109
1352
  },
1110
1353
  {
1111
1354
  "name": "change_in_unearned_revenue",
1112
1355
  "aliases": set(),
1113
1356
  "dataitemid": 2139,
1114
1357
  "spgi_name": "Change in Unearned Rev.",
1358
+ "description": "Cash flow adjustment from changes in unearned revenue balances.",
1115
1359
  },
1116
1360
  {
1117
1361
  "name": "change_in_income_taxes",
1118
1362
  "aliases": set(),
1119
1363
  "dataitemid": 2101,
1120
1364
  "spgi_name": "Change in Inc. Taxes",
1365
+ "description": "Period-over-period change in income tax expense on the income statement.",
1121
1366
  },
1122
1367
  {
1123
1368
  "name": "change_in_deferred_taxes",
1124
1369
  "aliases": set(),
1125
1370
  "dataitemid": 2084,
1126
1371
  "spgi_name": "Change in Def. Taxes",
1372
+ "description": "Cash flow adjustment from changes in deferred tax balances.",
1127
1373
  },
1128
1374
  {
1129
1375
  "name": "change_in_other_net_operating_assets",
1130
1376
  "aliases": set(),
1131
1377
  "dataitemid": 2045,
1132
1378
  "spgi_name": "Change in Other Net Operating Assets",
1379
+ "description": "Change in other net operating assets affecting cash flow.",
1133
1380
  },
1134
1381
  {
1135
1382
  "name": "change_in_net_operating_assets",
1136
1383
  "aliases": set(),
1137
1384
  "dataitemid": 2010,
1138
1385
  "spgi_name": "Change in Net Operating Assets ",
1386
+ "description": "Aggregate change in net operating assets during the period.",
1139
1387
  },
1140
1388
  {
1141
1389
  "name": "cash_from_operations",
@@ -1145,6 +1393,7 @@ LINE_ITEMS: list[LineItemType] = [
1145
1393
  },
1146
1394
  "dataitemid": 2006,
1147
1395
  "spgi_name": "Cash from Ops.",
1396
+ "description": "Operating cash flow generated during the reporting period.",
1148
1397
  },
1149
1398
  {
1150
1399
  "name": "capital_expenditure",
@@ -1154,6 +1403,7 @@ LINE_ITEMS: list[LineItemType] = [
1154
1403
  },
1155
1404
  "dataitemid": 2021,
1156
1405
  "spgi_name": "Capital Expenditure",
1406
+ "description": "Cash outflows for capital expenditures during the period.",
1157
1407
  },
1158
1408
  {
1159
1409
  "name": "sale_of_property_plant_and_equipment",
@@ -1162,14 +1412,22 @@ LINE_ITEMS: list[LineItemType] = [
1162
1412
  },
1163
1413
  "dataitemid": 2042,
1164
1414
  "spgi_name": "Sale of Property, Plant, and Equipment",
1415
+ "description": "Cash inflows from selling property, plant, and equipment.",
1165
1416
  },
1166
1417
  {
1167
1418
  "name": "cash_acquisitions",
1168
1419
  "aliases": set(),
1169
1420
  "dataitemid": 2057,
1170
1421
  "spgi_name": "Cash Acquisitions",
1422
+ "description": "Cash paid for acquisitions of businesses or assets.",
1423
+ },
1424
+ {
1425
+ "name": "divestitures",
1426
+ "aliases": set(),
1427
+ "dataitemid": 2077,
1428
+ "spgi_name": "Divestitures",
1429
+ "description": "Cash proceeds or impact from divested businesses or assets (distinct from sale_of_real_estate).",
1171
1430
  },
1172
- {"name": "divestitures", "aliases": set(), "dataitemid": 2077, "spgi_name": "Divestitures"},
1173
1431
  {
1174
1432
  "name": "sale_of_real_estate",
1175
1433
  "aliases": {
@@ -1178,6 +1436,7 @@ LINE_ITEMS: list[LineItemType] = [
1178
1436
  },
1179
1437
  "dataitemid": 2040,
1180
1438
  "spgi_name": "Sale (Purchase) of Real Estate properties",
1439
+ "description": "Proceeds from real estate sales (distinct from broader divestitures).",
1181
1440
  },
1182
1441
  {
1183
1442
  "name": "sale_of_intangible_assets",
@@ -1187,30 +1446,35 @@ LINE_ITEMS: list[LineItemType] = [
1187
1446
  },
1188
1447
  "dataitemid": 2029,
1189
1448
  "spgi_name": "Sale (Purchase) of Intangible assets",
1449
+ "description": "Cash received from selling intangible assets.",
1190
1450
  },
1191
1451
  {
1192
1452
  "name": "net_cash_from_investments",
1193
1453
  "aliases": set(),
1194
1454
  "dataitemid": 2027,
1195
1455
  "spgi_name": "Net Cash from Investments",
1456
+ "description": "Net cash flow provided by investing activities overall.",
1196
1457
  },
1197
1458
  {
1198
1459
  "name": "net_decrease_in_investment_loans_originated_and_sold",
1199
1460
  "aliases": set(),
1200
1461
  "dataitemid": 2032,
1201
1462
  "spgi_name": "Net (Increase)/Decrease in Loans Orig/Sold",
1463
+ "description": "Net decrease in investment loans originated and sold.",
1202
1464
  },
1203
1465
  {
1204
1466
  "name": "other_investing_activities",
1205
1467
  "aliases": set(),
1206
1468
  "dataitemid": 2051,
1207
1469
  "spgi_name": "Other Investing Activities",
1470
+ "description": "Miscellaneous investing cash flow activities.",
1208
1471
  },
1209
1472
  {
1210
1473
  "name": "total_other_investing_activities",
1211
1474
  "aliases": set(),
1212
1475
  "dataitemid": 2177,
1213
1476
  "spgi_name": "Other Investing Activities, Total",
1477
+ "description": "Aggregate of other investing cash flow activities.",
1214
1478
  },
1215
1479
  {
1216
1480
  "name": "cash_from_investing",
@@ -1221,6 +1485,7 @@ LINE_ITEMS: list[LineItemType] = [
1221
1485
  },
1222
1486
  "dataitemid": 2005,
1223
1487
  "spgi_name": "Cash from Investing",
1488
+ "description": "Cash provided by investing activities.",
1224
1489
  },
1225
1490
  {
1226
1491
  "name": "short_term_debt_issued",
@@ -1229,6 +1494,7 @@ LINE_ITEMS: list[LineItemType] = [
1229
1494
  },
1230
1495
  "dataitemid": 2043,
1231
1496
  "spgi_name": "Short Term Debt Issued",
1497
+ "description": "Cash inflows from issuing short-term debt.",
1232
1498
  },
1233
1499
  {
1234
1500
  "name": "long_term_debt_issued",
@@ -1237,12 +1503,14 @@ LINE_ITEMS: list[LineItemType] = [
1237
1503
  },
1238
1504
  "dataitemid": 2034,
1239
1505
  "spgi_name": "Long-Term Debt Issued",
1506
+ "description": "Cash inflows from issuing long-term debt.",
1240
1507
  },
1241
1508
  {
1242
1509
  "name": "total_debt_issued",
1243
1510
  "aliases": set(),
1244
1511
  "dataitemid": 2161,
1245
1512
  "spgi_name": "Total Debt Issued",
1513
+ "description": "Aggregate debt issuance during the period.",
1246
1514
  },
1247
1515
  {
1248
1516
  "name": "short_term_debt_repaid",
@@ -1251,6 +1519,7 @@ LINE_ITEMS: list[LineItemType] = [
1251
1519
  },
1252
1520
  "dataitemid": 2044,
1253
1521
  "spgi_name": "Short Term Debt Repaid",
1522
+ "description": "Cash outflows from repaying short-term debt.",
1254
1523
  },
1255
1524
  {
1256
1525
  "name": "long_term_debt_repaid",
@@ -1259,48 +1528,56 @@ LINE_ITEMS: list[LineItemType] = [
1259
1528
  },
1260
1529
  "dataitemid": 2036,
1261
1530
  "spgi_name": "Long-Term Debt Repaid",
1531
+ "description": "Cash outflows from repaying long-term debt.",
1262
1532
  },
1263
1533
  {
1264
1534
  "name": "total_debt_repaid",
1265
1535
  "aliases": set(),
1266
1536
  "dataitemid": 2166,
1267
1537
  "spgi_name": "Total Debt Repaid",
1538
+ "description": "Aggregate debt repayments during the period.",
1268
1539
  },
1269
1540
  {
1270
1541
  "name": "issuance_of_common_stock",
1271
1542
  "aliases": set(),
1272
1543
  "dataitemid": 2169,
1273
1544
  "spgi_name": "Issuance of Common Stock",
1545
+ "description": "Cash inflows from issuing common stock.",
1274
1546
  },
1275
1547
  {
1276
1548
  "name": "repurchase_of_common_stock",
1277
1549
  "aliases": set(),
1278
1550
  "dataitemid": 2164,
1279
1551
  "spgi_name": "Repurchase of Common Stock",
1552
+ "description": "Cash outflows for repurchasing common stock.",
1280
1553
  },
1281
1554
  {
1282
1555
  "name": "issuance_of_preferred_stock",
1283
1556
  "aliases": set(),
1284
1557
  "dataitemid": 2181,
1285
1558
  "spgi_name": "Issuance of Preferred Stock",
1559
+ "description": "Cash inflows from issuing preferred stock.",
1286
1560
  },
1287
1561
  {
1288
1562
  "name": "repurchase_of_preferred_stock",
1289
1563
  "aliases": set(),
1290
1564
  "dataitemid": 2172,
1291
1565
  "spgi_name": "Repurchase of Preferred Stock",
1566
+ "description": "Cash outflows for repurchasing preferred stock.",
1292
1567
  },
1293
1568
  {
1294
1569
  "name": "common_dividends_paid",
1295
1570
  "aliases": set(),
1296
1571
  "dataitemid": 2074,
1297
1572
  "spgi_name": "Common Dividends Paid",
1573
+ "description": "Cash dividends paid to common shareholders.",
1298
1574
  },
1299
1575
  {
1300
1576
  "name": "preferred_dividends_paid",
1301
1577
  "aliases": set(),
1302
1578
  "dataitemid": 2116,
1303
1579
  "spgi_name": "Pref. Dividends Paid",
1580
+ "description": "Dividends paid to preferred shareholders.",
1304
1581
  },
1305
1582
  {
1306
1583
  "name": "total_dividends_paid",
@@ -1309,18 +1586,21 @@ LINE_ITEMS: list[LineItemType] = [
1309
1586
  },
1310
1587
  "dataitemid": 2022,
1311
1588
  "spgi_name": "Total Dividends Paid",
1589
+ "description": "Total dividends paid during the period.",
1312
1590
  },
1313
1591
  {
1314
1592
  "name": "special_dividends_paid",
1315
1593
  "aliases": set(),
1316
1594
  "dataitemid": 2041,
1317
1595
  "spgi_name": "Special Dividend Paid",
1596
+ "description": "Cash outflows for special or one-time dividends.",
1318
1597
  },
1319
1598
  {
1320
1599
  "name": "other_financing_activities",
1321
1600
  "aliases": set(),
1322
1601
  "dataitemid": 2050,
1323
1602
  "spgi_name": "Other Financing Activities",
1603
+ "description": "Miscellaneous financing cash flow activities.",
1324
1604
  },
1325
1605
  {
1326
1606
  "name": "cash_from_financing",
@@ -1331,6 +1611,7 @@ LINE_ITEMS: list[LineItemType] = [
1331
1611
  },
1332
1612
  "dataitemid": 2004,
1333
1613
  "spgi_name": "Cash from Financing",
1614
+ "description": "Cash provided by financing activities.",
1334
1615
  },
1335
1616
  {
1336
1617
  "name": "foreign_exchange_rate_adjustments",
@@ -1340,6 +1621,7 @@ LINE_ITEMS: list[LineItemType] = [
1340
1621
  },
1341
1622
  "dataitemid": 2144,
1342
1623
  "spgi_name": "Foreign Exchange Rate Adj.",
1624
+ "description": "Adjustments from changes in foreign exchange rates.",
1343
1625
  },
1344
1626
  {
1345
1627
  "name": "miscellaneous_cash_flow_adjustments",
@@ -1348,6 +1630,7 @@ LINE_ITEMS: list[LineItemType] = [
1348
1630
  },
1349
1631
  "dataitemid": 2149,
1350
1632
  "spgi_name": "Misc. Cash Flow Adj.",
1633
+ "description": "Miscellaneous adjustments affecting total cash flow.",
1351
1634
  },
1352
1635
  {
1353
1636
  "name": "net_change_in_cash",
@@ -1356,24 +1639,28 @@ LINE_ITEMS: list[LineItemType] = [
1356
1639
  },
1357
1640
  "dataitemid": 2093,
1358
1641
  "spgi_name": "Net Change in Cash",
1642
+ "description": "Net change in cash during the reporting period.",
1359
1643
  },
1360
1644
  {
1361
1645
  "name": "depreciation",
1362
1646
  "aliases": set(),
1363
1647
  "dataitemid": 2143,
1364
1648
  "spgi_name": "Depreciation (From Notes)",
1649
+ "description": "Depreciation expense recognized during the period.",
1365
1650
  },
1366
1651
  {
1367
1652
  "name": "depreciation_of_rental_assets",
1368
1653
  "aliases": set(),
1369
1654
  "dataitemid": 42409,
1370
1655
  "spgi_name": "Depreciation of Rental Assets",
1656
+ "description": "Depreciation charge specific to rental assets.",
1371
1657
  },
1372
1658
  {
1373
1659
  "name": "sale_proceeds_from_rental_assets",
1374
1660
  "aliases": set(),
1375
1661
  "dataitemid": 42411,
1376
1662
  "spgi_name": "Sale Proceeds from Rental Assets",
1663
+ "description": "Cash inflows from selling rental assets.",
1377
1664
  },
1378
1665
  {
1379
1666
  "name": "basic_eps",
@@ -1384,6 +1671,7 @@ LINE_ITEMS: list[LineItemType] = [
1384
1671
  },
1385
1672
  "dataitemid": 9,
1386
1673
  "spgi_name": "Basic EPS",
1674
+ "description": "Basic earnings per share; use sparingly when explicitly requested.",
1387
1675
  },
1388
1676
  {
1389
1677
  "name": "basic_eps_excluding_extra_items",
@@ -1392,6 +1680,7 @@ LINE_ITEMS: list[LineItemType] = [
1392
1680
  },
1393
1681
  "dataitemid": 3064,
1394
1682
  "spgi_name": "Basic EPS Excl. Extra Items",
1683
+ "description": "Basic EPS calculated excluding extraordinary items.",
1395
1684
  },
1396
1685
  {
1397
1686
  "name": "basic_eps_from_accounting_change",
@@ -1400,6 +1689,7 @@ LINE_ITEMS: list[LineItemType] = [
1400
1689
  },
1401
1690
  "dataitemid": 145,
1402
1691
  "spgi_name": "Basic EPS - Accounting Change",
1692
+ "description": "",
1403
1693
  },
1404
1694
  {
1405
1695
  "name": "basic_eps_from_extraordinary_items",
@@ -1408,6 +1698,7 @@ LINE_ITEMS: list[LineItemType] = [
1408
1698
  },
1409
1699
  "dataitemid": 146,
1410
1700
  "spgi_name": "Basic EPS - Extraordinary Items",
1701
+ "description": "Basic EPS attributable solely to extraordinary items.",
1411
1702
  },
1412
1703
  {
1413
1704
  "name": "basic_eps_from_accounting_change_and_extraordinary_items",
@@ -1416,12 +1707,14 @@ LINE_ITEMS: list[LineItemType] = [
1416
1707
  },
1417
1708
  "dataitemid": 45,
1418
1709
  "spgi_name": "Basic EPS - Extraordinary Items & Accounting Change",
1710
+ "description": "Basic EPS from accounting changes and extraordinary items combined.",
1419
1711
  },
1420
1712
  {
1421
1713
  "name": "weighted_average_basic_shares_outstanding",
1422
1714
  "aliases": set(),
1423
1715
  "dataitemid": 3217,
1424
1716
  "spgi_name": "Weighted Avg. Basic Shares Out.",
1717
+ "description": "Weighted average basic shares used in EPS calculations.",
1425
1718
  },
1426
1719
  {
1427
1720
  "name": "diluted_eps",
@@ -1432,6 +1725,7 @@ LINE_ITEMS: list[LineItemType] = [
1432
1725
  },
1433
1726
  "dataitemid": 8,
1434
1727
  "spgi_name": "Diluted EPS",
1728
+ "description": "Diluted earnings per share measure.",
1435
1729
  },
1436
1730
  {
1437
1731
  "name": "diluted_eps_excluding_extra_items",
@@ -1440,12 +1734,14 @@ LINE_ITEMS: list[LineItemType] = [
1440
1734
  },
1441
1735
  "dataitemid": 142,
1442
1736
  "spgi_name": "Diluted EPS Excl. Extra Items",
1737
+ "description": "Diluted EPS calculated excluding extraordinary items.",
1443
1738
  },
1444
1739
  {
1445
1740
  "name": "weighted_average_diluted_shares_outstanding",
1446
1741
  "aliases": set(),
1447
1742
  "dataitemid": 342,
1448
1743
  "spgi_name": "Weighted Avg. Diluted Shares Out.",
1744
+ "description": "Weighted average diluted shares used in EPS calculations.",
1449
1745
  },
1450
1746
  {
1451
1747
  "name": "normalized_basic_eps",
@@ -1454,6 +1750,7 @@ LINE_ITEMS: list[LineItemType] = [
1454
1750
  },
1455
1751
  "dataitemid": 4379,
1456
1752
  "spgi_name": "Normalized Basic EPS",
1753
+ "description": "Normalized basic earnings per share metric.",
1457
1754
  },
1458
1755
  {
1459
1756
  "name": "normalized_diluted_eps",
@@ -1462,18 +1759,21 @@ LINE_ITEMS: list[LineItemType] = [
1462
1759
  },
1463
1760
  "dataitemid": 4380,
1464
1761
  "spgi_name": "Normalized Diluted EPS",
1762
+ "description": "Normalized diluted earnings per share metric.",
1465
1763
  },
1466
1764
  {
1467
1765
  "name": "dividends_per_share",
1468
1766
  "aliases": set(),
1469
1767
  "dataitemid": 3058,
1470
1768
  "spgi_name": "Dividends per share",
1769
+ "description": "Cash dividends declared per share.",
1471
1770
  },
1472
1771
  {
1473
1772
  "name": "distributable_cash_per_share",
1474
1773
  "aliases": set(),
1475
1774
  "dataitemid": 23317,
1476
1775
  "spgi_name": "Distributable Cash per Share",
1776
+ "description": "Distributable cash available per share.",
1477
1777
  },
1478
1778
  {
1479
1779
  "name": "diluted_eps_from_accounting_change_and_extraordinary_items",
@@ -1482,6 +1782,7 @@ LINE_ITEMS: list[LineItemType] = [
1482
1782
  },
1483
1783
  "dataitemid": 44,
1484
1784
  "spgi_name": "Diluted EPS - Extraordinary Items & Accounting Change",
1785
+ "description": "Diluted EPS attributable to accounting changes and extraordinary items.",
1485
1786
  },
1486
1787
  {
1487
1788
  "name": "diluted_eps_from_accounting_change",
@@ -1490,6 +1791,7 @@ LINE_ITEMS: list[LineItemType] = [
1490
1791
  },
1491
1792
  "dataitemid": 141,
1492
1793
  "spgi_name": "Diluted EPS - Accounting Change",
1794
+ "description": "Diluted EPS impact from accounting changes.",
1493
1795
  },
1494
1796
  {
1495
1797
  "name": "diluted_eps_from_extraordinary_items",
@@ -1498,6 +1800,7 @@ LINE_ITEMS: list[LineItemType] = [
1498
1800
  },
1499
1801
  "dataitemid": 144,
1500
1802
  "spgi_name": "Diluted EPS - Extraordinary Items",
1803
+ "description": "Diluted EPS attributable to extraordinary items.",
1501
1804
  },
1502
1805
  {
1503
1806
  "name": "diluted_eps_from_discontinued_operations",
@@ -1506,6 +1809,7 @@ LINE_ITEMS: list[LineItemType] = [
1506
1809
  },
1507
1810
  "dataitemid": 143,
1508
1811
  "spgi_name": "Diluted EPS - Discontinued Operations",
1812
+ "description": "Diluted EPS attributable to discontinued operations.",
1509
1813
  },
1510
1814
  {
1511
1815
  "name": "funds_from_operations",
@@ -1514,6 +1818,7 @@ LINE_ITEMS: list[LineItemType] = [
1514
1818
  },
1515
1819
  "dataitemid": 3074,
1516
1820
  "spgi_name": "FFO",
1821
+ "description": "Funds from operations metric (often for REITs).",
1517
1822
  },
1518
1823
  {
1519
1824
  "name": "ebitda",
@@ -1522,6 +1827,7 @@ LINE_ITEMS: list[LineItemType] = [
1522
1827
  },
1523
1828
  "dataitemid": 4051,
1524
1829
  "spgi_name": "EBITDA",
1830
+ "description": "Earnings before interest, taxes, depreciation, and amortization.",
1525
1831
  },
1526
1832
  {
1527
1833
  "name": "ebita",
@@ -1530,6 +1836,7 @@ LINE_ITEMS: list[LineItemType] = [
1530
1836
  },
1531
1837
  "dataitemid": 100689,
1532
1838
  "spgi_name": "EBITA",
1839
+ "description": "Earnings before interest, taxes, and amortization.",
1533
1840
  },
1534
1841
  {
1535
1842
  "name": "ebit",
@@ -1538,6 +1845,7 @@ LINE_ITEMS: list[LineItemType] = [
1538
1845
  },
1539
1846
  "dataitemid": 400,
1540
1847
  "spgi_name": "EBIT",
1848
+ "description": "Earnings before interest and taxes.",
1541
1849
  },
1542
1850
  {
1543
1851
  "name": "ebitdar",
@@ -1546,8 +1854,15 @@ LINE_ITEMS: list[LineItemType] = [
1546
1854
  },
1547
1855
  "dataitemid": 21674,
1548
1856
  "spgi_name": "EBITDAR",
1857
+ "description": "Earnings before interest, taxes, depreciation, amortization, and rent.",
1858
+ },
1859
+ {
1860
+ "name": "net_debt",
1861
+ "aliases": set(),
1862
+ "dataitemid": 4364,
1863
+ "spgi_name": "Net Debt",
1864
+ "description": "Net debt calculated as total debt minus cash and cash equivalents.",
1549
1865
  },
1550
- {"name": "net_debt", "aliases": set(), "dataitemid": 4364, "spgi_name": "Net Debt"},
1551
1866
  {
1552
1867
  "name": "effective_tax_rate",
1553
1868
  "aliases": {
@@ -1555,38 +1870,56 @@ LINE_ITEMS: list[LineItemType] = [
1555
1870
  },
1556
1871
  "dataitemid": 4376,
1557
1872
  "spgi_name": "Effective Tax Rate %",
1873
+ "description": "Effective tax rate metric for the period.",
1874
+ },
1875
+ {
1876
+ "name": "current_ratio",
1877
+ "aliases": set(),
1878
+ "dataitemid": 4030,
1879
+ "spgi_name": "Current Ratio",
1880
+ "description": "Current assets divided by current liabilities.",
1881
+ },
1882
+ {
1883
+ "name": "quick_ratio",
1884
+ "aliases": set(),
1885
+ "dataitemid": 4121,
1886
+ "spgi_name": "Quick Ratio",
1887
+ "description": "Quick assets divided by current liabilities.",
1558
1888
  },
1559
- {"name": "current_ratio", "aliases": set(), "dataitemid": 4030, "spgi_name": "Current Ratio"},
1560
- {"name": "quick_ratio", "aliases": set(), "dataitemid": 4121, "spgi_name": "Quick Ratio"},
1561
1889
  {
1562
1890
  "name": "total_debt_to_capital",
1563
1891
  "aliases": set(),
1564
1892
  "dataitemid": 43907,
1565
1893
  "spgi_name": "Total Debt to Capital (%)",
1894
+ "description": "Total debt divided by total capital (debt plus equity).",
1566
1895
  },
1567
1896
  {
1568
1897
  "name": "net_working_capital",
1569
1898
  "aliases": set(),
1570
1899
  "dataitemid": 1311,
1571
1900
  "spgi_name": "Net Working Capital",
1901
+ "description": "Net working capital (current assets minus current liabilities).",
1572
1902
  },
1573
1903
  {
1574
1904
  "name": "working_capital",
1575
1905
  "aliases": set(),
1576
1906
  "dataitemid": 4165,
1577
1907
  "spgi_name": "Working Capital",
1908
+ "description": "Alternate label for net working capital.",
1578
1909
  },
1579
1910
  {
1580
1911
  "name": "change_in_net_working_capital",
1581
1912
  "aliases": set(),
1582
1913
  "dataitemid": 4421,
1583
1914
  "spgi_name": "Change In Net Working Capital",
1915
+ "description": "Change in net working capital over the period.",
1584
1916
  },
1585
1917
  {
1586
1918
  "name": "total_debt",
1587
1919
  "aliases": set(),
1588
1920
  "dataitemid": 4173,
1589
1921
  "spgi_name": "Total Debt",
1922
+ "description": "Total debt outstanding.",
1590
1923
  },
1591
1924
  {
1592
1925
  "name": "total_debt_to_equity_ratio",
@@ -1598,8 +1931,31 @@ LINE_ITEMS: list[LineItemType] = [
1598
1931
  },
1599
1932
  "dataitemid": 4034,
1600
1933
  "spgi_name": "Total Debt/Equity",
1934
+ "description": "Total debt divided by total equity.",
1601
1935
  },
1602
1936
  ]
1603
1937
  LINE_ITEM_NAMES_AND_ALIASES: list[str] = list(
1604
1938
  chain(*[[line_item["name"]] + list(line_item["aliases"]) for line_item in LINE_ITEMS])
1605
1939
  )
1940
+
1941
+
1942
+ def _get_line_item_to_descriptions_map() -> dict[str, str]:
1943
+ """Build line item to descriptions mapping from LINE_ITEMS data structure."""
1944
+ descriptors = {}
1945
+
1946
+ for item in LINE_ITEMS:
1947
+ name = item["name"]
1948
+ description = item.get("description", "")
1949
+ if description: # Only include items with descriptions
1950
+ descriptors[name] = description
1951
+
1952
+ # Also include aliases with the same description
1953
+ for alias in item["aliases"]:
1954
+ if description:
1955
+ descriptors[alias] = description
1956
+
1957
+ return descriptors
1958
+
1959
+
1960
+ # Pre-computed constant to avoid recreating on each validation error
1961
+ LINE_ITEM_TO_DESCRIPTIONS_MAP: dict[str, str] = _get_line_item_to_descriptions_map()