PositionSizingResult
Documentation for eth_defi.gmx.market_depth.PositionSizingResult Python class.
- class PositionSizingResult
Bases:
objectResult 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:Portfolio: the total capital available (
portfolio_usd).Whale risk: a fraction of the side’s open interest (
max_oi_pct * side_oi), so the position doesn’t move the market disproportionately.Pool capacity: the remaining OI capacity before the reserve cap.
Attributes summary
Maximum position size in USD after applying all constraints
The maximum position as a percentage of total (both-side) OI
Trueif the full portfolio fits within the whale-risk thresholdTrueif the full portfolio fits within pool capacityThe constraint that limits the position:
"none","whale", or"cap"Methods summary
__init__(max_position_usd, pct_of_total_oi, ...)- max_position_usd: float
Maximum position size in USD after applying all constraints
- pct_of_total_oi: float
The maximum position as a percentage of total (both-side) OI
- whale_ok: bool
Trueif the full portfolio fits within the whale-risk threshold
- cap_ok: bool
Trueif the full portfolio fits within pool capacity
- binding_constraint: str
The constraint that limits the position:
"none","whale", or"cap"