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/

    'Close' Attribute Error

    General Code/Help
    2
    3
    27
    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.
    • O
      ODD last edited by

      I'm new to using Backtrader, and don't have a lot of experience with Python either. I began the quickstart tutorial, but quickly ran into an issue where the Yahoo Finance data wasn't being accessed. I then switched to using Quandl. Below is the relevant bit of code that is being used to fetch the ticker data.

      data = bt.feeds.Quandl(
              dataname = "AMZN",
              apikey = "xxblahblahblahxx",
              dataset = "myspecialdataset",
              fromdate=datetime.datetime(2000, 1, 1),
              todate=datetime.datetime(2000,12,31)
              )
      

      When I run the program, I get: Attribute Error: 'NoneType' object has no attribute 'close'.

      I've been searching around and haven't been able to find a solution. I appreciate anyone's help.

      TIA

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

        It would be helpful if you could share your full code ( yes I understand this is the quickstart tutorial, but nevertheless ). A wild guess is that adddata call is missing somewhere but without actually seeing the code it is hard to tell for sure.

        O 1 Reply Last reply Reply Quote 3
        • O
          ODD @vladisld last edited by

          @vladisld Funnily enough, I just found out why it wasn't working: I hadn't unzipped the download from the Github repo.
          facepalm
          Thanks for replying!

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
          $(document).ready(function () { app.coldLoad(); }); }