leverage_calculations#
API documentation for tradeexecutor.utils.leverage_calculations Python module in Trading Strategy.
Module description#
Helpers for leverage calculations.
Collateral/borrow size
Fees needed to pay
Liquidation price
Classes#
Estimate token quantities and fees for a leverage position. |
Functions#
|
Calculate the liquidation price for a short position. |
Calculate the collateral and borrow loan size to hit the target leverage with a starting capital. |