Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ZigZag when no thresholds met #618

Merged
merged 6 commits into from
Nov 14, 2021
Merged

fix: ZigZag when no thresholds met #618

merged 6 commits into from
Nov 14, 2021

Conversation

DaveSkender
Copy link
Owner

@DaveSkender DaveSkender commented Nov 13, 2021

Description

Exploratory investigation to see if the last line is behaving correctly given a new aberrant dataset.
Fixes #616

Checklist

  • My code follows the existing style, code structure, and naming taxonomy
  • I have performed a self-review of my own code and included any verifying manual calculations
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings and running code analysis does not produce any issues
  • I have added or updated unit tests that prove my fix is effective or that my feature works, and achieves sufficient code coverage
  • I have added or run the performance tests that depict optimal execution times
  • New and existing unit tests pass locally and in the build (below) with my changes

@DaveSkender
Copy link
Owner Author

Using the data provided in the linked issue, there is never a full 5% reversal; therefore, no long should have drawn at all!
I'm fixing that here. What was happening is that it got to the end of the history range and simply plotted the incomplete interim results, which is why you see some odd danglers at the end.

image

@DaveSkender
Copy link
Owner Author

DaveSkender commented Nov 14, 2021

The analysis is basically doing this: 1) find the first extreme point that exceeds the 5% threshold (found at low point 222), then 2) try to find the 5% reversal (it never does).

image

Given this data, it never increases by 5% and that first low point is unconfirmed; therefore, no line should show.

@DaveSkender DaveSkender marked this pull request as ready for review November 14, 2021 03:56
@DaveSkender DaveSkender changed the title ZigZag: evaluate last line segment fix: ZigZag when no thresholds met Nov 14, 2021
@DaveSkender DaveSkender merged commit a9578a6 into main Nov 14, 2021
@DaveSkender DaveSkender deleted the eval-zigzag branch November 14, 2021 04:00
@github-actions
Copy link

This Pull Request has been automatically locked since there has not been any recent activity after it was closed. Please open a new Issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ZigZag should not plot line when no thresholds are met
1 participant