Skip to content

Implement Is Rising Utility #369

@cinar

Description

@cinar

Description

Returns 1 if the current value is strictly greater than the historical value, and 0 otherwise.

Math/Formula

$$\text{IsRising}_t = \begin{cases} 1 & \text{if } P_t > P_{t-n} \ 0 & \text{otherwise} \end{cases}$$

Implementation Details

  • Generic helper function under the helper package.
  • Signature: func IsRising[T Number](c <-chan T, period int) <-chan T
  • Parameters: period (default: 1)
  • Test files with 100% coverage.

Suggested Package

helper

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions