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/

    missing definition for 'startingcash' in BrokerBase?

    General Code/Help
    2
    3
    452
    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.
    • Jacob
      Jacob last edited by

      [minor bug report @backtrader]
      I came across a broker property 'startingcash' that doesn't have a declaration in BrokerBase.

      from strategy.py:

          # Internal Value Analyzer
          ainfo.Value.Begin = self.broker.startingcash
      
      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        BrokerBase is a base class with no practical/real use. It cannot be used, because it will actually raise NotImplementedError exceptions.

        1 Reply Last reply Reply Quote 0
        • Jacob
          Jacob last edited by Jacob

          I'm currently working on creating a custom Broker
          and the Backtrader code in strategy.py use a hard coded property that is used in BackBroker.
          if it is on the main code then it should be on the BrokerBase so everyone know that it need to be implemented

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