tensortrade.feed.api.float.ordering module

tensortrade.feed.api.float.ordering.clamp(s: tensortrade.feed.core.base.Stream[float][float], c_min: float, c_max: float) → tensortrade.feed.core.base.Stream[float][float][source]

Clamps the minimum and maximum value of a stream.

Parameters:
  • s (Stream[float]) – A float stream.
  • c_min (float) – The mimimum value to clamp by.
  • c_max (float) – The maximum value to clamp by.
Returns:

Stream[float] – The clamped stream of s.

tensortrade.feed.api.float.ordering.clamp_max(s: tensortrade.feed.core.base.Stream[float][float], c_max: float) → tensortrade.feed.core.base.Stream[float][float][source]

Clamps the maximum value of a stream.

Parameters:
  • s (Stream[float]) – A float stream.
  • c_max (float) – The maximum value to clamp by.
Returns:

Stream[float] – The maximum clamped stream of s.

tensortrade.feed.api.float.ordering.clamp_min(s: tensortrade.feed.core.base.Stream[float][float], c_min: float) → tensortrade.feed.core.base.Stream[float][float][source]

Clamps the minimum value of a stream.

Parameters:
  • s (Stream[float]) – A float stream.
  • c_min (float) – The mimimum value to clamp by.
Returns:

Stream[float] – The minimum clamped stream of s.

tensortrade.feed.api.float.ordering.max(s1: tensortrade.feed.core.base.Stream[float][float], s2: tensortrade.feed.core.base.Stream[float][float]) → tensortrade.feed.core.base.Stream[float][float][source]

Computes the maximum of two streams.

Parameters:
  • s1 (Stream[float]) – The first float stream.
  • s2 (Stream[float]) – The second float stream.
Returns:

Stream[float] – The maximum stream of s1 and s2.

tensortrade.feed.api.float.ordering.min(s1: tensortrade.feed.core.base.Stream[float][float], s2: tensortrade.feed.core.base.Stream[float][float]) → tensortrade.feed.core.base.Stream[float][float][source]

Computes the minimum of two streams.

Parameters:
  • s1 (Stream[float]) – The first float stream.
  • s2 (Stream[float]) – The second float stream.
Returns:

Stream[float] – The minimum stream of s1 and s2.