Using the Current Date to Place a Scheduled Stock Purchase in a Backtest
Summary
This brief Q&A explains how to trigger a stock purchase on a chosen trading date within a BigQuant strategy’s main function. The suggested method is to read the simulation’s current date and time through the platform’s current-time interface, compare it with the target date, and conditionally submit the trade. The example request is to buy a specific stock with a stated amount of capital on a specified date, including arranging a full position on the strategy’s first day.
The document gives no code, execution details, backtest results, or discussion of order timing, price assumptions, or whether the purchase is sized to available cash. Its contribution is limited to identifying the date interface as the mechanism for date-dependent logic; implementation and behavior would need to be checked against the platform’s trading and simulation conventions.
Key ideas
- A strategy can inspect the simulation’s current date and time from its main function.
- Compare that value with a target date to decide when to submit a trade.
- The example use case is buying a specified stock with a specified amount on a chosen trading day.
- The note does not explain order pricing, timing, or position sizing mechanics.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.