Data series are abstractions used to manage time-series data.
Bases: object
Base class for data series.
Note
This is a base class and should not be used directly.
Returns the value at a given position/slice. It raises IndexError if the position is invalid, or TypeError if the key type is invalid.
Returns the number of elements in the data series.
Returns a list of datetime.datetime associated with each value.
Bases: pyalgotrade.dataseries.DataSeries
A DataSeries that holds values in a sequence in memory.
Parameters: | maxLen (int.) – The maximum number of values to hold. Once a bounded length is full, when new items are added, a corresponding number of items are discarded from the opposite end. If None then dataseries.DEFAULT_MAX_LEN is used. |
---|
Appends a value.
Appends a value with an associated datetime.
Note
If dateTime is not None, it must be greater than the last one.
Returns the maximum number of values to hold.
Sets the maximum number of values to hold and resizes accordingly if necessary.
Returns two dataseries that exhibit only those values whose datetimes are in both dataseries.
Parameters: |
|
---|
Bases: pyalgotrade.dataseries.SequenceDataSeries
A DataSeries of pyalgotrade.bar.Bar instances.
Parameters: | maxLen (int.) – The maximum number of values to hold. Once a bounded length is full, when new items are added, a corresponding number of items are discarded from the opposite end. If None then dataseries.DEFAULT_MAX_LEN is used. |
---|
Returns a pyalgotrade.dataseries.DataSeries with the adjusted close prices.
Returns a pyalgotrade.dataseries.DataSeries with the close prices.
Returns a pyalgotrade.dataseries.DataSeries for an extra column.
Returns a pyalgotrade.dataseries.DataSeries with the high prices.
Returns a pyalgotrade.dataseries.DataSeries with the low prices.
Returns a pyalgotrade.dataseries.DataSeries with the open prices.
Returns a pyalgotrade.dataseries.DataSeries with the close or adjusted close prices.
Returns a pyalgotrade.dataseries.DataSeries with the volume.
Bases: pyalgotrade.dataseries.bards.BarDataSeries, pyalgotrade.dataseries.resampled.DSResampler
A BarDataSeries that will build on top of another, higher frequency, BarDataSeries. Resampling will take place as new values get pushed into the dataseries being resampled.
Parameters: |
|
---|
Note
Forces a resample check. Depending on the resample frequency, and the current datetime, a new value may be generated.
Parameters: | dateTime (datetime.datetime) – The current datetime. |
---|