- Home
- Skills
- Trading & Investing
- Brazil Stock Fundamentals from CVM Open Data
Brazil Stock Fundamentals from CVM Open Data
Brazilian stock fundamentals straight from CVM open data, with the traps that silently corrupt banks, holdings and quarterly numbers handled.
Free
Works with the AI Agents you already use
Brazil Stock Fundamentals from CVM Open Data
Example session with this skill installed
What was WEG S.A. net income attributable to the controlling shareholders in fiscal year 2025, according to CVM data? Give the number in BRL.
- Read your context and instructions
- Compiled the brazil stock fundamentals
WEG S.A. reported net income attributable to the controlling shareholders of
R$ 6,376,219,000 (about R$ 6.38 billion) for fiscal year 2025.
- Source: CVM's annual financial statements file (DFP) for 2025, period ending 2025-12-31, version 1 of the filing.
- Statement: consolidated. The figure is account 3.11.01, "Atribuído a Sócios da Empresa Controladora".
- Scale: I applied the file's thousands-of-BRL scale, so the number is in full reais.
Total net income: consolidated net income including minority interests was R$ 6,775,958,000. The difference is the share attributable to minority holders.
I didn't cross-check this against WEG's earnings release.
Real output from a Claude Code session with this skill installed.
Connects securely to your tools. The creator never sees your data.
About this skill
Acquiring clean financial data for Brazilian listed companies is notoriously difficult due to CVM's idiosyncratic data structures. This skill solves the problem of "plausible but wrong" numbers by accounting for the specific traps found in B3 filings, such as bank-specific charts of accounts and restated versions.
What it does
- Extracts annual fundamentals from CVM open data (DFP) with a bundled script, no API key needed, and documents how to read the quarterly ITR files.
- Normalizes financial lines for banks and insurers by matching descriptions instead of fragile account codes.
- Handles restatements by automatically identifying and using the highest version number for any given reporting period.
- Applies currency scaling correctly using
ESCALA_MOEDAto prevent 1,000x calculation errors in revenue or equity. - Explains quarterly math: which ITR lines are cumulative, how to isolate a quarter, and why Q4 = annual DFP minus 9-month cumulative.
How it works
- Download the annual (DFP) or quarterly (ITR) ZIP files directly from the CVM open data portal.
- Filter the CSV files for the latest version and the current reporting period (
ORDEM_EXERC == "ÚLTIMO"). - Run
cvm_dfp.pywith a CVM code, CNPJ or company name to extract key annual figures (ticker-to-CVM-code mapping is documented, not automated). - Review the generated output which includes revenue, EBIT, net income, assets, and equity with the source account codes.
Frameworks & tools
The logic is implemented in Python using the standard library. It processes CSV files encoded in Latin-1 with semicolon separators, reading the DRE, BPA and BPP statements (consolidated first, individual as fallback).
Why this beats prompting it yourself
Generic AI models often hallucinate bank equity or miss the fact that CVM income statements are cumulative. This skill uses a hardened logic for Brazilian accounting standards, ensuring you do not mix consolidated and individual statements or ignore minority interest adjustments.
Use cases
- Build a custom stock screener using primary audited data from the Brazilian regulator.
- Verify the accuracy of commercial financial data providers during due diligence.
- Automate the extraction of historical P/E and ROE ratios for B3 companies.
Known limitations
Does not provide investment advice. Ticker mapping requires B3 listed-company data to bridge ticker roots to CVM codes. Share count calibration is required for accurate EPS calculations.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.
Requires external mapping for ticker-to-CVM code resolution. Quarterly cash flows require manual subtraction of consecutive periods. Banks have no revenue or EBIT lines by design.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 16 days ago
- Free with an Agensi account
- Accounts
Cvm
- Software
Python 3.8+
Permissions
Allowed Hosts