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

[BUG] VarianceIndicator calculation seems to be wrong #1152

Open
2 tasks done
sgflt opened this issue May 14, 2024 · 3 comments
Open
2 tasks done

[BUG] VarianceIndicator calculation seems to be wrong #1152

sgflt opened this issue May 14, 2024 · 3 comments
Labels
bug Issue describing or discussing an bug in this library

Comments

@sgflt
Copy link
Contributor

sgflt commented May 14, 2024

I have checked existing issues and wiki

Describe the bug
A clear and concise description of what the bug is. If possible provide a minimal working example!

Assuming LibreOffices VAR function on test data:

close price VAR of 4 bars formula test assertions
1 -- -- 0
2 -- -- 0.25
3 -- -- 2.0/3
4 1,66666666666667 =VAR(A1:A4) 1.25
3 0,666666666666667 =VAR(A2:A5) 0.5
4 0,333333333333333 =VAR(A3:A6) 0.25
5 0,666666666666667 =VAR(A4:A7) 0.5
4 0,666666666666667 =VAR(A5:A8) 0.5
3 0,666666666666667 =VAR(A6:A9) 0.5
0 4,66666666666667 =VAR(A7:A10) 3.5
9 14 =VAR(A8:A11) 10.5

Expected behavior
Test asserts should match LibreOffice calculation or explain assert calculation.

@sgflt sgflt added the bug Issue describing or discussing an bug in this library label May 14, 2024
@sgflt
Copy link
Contributor Author

sgflt commented May 14, 2024

Fixed in f916824

@sgflt
Copy link
Contributor Author

sgflt commented May 14, 2024

BollingerBands*, StandardDeviation affected by fix.

@sgflt
Copy link
Contributor Author

sgflt commented May 19, 2024

Fixed in sgflt@416d7f6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue describing or discussing an bug in this library
Projects
None yet
Development

No branches or pull requests

1 participant