tensortrade.feed.api.float.operations module¶
operations.py contains functions for computing arithmetic operations on float streams.
- tensortrade.feed.api.float.operations.abs(s: Stream[float]) Stream[float] [source]¶
Computes the absolute value of a float stream.
- Parameters:
s (Stream[float]) – A float stream.
- Returns:
Stream[float] – The absolute value stream of s.
- tensortrade.feed.api.float.operations.add(s1: Stream[float], s2: Stream[float]) Stream[float] [source]¶
Computes the addition of two float streams.
- Parameters:
s1 (Stream[float]) – The first float stream.
s2 (Stream[float] or float) – The second float stream.
- Returns:
Stream[float] – A stream created from adding s1 and s2.
- tensortrade.feed.api.float.operations.mul(s1: Stream[float], s2: Stream[float]) Stream[float] [source]¶
Computes the multiplication of two float streams.
- Parameters:
s1 (Stream[float]) – The first float stream.
s2 (Stream[float] or float) – The second float stream.
- Returns:
Stream[float] – A stream created from multiplying s1 and s2.
- tensortrade.feed.api.float.operations.neg(s: Stream[float]) Stream[float] [source]¶
Computes the negation of a float stream.
- Parameters:
s (Stream[float]) – A float stream.
- Returns:
Stream[float] – The negated stream of s.
- tensortrade.feed.api.float.operations.pow(s: Stream[float], power: float) Stream[float] [source]¶
Computes the power of a float stream.
- Parameters:
s (Stream[float]) – A float stream.
power (float) – The power to raise s by.
- Returns:
Stream[float] – The power stream of s.
- tensortrade.feed.api.float.operations.radd(s1: Stream[float], s2: Stream[float]) Stream[float] [source]¶
Computes the reversed addition of two float streams.
- Parameters:
s1 (Stream[float]) – The first float stream.
s2 (Stream[float] or float) – The second float stream.
- Returns:
Stream[float] – A stream created from adding s1 and s2.
- tensortrade.feed.api.float.operations.rmul(s1: Stream[float], s2: Stream[float]) Stream[float] [source]¶
Computes the reverse multiplication of two float streams.
- Parameters:
s1 (Stream[float]) – The first float stream.
s2 (Stream[float] or float) – The second float stream.
- Returns:
Stream[float] – A stream created from multiplying s2 and s1.
- tensortrade.feed.api.float.operations.rsub(s1: Stream[float], s2: Stream[float]) Stream[float] [source]¶
Computes the reverse subtraction of two float streams.
- Parameters:
s1 (Stream[float]) – The first float stream.
s2 (Stream[float] or float) – The second float stream.
- Returns:
Stream[float] – A stream created from subtracting s1 from s2.
- tensortrade.feed.api.float.operations.rtruediv(s1: Stream[float], s2: Stream[float]) Stream[float] [source]¶
Computes the reverse division of two float streams.
- Parameters:
s1 (Stream[float]) – The first float stream.
s2 (Stream[float] or float) – The second float stream.
- Returns:
Stream[float] – A stream created from dividing s2 by s1.
- tensortrade.feed.api.float.operations.sub(s1: Stream[float], s2: Stream[float]) Stream[float] [source]¶
Computes the subtraction of two float streams.
- Parameters:
s1 (Stream[float]) – The first float stream.
s2 (Stream[float] or float) – The second float stream.
- Returns:
Stream[float] – A stream created from subtracting s2 from s1.
- tensortrade.feed.api.float.operations.truediv(s1: Stream[float], s2: Stream[float]) Stream[float] [source]¶
Computes the division of two float streams.
- Parameters:
s1 (Stream[float]) – The first float stream.
s2 (Stream[float] or float) – The second float stream.
- Returns:
Stream[float] – A stream created from dividing s1 by s2.