PositionSizingResult

Documentation for eth_defi.gmx.market_depth.PositionSizingResult Python class.

class PositionSizingResult

Bases: object

Result of whale-risk position sizing for one side of a market.

Computed by calculate_max_position_whale_risk(). The maximum position is the tightest of three constraints:

  1. Portfolio: the total capital available (portfolio_usd).

  2. Whale risk: a fraction of the side’s open interest (max_oi_pct * side_oi), so the position doesn’t move the market disproportionately.

  3. Pool capacity: the remaining OI capacity before the reserve cap.

Attributes summary

max_position_usd

pct_of_total_oi

whale_ok

cap_ok

binding_constraint

Methods summary

__init__(max_position_usd, pct_of_total_oi, ...)

__init__(max_position_usd, pct_of_total_oi, whale_ok, cap_ok, binding_constraint)
Parameters
  • max_position_usd (float) –

  • pct_of_total_oi (float) –

  • whale_ok (bool) –

  • cap_ok (bool) –

  • binding_constraint (str) –

Return type

None