Skip to content

Conversation

@dpaiton
Copy link
Contributor

@dpaiton dpaiton commented Dec 18, 2024

A Hyperdrive update from this time last year (delvtech/hyperdrive#692) reworked exposure such that the state long_exposure variable included exposure adjustments from any current trade, without representing negative exposure. For example, here is the latest code for long exposure in open short. This update did not get fully propagated to the short side of the rust SDK. The long side can remain unchanged since negative checkpoint exposure can net out future longs, which is not accounted for in the state.long_exposure variable.

This PR implements the fix. I will do a round of updating test tolerances once the remaining max short fixes are implemented.

The commits are organized to separate meaningful changes from regex propagation.

@dpaiton dpaiton changed the title remove checkpoint exposure hyperdrive 0.20.1; fix checkpoint exposure bug Dec 18, 2024
@dpaiton dpaiton force-pushed the dpaiton/remove-checkpoint-exposure branch 3 times, most recently from f578aaa to c2dcff6 Compare December 18, 2024 17:59
@dpaiton dpaiton marked this pull request as ready for review December 18, 2024 17:59
@dpaiton dpaiton force-pushed the dpaiton/remove-checkpoint-exposure branch from c2dcff6 to ea954c9 Compare December 19, 2024 20:51
@dpaiton dpaiton mentioned this pull request Dec 20, 2024
7 tasks
@dpaiton
Copy link
Contributor Author

dpaiton commented Jan 22, 2025

Per conversations with @jalextowle, the checkpoint exposure is ok to leave alone in the Long flow. This PR only updates the short flow to avoid double counting exposure.

Copy link
Contributor

@sentilesdal sentilesdal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@sentilesdal sentilesdal merged commit db760a3 into main Jan 22, 2025
8 checks passed
@sentilesdal sentilesdal deleted the dpaiton/remove-checkpoint-exposure branch January 22, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants