Data mismatch between chart and backtest

Optuma Forums Optuma Scripting Data mismatch between chart and backtest

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #67819
    Michael
    • Topics: 4
    • Replies: 7
    • Posts: 11

    In running a backtest, when I compare the prices of trades listed in the backtest with the actual prices on the charts, there is a mistmatch. For example, the first line in the attached file shows XBI sold at $132.84 on 8/1/21. The price range that day (actually Monday, 8/2/21) was $123.06 to $125.80. Is there a reason for this?

    • This topic was modified 6 months ago by Michael. Reason: correct typo
    #67829
    Matthew
    • Topics: 5
    • Replies: 631
    • Posts: 636

    Hi,

    Without seeing the specific back tests properties i can only make a guess, however It looks like your back test is being run on Monthly data.  Change your charts time frame to 1 Month and you will see the monthly bar for August 2021 has a closing price of $132.84 (last close of the month when viewing a daily chart).

    That is where the price is coming from.

    If you want to run the back test as if it were on a daily chart, change the Back Tests time frame to Daily.

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest