tensortrade.feed.core.operators module¶
-
class
tensortrade.feed.core.operators.
Accumulator
(func: Callable[[T, T], T], dtype: str = None)[source]¶ Bases:
tensortrade.feed.core.base.Stream
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
(func: Callable[[T], K], dtype: str = None)[source]¶ Bases:
tensortrade.feed.core.base.Stream
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
(op: Callable[[T, T], T], dtype: str = None)[source]¶ Bases:
tensortrade.feed.core.base.Stream
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.
-
forward
() → T[source]¶ Generates the next value from the underlying data streams.
Returns: T – The next value in the stream.
-
generic_name
= 'bin_op'¶
-
class
tensortrade.feed.core.operators.
Copy
[source]¶ Bases:
tensortrade.feed.core.base.Stream
A stream operator that copies the values of a given stream.
-
forward
() → T[source]¶ Generates the next value from the underlying data streams.
Returns: T – The next value in the stream.
-
generic_name
= 'copy'¶
-
-
class
tensortrade.feed.core.operators.
Freeze
[source]¶ Bases:
tensortrade.feed.core.base.Stream
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.
-
generic_name
= 'freeze'¶
-
-
class
tensortrade.feed.core.operators.
Lag
(lag: int = 1, dtype: str = None)[source]¶ Bases:
tensortrade.feed.core.base.Stream
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.
-
generic_name
= 'lag'¶
-