For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Stock dataname format in Visual Chart?

  • Do you know what the format for dataname in visual chart for a stock such as 'YHOO' is?


    data = vcstore.getdata(dataname='YHOO',  fromdate=datetime(2016, 5, 15))


  • administrators

    The data feeds have a code which refers to the exchange/market in which they are traded.

    See Docs - Visual Chart

    You need to see the ticker on-screen or find the file on-disk (seems easier to check the screen)

    Quoting from the docs

    Instantiating the data:

    • Pass the symbol seen on the top-left side of VisualChart without spaces. For example:

      • ES-Mini is displayed as 001 ES. Instantiate it as:

        data = vcstore.getdata(dataname='001ES', ...)
      • EuroStoxx 50 is displayed as 015 ES. Instantiate it as:

        data = vcstore.getdata(dataname='015ES', ...)
      backtrader will make an effort and clear out a whitespace located at the fourth position if the name is directly pasted from Visual Chart

  • administrators

    After checking with plaftorm: 003 YHOO. Where 003 is obviously the code for Nasdaq.

Log in to reply