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/

    Forex Backtest with Quandl

    General Code/Help
    2
    2
    793
    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.
    • Benjamin Preston Lee Turner
      Benjamin Preston Lee Turner last edited by

      Hello,

      Does anyone have an example of getting forex data from Quandl? I've tried getting the data with 'CUR/EUR' as the dataset and I get:

      File "C:\Users\dx\AppData\Local\Programs\Python\Python35-32\lib\site-packages
      backtrader\feed.py", line 692, in preload
      self.f.close()
      AttributeError: 'NoneType' object has no attribute 'close'

      I pass the data with:

      data = bt.feeds.Quandl(
      dataname=args.instrument,
      apikey='MYKEY,
      fromdate = fd,
      todate = td,
      buffered= True
      )

      It works with stocks--any ideas?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • D
        dasch last edited by

        Hi, i did not check the following so it may be wrong, but it seems, the symbol is not available completely on quandl. i looked for the data here:

        https://www.quandl.com/api/v3/datasets/CUR/EUR.json?api_key=xxx

        the data only has a close price, no other data available. backtrader will look for ohlc values i believe. There was a few months also some questions about quandl here in this forum with similar issues.

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