Dados B3 › Guides › Look-ahead-free backtesting
Guide · Backtesting & multiples
Look-ahead-free backtesting: why the Dec-31 P/E lies
There's a silent error in almost every backtest of Brazilian stocks. It throws no exception, shows up on no chart — it just inflates the result and makes a mediocre strategy look brilliant. It's called look-ahead bias.
The error
You want to test "buy low-P/E stocks". You take earnings from the 2023 annual report and divide the Dec 31, 2023 price by them. Looks right. It isn't.
A company's annual report for a fiscal year ending Dec 31 does not exist publicly on Dec 31. It's published months later — typically February–March of the next year. Using the Dec-31 price with those earnings means using a quote the market had before it knew the number. It's time travel: the backtest "knows" a result nobody knew that day.
The right way: point-in-time
The multiple must use the price of the first trading session on or after the date the report became public — not the fiscal-year close. That way the P/E reflects what you could have paid, with the information that actually existed.
A real case measured in our database — WEG's 2025 annual report:
That's nearly two months of gap. Multiply it across hundreds of companies and 16 years, and look-ahead bias becomes the difference between an honest backtest and an illusion.
How Dados B3 does it
Every multiple (annual P/E, P/B, EV/EBITDA; quarterly trailing P/E) uses the price of the first session on/after dt_receb — the real date the regulator received the filing, recorded on the document's own cover. Nothing is paired with the period close. And the share count is the snapshot in force on that date, not at fiscal year-end — so a stock split in between doesn't silently break the market cap.
Why it matters to you
- If you backtest or do quant research, it's the difference between a replicable result and a number that won't survive the real world.
- If you just compare multiples today, you get the guarantee that the history wasn't "dressed up" by date bias.
- It's auditable: each multiple shows
dt_receband the exact session used.