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/

    Input data from Cloud Storage

    General Code/Help
    1
    1
    11
    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.
    • Pierre Cilliers 0
      Pierre Cilliers 0 last edited by

      Hi all,

      I have read the Backtrader Data Feeds documentation provided and have a question regarding importing data from Cloud Storage instead of from your local machine.

      I currently have to download .csv files from Cloud Storage to my local computer and add it to Backtrader as follows:

              datapath = os.path.join("../../../filename.csv")
              data = bt.feeds.GenericCSVData(dataname=datapath,
                                              separator=";",
                                              fromdate=fromdate,
                                              todate=todate,
                                              dtformat=('%Y%m%d'),
                                              tmformat=('%H:%M:%S:%f'),
                                              timeframe=bt.TimeFrame.MicroSeconds,
                                              compression=1,
                                              date=0,
                                              time=1,
                                              open=2,
                                              high=3,
                                              low=2,
                                              close=3,
                                              volume=4,
                                              openinterest=-1
                                              )
      

      I was hopig if anybody could share if they have been able to import data from Cloud Storage directly into Backtrader instead of accessing to a local machine first?

      Thanks all!

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