Brazil Stock Fundamentals from CVM Open Data

    1

    Brazilian stock fundamentals straight from CVM open data, with the traps that silently corrupt banks, holdings and quarterly numbers handled.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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_MOEDA to 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

    1. Download the annual (DFP) or quarterly (ITR) ZIP files directly from the CVM open data portal.
    2. Filter the CSV files for the latest version and the current reporting period (ORDEM_EXERC == "ÚLTIMO").
    3. Run cvm_dfp.py with a CVM code, CNPJ or company name to extract key annual figures (ticker-to-CVM-code mapping is documented, not automated).
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Network Access

    Allowed Hosts

    dados.cvm.gov.br
    Listed16 days ago

    What's inside

    Frequently Asked Questions

    Unlike generic financial scrapers, this skill accounts for the unique Brazilian CVM reporting structure, specifically handling bank-specific account charts, currency scaling (1,000x multipliers), and the subtraction logic required to extract quarterly data from cumulative reports.

    The skill is designed to work with Python-based AI agents and can be integrated into any workflow that supports Python scripts for data processing and CSV analysis.

    A SKILL.md with the CVM file layout and ten documented traps (bank charts of accounts, consolidated vs individual, versions, scale, cumulative quarters, share counts, ticker mapping), plus scripts/cvm_dfp.py, which downloads a year of DFP data and returns key annual figures for one company. It is free.

    No, this skill is designed to pull data directly from CVM's open data portal, allowing you to bypass expensive third-party financial API subscriptions for B3 stock fundamentals.

    Yes, by utilizing the ORDEM_EXERC flag and version tracking, the skill automatically identifies and extracts the most recent restated versions of financial statements to ensure you are not using outdated figures.

    While it extracts all core fundamentals, you will need to provide share count data to calculate per-share metrics like EPS, as share counts can vary significantly based on the class of stock (ON/PN).

    New in Trading & Investing

    Free