Hey — Sam here from BitMEX.
We talked with the authors of this Python script and submitted two blocks of improvements to the calculation script to fix a few errors:
Refactor by STRML · Pull Request #1 · Whalepool/BitMEX-Mark-Price
Work in progress; will fix the calculation shortly but I wanted to separate the changesets so it's more clear. In…
Use websocket for greater accuracy. by STRML · Pull Request #2 · Whalepool/BitMEX-Mark-Price
This builds on top of #1, which should be merged first for less noise. To ensure the calculations are the same when the…
It should be much easier to replicate our published results with these fixes in.