tensortrade.feed.core.operators module¶
- class tensortrade.feed.core.operators.Accumulator(*args, **kwargs)[source]¶
Bases:
Stream
[T
]An operator stream that accumulates values of a given stream.
- Parameters:
func (Callable[[T,T], T]) – An accumulator function.
dtype (str) – The data type of accumulated value.
- forward()[source]¶
Generates the next value from the underlying data streams.
- Returns:
T – The next value in the stream.
- class tensortrade.feed.core.operators.Apply(*args, **kwargs)[source]¶
Bases:
Stream
[K
]An operator stream that applies a specific function to the values of a given stream.
- Parameters:
func (Callable[[T], …]) – A function to be applied to the values of a stream.
dtype (str, optional) – The data type of the values after function is applied.
- class tensortrade.feed.core.operators.BinOp(*args, **kwargs)[source]¶
Bases:
Stream
[T
]A stream operator that combines the values of two given streams into one value of the same type.
- Parameters:
op (Callable[[T, T], T]) – The binary operation to be applied.
dtype (str, optional) – The data type of the stream.
- class tensortrade.feed.core.operators.Copy(*args, **kwargs)[source]¶
Bases:
Stream
[T
]A stream operator that copies the values of a given stream.
- class tensortrade.feed.core.operators.Freeze(*args, **kwargs)[source]¶
Bases:
Stream
[T
]A stream operator that freezes the value of a given stream and generates that value.
- forward() T [source]¶
Generates the next value from the underlying data streams.
- Returns:
T – The next value in the stream.
- class tensortrade.feed.core.operators.Lag(*args, **kwargs)[source]¶
Bases:
Stream
[T
]An operator stream that returns the lagged value of a given stream.
- Parameters:
- forward() T [source]¶
Generates the next value from the underlying data streams.
- Returns:
T – The next value in the stream.