Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Regarding FAQ: if Backtrader is not a bid-ask Platform - what is is then?

    General Discussion
    3
    4
    2163
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NewestTrader
      NewestTrader last edited by NewestTrader

      Hi,

      in the FAQ, I can find the following sentence:

      I want to trade using bid-ask prices

      Not a goal of this platform. You may still feed the prices to your own defined lines in the data feed and use them. See the documentation for extending data feeds.

      As I am quite new in trading:

      For what can I use it then? Only for Open-High-Low-Close (OHLC) related data?

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • T
        ThatBlokeDave last edited by

        Hi @NewestTrader
        Welcome to the community. You can use mid price data. This is basically the average of the bid and the ask prices. So yes, OHLC mid price data is fine.

        The drawback to this is that you cannot capture the cost of the spread in your PnL calculations out of the box.

        1 Reply Last reply Reply Quote 0
        • P
          Paska Houso last edited by

          The thing is that bid-ask is an pair of instantaneous values (tick) and OHLC is in most cases handled differently, because it is used in larger timeframes (1-minute) and therefore you have a 1-minute OHLC bar and the only meaningful bid-ask pair value is the last one.

          In any case people have apparently taking a path similar to this one (quickly googling to see if I could find the discussion didn't help) for backtesting bid/ask strategies

          • Load the bid price as a data feed (i.e.: data0)
          • Load the ask price as a different data feed (i.e.: data1)
          • Use the backtrader compensation feature to link operations of data0 and data1
          • Execute buy / sell operation independently on the bid/ask data feeds

          A link to the compensation feature doc: https://www.backtrader.com/docu/order-creation-execution/futurespot/future-vs-spot.html

          This of course is clearly not applicable for live trading, but will let you perform full backtesting capturing the spread.

          1 Reply Last reply Reply Quote 1
          • NewestTrader
            NewestTrader last edited by

            thanks to both of you!

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors