Quant Interview Practice Questions
题目详情
High-frequency trading systems require efficient state management to process market data streams with minimal latency. By maintaining the state of the order book and yielding trade events only when matches occur, systems can optimize resource usage similar to lazy evaluation patterns. This problem simulates a matching engine using a stateful functor to process orders and generate trade prices. Task Implement the TradeGenerator class to act as a simplified matching engine for a continuous double