-
Notifications
You must be signed in to change notification settings - Fork 249
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
HMA throws exception with a misleading / incorrect message. #518
Comments
(BTW, love this library ... thank you so much for your hard work on it!!!) |
I'm glad you're enjoying it! Thank you. And thanks for finding this interestingly strange bug. HMA uses WMA internally and on their face they have the same historical quotes requirements. HMA basically takes two WMAs then does another aggregate WMA calculation that uses square root of Clearly a rounding error in here that pops up with certain historical quote quantities or lookback periods. I may have to increase the minimum threshold if small quote quantities are the actual problem. I'll dig in on it this weekend. |
Turns out this has less to do with the smallness of history, but rather the calculation of minimum history. Originally, I was saying you need a minimum of |
This was fixed in version 1.15.1 |
This Issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new Issue for related bugs. |
The problem
I called:
Where
quotes
only had 10 items. This throws an exception, which is fine. The text of the exception is not quite right. (See next section.)Error message(s):
To Reproduce
Call the
GetHma()
extension method passing in9
as the number of lookback periods, calling from a List with 10 instances ofQuote
.Expected behavior
I expected the error message use the term "HMA" rather than "WMA", and I expected the count of items to reflect the actual number of items in my collection (which was 10).
Screenshots or other reference materials
The text was updated successfully, but these errors were encountered: