Base class for pyalgotrade.bar.Bars providing feeds.
Parameters: | frequency (barfeed.Frequency.MINUTE or barfeed.Frequency.DAY.) – The bars frequency. |
---|
Note
This is a base class and should not be used directly.
Returns True if a pyalgotrade.dataseries.BarDataSeries for the given instrument is available.
Returns the pyalgotrade.dataseries.BarDataSeries for a given instrument. If the instrument is not found an exception is raised.
Returns the current pyalgotrade.bar.Bars.
Returns the pyalgotrade.dataseries.BarDataSeries for a given instrument.
Parameters: | instrument (string.) – Instrument identifier. If None, the default instrument is returned. |
---|---|
Return type: | pyalgotrade.dataseries.BarDataSeries. |
Returns the default instrument.
Returns the last pyalgotrade.bar.Bar for a given instrument, or None.
Returns the next pyalgotrade.bar.Bars in the feed or None if there are no bars.
Returns a list of registered intstrument names.
A CSV file based pyalgotrade.barfeed.BarFeed.
Note
This is a base class and should not be used directly.
Returns the time to set to daily bars when that information is not present in CSV files. Defaults to 23:59:59.
Return type: | datetime.time. |
---|
Sets the time to set to daily bars when that information is not present in CSV files.
Parameters: | time (datetime.time.) – The time to set. |
---|
A pyalgotrade.barfeed.csvfeed.BarFeed that loads bars from CSV files downloaded from Yahoo! Finance.
Parameters: | timezone (A pytz timezone.) – The default timezone to use to localize bars. Check pyalgotrade.marketsession. |
---|
Note
Yahoo! Finance csv files lack timezone information. When working with multiple instruments:
- If all the instruments loaded are in the same timezone, then the timezone parameter may not be specified.
- If any of the instruments loaded are from different timezones, then the timezone parameter must be set.
Loads bars for a given instrument from a CSV formatted file. The instrument gets registered in the bar feed.
Parameters: |
|
---|
A pyalgotrade.barfeed.csvfeed.BarFeed that loads bars from CSV files exported from NinjaTrader.
Parameters: |
|
---|
Note
Valid frequency parameter values are:
- pyalgotrade.barfeed.Frequency.MINUTE
- pyalgotrade.barfeed.Frequency.DAY
Loads bars for a given instrument from a CSV formatted file. The instrument gets registered in the bar feed.
Parameters: |
|
---|