Skip to content

Commit 8ff039e

Browse files
dgunningclaude
andcommitted
Update remaining docs with view parameter for stitched statements
- getting-xbrl.md: Add view="detailed" to stitched statement examples - financial-data.md: Show view works on multi-period XBRLS calls - xbrl/skill.yaml: Add multi-period stitched statements pattern with view - financials/sharp-edges.yaml: Add sharp edge preferring view over include_dimensions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5ae9e7c commit 8ff039e

4 files changed

Lines changed: 35 additions & 2 deletions

File tree

‎docs/getting-xbrl.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ stitched_statements = xbrls.statements
6969
income_trend = stitched_statements.income_statement()
7070
balance_sheet_trend = stitched_statements.balance_sheet()
7171
cashflow_trend = stitched_statements.cashflow_statement()
72+
73+
# Use view="detailed" to include dimensional breakdowns across periods
74+
income_detailed = stitched_statements.income_statement(view="detailed")
7275
```
7376

7477
## User-Friendly Features
@@ -196,14 +199,17 @@ The rendering engine automatically handles:
196199
- Fiscal period indicators in statement titles
197200
- Unit notes (e.g., "In millions, except per share data")
198201

199-
For stitched multi-period statements, you can control the number of periods and date formatting:
202+
For stitched multi-period statements, you can control periods, date formatting, and dimensional detail:
200203

201204
```python
202205
# Get 3-year comparison with full date ranges
203206
annual_trend = stitched_statements.income_statement(
204-
max_periods=3,
207+
max_periods=3,
205208
show_date_range=True
206209
)
210+
211+
# Include dimensional breakdowns (e.g., cost by segment across years)
212+
detailed_trend = stitched_statements.income_statement(view="detailed")
207213
```
208214

209215
## Advanced Features

‎docs/guides/financial-data.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,12 @@ xbrls = XBRLS.from_filings(filings)
211211

212212
# Get income statement across all periods
213213
income = xbrls.statements.income_statement()
214+
215+
# Use view="detailed" for dimensional breakdowns across periods
216+
income_detailed = xbrls.statements.income_statement(view="detailed")
214217
```
215218

219+
The `view` parameter works the same as on single-period statements (`"standard"`, `"detailed"`, `"summary"`).
216220
This aligns the periods and concepts across filings for easy comparison.
217221

218222
**Learn more:** [Multi-Period Analysis Guide](../xbrl/guides/multi-period-analysis.md)

‎edgar/ai/skills/financials/sharp-edges.yaml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ sharp_edges:
6767
print(financials.balance_sheet())
6868
detection_pattern: '\.iloc\[.*\]\.get|statement\(\)\[|balance_sheet\(\)\['
6969

70+
- id: include-dimensions-vs-view
71+
summary: Use view= instead of include_dimensions= for dimensional control
72+
severity: low
73+
solution: |
74+
# PREFERRED: view parameter (works on single and stitched statements)
75+
income = financials.income_statement(view="detailed")
76+
income = multi_financials.income_statement(view="detailed")
77+
78+
# LEGACY: include_dimensions boolean (still works but less expressive)
79+
income = financials.income_statement(include_dimensions=True)
80+
detection_pattern: 'include_dimensions\s*=\s*True'
81+
7082
- id: value-scale-assumptions
7183
summary: Financial values are in actual dollars, not thousands/millions
7284
severity: low

‎edgar/ai/skills/xbrl/skill.yaml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ patterns:
3535
facts.get_facts_with_dimensions() # Segment breakdowns
3636
facts.get_facts_by_fiscal_period(2024, "FY") # Specific period
3737
38+
- name: Multi-Period Stitched Statements
39+
when: Compare statements across multiple filings
40+
code: |
41+
from edgar.xbrl import XBRLS
42+
filings = company.get_filings(form="10-K").head(3)
43+
xbrls = XBRLS.from_filings(filings)
44+
45+
income = xbrls.statements.income_statement() # standard view
46+
income = xbrls.statements.income_statement(view="detailed") # with dimensional breakdowns
47+
df = income.to_dataframe()
48+
3849
- name: Concept History
3950
when: Track a value over time
4051
code: |

0 commit comments

Comments
 (0)