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/

    Can't run Buy and Hold sample strategy!

    General Code/Help
    2
    2
    44
    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.
    • J
      jeff1228 last edited by

      Hi,

      Does anyone have trouble running this sample strategy in Article section?

      Only made two tiny changes

      parser.add_argument('--data', default='SPY.csv',
                          required=False, help='Data to read in')
      

      data = bt.feeds.YahooFinanceCSVData(dataname=args.data, **kwargs)

      Cuz I use Yahoo data.

      Any help will be appreciated!

      Cheers

      Jeff1228

      run-out 1 Reply Last reply Reply Quote 0
      • run-out
        run-out @jeff1228 last edited by

        @jeff1228 It's hard to tell what you changed without the original code. But if you changed the data source, that is not necessarily a small change. Include a line or better copy in the code your are referencing and we'll sort you out. Also, maybe some or your data? And also, maybe an error message?

        Thanks.

        RunBacktest.com

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