Trade windows are time intervals that describe when a symbol has trade activity data available and/or when it is considered “trading” for a particular analysis. In data engineering, the term often refers to the start and end timestamps used to request trade events for a symbol. In research, it can also mean the period during which a symbol meets a “recent trading” eligibility rule.
Trade windows are used to bound queries (time_start/time_end), to define rolling features (volume over the prior window), and to filter universes (include symbols with trades in the last N hours). They also support fair comparisons by ensuring each symbol contributes metrics only when it was actually trading and observable.
It depends on your use case and time horizon. Short windows (minutes/hours) capture current tradability and microstructure regimes, while longer windows (days/weeks) smooth noise for universe screens. The key is to ensure the window is trailing (ending at t) to avoid lookahead.
You’ll typically get empty results, which can be ambiguous if you don’t distinguish coverage vs activity. That ambiguity can lead to incorrect assumptions in backtests or monitoring. Using explicit trade windows and coverage constraints reduces this confusion.
The concept generalizes: you can define quote windows and order book windows as well. In practice, teams often keep separate windows because different data types have different coverage and activity patterns. Mixing them without tracking the differences can cause subtle errors.
You build a spread model that uses mid-price from quotes but validates fills using trades. Some pairs show quotes but have almost no trades for hours. By defining trade windows that require at least a minimum trade count per hour, you avoid including “paper” markets that don’t actually trade.
CoinAPI provides historical trade data and symbol metadata that can be combined to define trade windows. Use the symbol’s trade coverage timestamps as outer bounds, then apply your point-in-time activity rule (for example, trailing trade count) to decide whether a symbol is eligible for a strategy at time t.