Historical Data Replay

Real-time data processing is typically event-driven in quantitative strategy trading, while strategy development relies on historical data for backtesting, often not event-driven. This requires two sets of scripts for the same strategy, which is time-consuming and error-prone. To resolve this, DolphinDB allows users to import historical data into stream tables in chronological order as "real-time data" so that the same script can be used both for backtesting and real-time trading.

DolphinDB's stream processing framework operates on a publish-subscribe-consume model, where data is streamed to subscribers. Subscribers can use user-defined functions or DolphinDB's built-in streaming engines to perform complex processing on the received data. The DolphinDB streaming interface supports APIs in multiple languages, including C++, C#, Java, and Python, facilitating complex data processing aligned with production needs.

There are three replay types based on the mappings between input and output table(s): 1 to 1, N to 1, and N to N.