Skip to main content Skip to footer

When conducting backtests in FinStudio, it's important to understand how the system simulates trades based on the chosen data build modes and timeframes. Here are the key points to consider:

 

  1. Not Aligned Minutes:

    • Sometimes, you may notice that trades are not perfectly aligned with your expected time intervals (e.g., 15-minute intervals like 15:00 - 15:15). This misalignment occurs because the historical data might have gaps. For instance, the first minute bar in your data might start at 15:02, not 15:00, leading to intervals like 15:02 - 15:15 instead of 15:00 - 15:15.

  2. Seconds in Minutes:

    • When you observe trade times including seconds (e.g., 3:18:20 PM), it's because of the specific data build mode you selected. This typically happens when using Base Period OHLC (Open, High, Low, Close) points.

    • In this mode, even though your base period might be 1 minute, the system simulates four ticks within that minute:

      • O at :00 seconds

      • H or L at :20 seconds

      • L or H at :40 seconds

      • C at :59.9999 seconds

    • This simulation helps in creating a more detailed representation of market movements within each minute, thus showing trades with second-level precision.

  3. Handling Gaps in Data:

    • Gaps in data can occur due to various reasons like low liquidity periods, holidays, or scheduled offline hours. These gaps can affect the alignment of your trading intervals. While these gaps are not always errors, understanding their presence is crucial for accurate backtesting.

  4. Choosing the Right Data Build Mode:

    • To avoid second-level precision in your trade times and trade with minute accuracy, consider using the "Base Period Close only" mode. This mode ensures trades are executed at the close of each minute, eliminating second-level details.

    • Alternatively, using "O+C" mode will have trades executed at either the open (:00) or close (:59) of each minute.

  5. Simulating Market Structure:

    • The "Base Period OHLC" mode is an approximation, as the real structure of the bar (the exact order of high and low) is unknown. The system uses a rule-based approach where, for bullish bars, the low comes first followed by the high, and for bearish bars, the high comes first followed by the low. This is a simplification and might differ from the actual order in real trading.

 

Trade Execution Times:

When running backtests, the times at which trades are executed may include seconds due to the specific data build mode selected. For example:

  • Base Period OHLC Points: Simulates trades at four points within each minute (open, high, low, close), leading to execution times with seconds.

  • Base Period Close Only: Ensures trades are executed at the close of each minute, eliminating second-level precision.

  • O+C Mode: Trades are executed at either the open (:00) or close (:59) of each minute.

This simulation helps in creating a detailed market representation, although it's based on rules and approximations due to the lack of real tick data structure.

 

For accurate backtesting, consider the chosen data build mode and understand its implications on trade execution times. If minute-level precision without seconds is required, select the appropriate build mode to match your testing needs.

Cookies Notice

We use cookies to improve your experience, personalize content, and analyze our traffic. By clicking "Accept All Cookies," you agree to the storing of cookies on your device. You can manage your cookie preferences at any time by visiting our Cookie Settings.