Generating Synthetic OHLCV Data for Backtest System Testing
Summary
This utility generates synthetic candlestick data over a configured time interval and serves CSV records to a backtesting system through a custom data provider. Users set the start and end times, candle period, initial price, volatility scale, and one of several movement profiles: gradual or sharp rises and falls, narrow or wide ranges, or neutral random movement. Each generated bar includes open, high, low, close, and volume values; the generator saves the records for the provider to read.
The method can help exercise data pipelines or observe how a strategy behaves under simple, controlled price paths. The document provides configurable inputs and implementation details, but no validation against real market data or evidence that the generated series reproduces actual return distributions, serial dependence, gaps, liquidity, or market microstructure. Volume is mechanically tied to price-change size with a random base, and the price changes use hand-set ranges. Treat these records as synthetic test cases, not as evidence of expected live performance. The implementation also depends on a local CSV file and a running HTTP service.
Key ideas
- The generator creates timestamped OHLCV bars for configurable intervals and price movement profiles.
- A volatility setting scales the random price changes, while the initial price sets the starting level.
- Generated records are saved to CSV and exposed through a custom data provider for backtesting-system use.
- The hand-set random process does not establish that the resulting series resembles real market behavior.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.