-
Notifications
You must be signed in to change notification settings - Fork 467
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
add get_avg_px_qty_for_exposure rust function with test #1893
base: develop
Are you sure you want to change the base?
add get_avg_px_qty_for_exposure rust function with test #1893
Conversation
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
See release notes.
Looks good to me. But I would like to see some not-zero test cases, with simple numbers, just so that we are sure |
Hey @elementace Thanks for the contribution! You're correct that we'd need a struct to return the two So I can merge this in if we just cover off two things:
|
a52059f
to
7ef467f
Compare
Hi @elementace Looks like we'll need a struct after all:
As above, I'm happy to take this part on if you just add a couple of Rust tests with non-zero values. |
Pull Request
Added get_avg_px_qty_for_exposure rust function for Order books rust object
get_avg_px_for_quantity
Currently exists, to estimate the average price for arequired quantity in an Order book side.;
Often traders want to know the level they need to pay for a set 'exposure' or 'notional' amount.
This value is different to get_avg_px_for_quantity. Furthermore, it will provide both a price and a qty,
as opposed to just a price.
I am unclear on how best to implement into the c headers, as it returns a tuple of doubles; It might require
a new struct object; I'll leave that design decision up to @cjdsellers
Type of change
How has this change been tested?
I've added a basic 0 test, but not a specific value test as I don't have a full test setup.