EventListFile, Earnings Exclusion, and Float Lookahead Traps in RealTest
Import historical earnings dates, FOMC announcements, or point-in-time fundamental events into RealTest via Import EventListFile with columns Symbol,Date,Type,Value, query exact event bars using Event(1) or forward-filled values via Event(1, 1), and never use InfoFloat or InfoShares historically because they return today's current value across all past bars.
- RealTest loads historical date-stamped events inside the Import section using EventListFile (NOT EventList), pointing to a CSV formatted strictly as Symbol,Date,Type,Value where Type is any positive integer.
- Event(type) returns the event Value exclusively on the exact matching bar date and 0 on all other bars, whereas Event(type, 1) forward-fills the most recent point-in-time event value cleanly without lookahead.
- Build a backward-looking earnings or macro cooldown window using CountTrue(Event(1) <> 0, 3) > 0, and remember that skipping entries BEFORE an upcoming earnings date requires a pre-scheduled calendar date rather than post-announcement timestamps.
- Critical lookahead warning confirmed in official RealTest docs is that InfoFloat and InfoShares are NOT historical time series and always reflect today's current float or share count across every historical bar.
- To backtest float, short interest, or quarterly EPS surprises honestly without lookahead bias, load dated snapshots via EventListFile (Type 2, Type 3) and read them via Event(2, 1) or store daily values in CSV Extra columns.
- Validated in RealTest 2.0 on SPY from 2015 through 2024 ($100,000 start), spy_skip_events cleanly filtered out 5 scheduled quarterly event-window entries (134 trades, $139,801) compared to spy_ignore_events (139 trades, $143,316), plotting each Event_Flag marker directly on the chart.
Filtering out earnings announcements, FOMC meetings, low-float squeeze traps, and historical short-interest spikes ranks among the most heavily requested advanced topics on the RealTest user forum. Yet almost every AI-generated script gets two critical RealTest details wrong. It hallucinates EventList: instead of EventListFile:, and it happily inserts InfoFloat < 20000000 into a 10-year small-cap backtest without realizing InfoFloat is NOT historical!
Every import directive and event function below matches the official RealTest EventListFile and Event documentation and was compiled, imported (-import), and backtested (-test) live in RealTest 2.0.
Exact EventListFile Format, Event() Syntax, and the InfoFloat Lookahead Trap
RealTest stores event series right inside your compiled .rtd binary file during Import: so event lookups execute at native C++ speed during backtests and scans.
| Event / Fundamental Task | Broken Hallucination or Lookahead Trap | Validated RealTest 2.0 Syntax |
|---|---|---|
| Attach event CSV during import |
EventList: events.csv (parse error!) |
EventListFile: C:\RealTest\Data\spy_events_demo.csv inside Import
|
| Required CSV columns | Ticker,EventDate,EPS |
Header Symbol,Date,Type,Value (Type is integer > 0) |
| Exact event bar check | Event = 1 |
Event(1) <> 0 (non-zero ONLY on matching date!) |
| Latest point-in-time event value | Forward-looking negative bar shift |
Event(1, 1) (holds most recent Value forward from event date) |
| Historical float / short interest |
InfoFloat < 50000000 (today's float on 2016 bars!) |
Store dated snapshots in EventListFile (e.g., Type = 2) and read Event(2, 1)
|
Pause on that last row because it ruins more parabolic short and small-cap momentum tests than almost any other mistake. According to the official RealTest User Guide, InfoFloat and InfoShares are single current-snapshot properties provided by your data vendor, NOT point-in-time historical series. A micro-cap that had a 10-million-share float in 2020 and diluted to 300 million shares by 2024 shows 300 million shares on every historical bar! Whenever float, short interest, or earnings surprise drives your edge, import dated rows via EventListFile (or CSV Extra columns as detailed in our RealTest CSV import and fundamentals guide) so every bar sees strictly what was known on that date.
Complete Validated RealTest Script (Import EventListFile + Event(1) Cooldown Filter)
Prepare a plain CSV with header Symbol,Date,Type,Value (for example, SPY,10/15/24,1,4), run Import once to compile the events into spy_events_demo.rtd, and run Test to compare ignoring events against skipping scheduled 3-bar event windows.
Notes:
EventListFile earnings and macro event filtering in RealTest 2.0 using
Event(1) event-window exclusion and Event(1, 1) point-in-time latest value lookup.
Import:
DataSource: CSV
CSVFile: C:\RealTest\Data\spy_orb_demo.csv
CSVFields: Symbol,Date,Open,High,Low,Close,Volume,Extra
CSVDateFmt: MDY
EventListFile: C:\RealTest\Data\spy_events_demo.csv
SaveAs: C:\RealTest\Data\spy_events_demo.rtd
Settings:
DataFile: C:\RealTest\Data\spy_events_demo.rtd
StartDate: 2015-01-01
EndDate: 2024-12-31
AccountSize: 100000
BarSize: Daily
Data:
ma200: Avg(C, 200)
rsi2: RSI(2)
atr14: ATR(14)
// Event(1) is non-zero ONLY on the exact event date; Event(1, 1) forward-fills last event value
isEventDay: Event(1) <> 0
lastEvVal: Event(1, 1)
nearEvent: CountTrue(isEventDay, 3) > 0
baseSig: C > ma200 and rsi2 < 20
Template: ev_base
Side: Long
Allocation: S.Equity
QtyType: Percent
Quantity: 100
MaxPositions: 1
MaxExposure: 100
Commission: Max(1, Shares * 0.005)
OpenSlip: 0.0003 * FillPrice
ExitStop: IF(BarsHeld >= 1, FillPrice - 3 * atr14[BarsHeld], 0)
ExitRule: C > H[1] or BarsHeld >= 6
ExitTime: NextOpen
Ambiguity: Stop
// 1. Ignores scheduled quarterly event dates completely
Strategy: spy_ignore_events
Using: ev_base
EntrySetup: baseSig
// 2. Skips entries during scheduled event window via EventListFile + Event(1)
Strategy: spy_skip_events
Using: ev_base
EntrySetup: baseSig and not nearEvent
Charts:
MA200: ma200
Event_Flag: isEventDay {|}
Validated 2015 to 2024 SPY Event-Window Comparison
Running both strategies side by side with Allocation: S.Equity verifies that Event(1) and CountTrue(isEventDay, 3) > 0 intercept exact event dates cleanly while leaving every non-event trade identical.
| Event Handling Mode (SPY, 2015 to 2024) | Completed Trades | Ending Equity ($100k start) | Max Drawdown | Behavior Verified |
|---|---|---|---|---|
spy_ignore_events (No Event Filter) |
139 | $143,316 | -12.71% | Takes all RSI(2) dips regardless of calendar |
spy_skip_events (EventListFile + 3-Bar Cooldown) |
134 | $139,801 | -13.24% | Cleanly skips 5 entries inside quarterly event windows |

Remember one subtle difference between macro/index ETFs and individual stocks. On diversified indices like SPY, skipping quarterly macro windows changes P&L modestly because single-company gap risk is diversified away. On single-stock mean reversion and parabolic short systems, however, avoiding an overnight 25 percent post-earnings gap against your position is massive for tail-risk control! Load an individual-stock earnings calendar (Wall Street Horizon, Zacks, or Polygon CSV) into EventListFile with Type = 1, and for forward pre-earnings skipping, stamp the CSV row on the scheduled announcement date minus 2 trading days (known publicly weeks in advance!) so your filter stays 100 percent lookahead-free (see our RealTest parabolic short-selling guide and our S&P 500 mean-reversion guide).
Put Clean Event-Aware Filters Inside Proven RealTest Strategies
Testing short-side setups or high-turnover stock mean reversion where earnings gaps and float mechanics drive live survival? Inspect our battle-tested RealTest Parabolic Short Selling Strategy and our RealTest Mean Reversion Trading Strategy.
Need custom CSV pipelines for historical earnings calendars, short interest, or point-in-time float files built cleanly in RealTest? Talk with us through our RealTest Strategy Coding Service, or grab free working templates in our Free RealTest Codes & Sample Strategies library.
Key terms
- EventListFile Directive
- A RealTest Import directive loading dated per-symbol numeric events (Symbol,Date,Type,Value) directly into a compiled .rtd database.
- Event(type, latest) Function
- RealTest formula reading imported event values strictly on the event date (when latest is omitted or 0) or forward-filled point-in-time (when latest equals 1).
- InfoFloat Static Lookahead
- A common backtest pitfall where static current-day float data (InfoFloat) is mistakenly used as a historical filter across multi-year stock tests.
- Earnings Exclusion Window
- A trade-filtering rule blocking new entries within a defined number of bars around scheduled corporate earnings announcements to control overnight gap risk.
- Point-in-Time Fundamental Series
- Historical fundamental or float values stamped strictly on their public availability date so backtests never peek at future revisions or dilutions.
Frequently asked questions
What CSV format does EventListFile require in RealTest?
EventListFile requires a comma-separated file with the four columns Symbol,Date,Type,Value, where Date matches your import format, Type is any positive integer identifying the event category (for example, 1 for earnings, 2 for float snapshots), and Value is any numeric figure.
What is the difference between Event(1) and Event(1, 1) in RealTest?
Event(1) returns the numeric Value ONLY on the exact bar matching an event date (and 0 on all other bars). Adding the second parameter as Event(1, 1) returns the most recent event Value on or before the current bar, forward-filling point-in-time data cleanly with zero lookahead.
Why does InfoFloat cause lookahead bias in RealTest backtests?
Official RealTest documentation specifies that InfoFloat and InfoShares are current static snapshots rather than historical time series. Filtering by InfoFloat in a multi-year backtest applies today's share float to historical dates years earlier. Use dated CSV rows via EventListFile instead.
How do you skip entries BEFORE an upcoming earnings date in RealTest without lookahead bias?
Because earnings dates are publicly scheduled weeks ahead, avoid using negative bar offsets like Event(1)[-2] on unscheduled historical dates. Instead, export a pre-earnings blackout flag dated 2 trading days before each scheduled announcement into EventListFile and check Event(1) = 0.
Can you load multiple event types like earnings, dividends, and float into one EventListFile?
Yes. Put all event rows into one CSV and distinguish each category with a unique integer in the Type column (such as Type 1 for earnings, Type 2 for float, Type 3 for short interest), then query Event(1), Event(2, 1), and Event(3, 1) inside Data.
Do I need to re-run Import after editing my EventListFile CSV?
Yes. EventListFile is compiled into the binary .rtd file during Import. Whenever you update or append new dates to the CSV, run realtest.exe -import so the .rtd database reflects the latest event calendar.