Skip to content

HurstExponent.cs has off by one error when creating the list of time lags. #9037

@treker7

Description

@treker7

for (var i = 2; i < maxLag; i++)

Two issues.

  1. The maxLag argument should be required to be at least 3. Since linear regression with only a single data point is meaningless.
  2. There is an off-by-one error in the code. The for loop condition should be ->

i <= maxLag

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions