r4stl1n / condex

Bittrex Console Index Fund Management Tool
MIT License
7 stars 5 forks source link

indexequalweight - rounding issue on large coin numbers #41

Open notnight opened 6 years ago

notnight commented 6 years ago

When trying to apply indexequalweight to very large numbers of coins, a rounding issue causes missing percentages for last coins in the index as there is not enough percentage left over to be assigned.

eg. indexequalweight on 198 coins rounds up to 0.51 instead of 0.505 so missing about 1% to assign to last 2 coins

chunderstruck commented 6 years ago

Were you encountering an issue where it would assign 0% to some of the coins? If so I may have resolved this issue with a current pull request.

https://github.com/R4stl1n/condex/pull/40