feed.api.float.accumulators module

class feed.api.float.accumulators.CumMax(skip_na: bool = True)[source]

Bases: feed.core.base.Stream

A stream operator that creates a cumulative maximum of values.

Parameters:skip_na (bool, default True) – Exclude NA/null values. If a value is NA, the result will be NA.

References

[1] https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.cummax.html

forward() → float[source]

Generates the next value from the underlying data streams.

Returns:The next value in the stream.
Return type:T
has_next() → bool[source]

Checks if there is another value.

Returns:If there is another value or not.
Return type:bool
class feed.api.float.accumulators.CumMin(skip_na: bool = True)[source]

Bases: feed.core.base.Stream

A stream operator that creates a cumulative minimum of values.

Parameters:skip_na (bool, default True) – Exclude NA/null values. If a value is NA, the result will be NA.

References

[1] https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.cummin.html

forward() → float[source]

Generates the next value from the underlying data streams.

Returns:The next value in the stream.
Return type:T
has_next() → bool[source]

Checks if there is another value.

Returns:If there is another value or not.
Return type:bool
class feed.api.float.accumulators.CumProd[source]

Bases: feed.core.base.Stream

A stream operator that creates a cumulative product of values.

References

[1]https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.cumprod.html
forward() → float[source]

Generates the next value from the underlying data streams.

Returns:The next value in the stream.
Return type:T
has_next() → bool[source]

Checks if there is another value.

Returns:If there is another value or not.
Return type:bool
class feed.api.float.accumulators.CumSum[source]

Bases: feed.core.base.Stream

A stream operator that creates a cumulative sum of values.

References

[1]https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.cumsum.html
forward() → float[source]

Generates the next value from the underlying data streams.

Returns:The next value in the stream.
Return type:T
has_next() → bool[source]

Checks if there is another value.

Returns:If there is another value or not.
Return type:bool
feed.api.float.accumulators.cummax(s: feed.core.base.Stream[float][float], skipna: bool = True) → feed.core.base.Stream[float][float][source]

Computes the cumulative maximum of a stream.

Parameters:
  • s (Stream[float]) – A float stream.
  • skipna (bool, default True) – Exclude NA/null values. If a value is NA, the result will be NA.
Returns:

The cumulative maximum stream of s.

Return type:

Stream[float]

feed.api.float.accumulators.cummin(s: feed.core.base.Stream[float][float], skipna: bool = True) → feed.core.base.Stream[float][float][source]

Computes the cumulative minimum of a stream.

Parameters:
  • s (Stream[float]) – A float stream.
  • skipna (bool, default True) – Exclude NA/null values. If a value is NA, the result will be NA.
Returns:

The cumulative minimum stream of s.

Return type:

Stream[float]

feed.api.float.accumulators.cumprod(s: feed.core.base.Stream[float][float]) → feed.core.base.Stream[float][float][source]

Computes the cumulative product of a stream.

Parameters:s (Stream[float]) – A float stream.
Returns:The cumulative product stream of s.
Return type:Stream[float]
feed.api.float.accumulators.cumsum(s: feed.core.base.Stream[float][float]) → feed.core.base.Stream[float][float][source]

Computes the cumulative sum of a stream.

Parameters:s (Stream[float]) – A float stream.
Returns:The cumulative sum stream of s.
Return type:Stream[float]