Skip to content
All library documents

Leverage, Margin Modes, Liquidation, and Funding in Automated Futures Trading

Article Freqtrade docs

Summary

The document explains how an automated trading system handles spot, margin, and futures modes. Spot trading uses unleveraged long positions, while margin borrows capital and futures trade derivative contracts that may incur funding payments. It distinguishes isolated margin, where collateral is separated by market, from cross margin, where positions share account collateral. Cross margin can transmit losses between positions and raise the risk of account-wide liquidation. Shorting requires a supported leveraged mode and an enabled strategy setting.

It also explains leverage configuration and a liquidation buffer that places a safety margin between a position’s liquidation price and its stop loss. Low buffers may permit liquidation, and the software does not account for liquidation fees, which can make reported profits inaccurate. Missing historical funding data can also distort backtests, particularly when an assumed rate is supplied. The guidance warns that leverage magnifies losses and recommends proving a strategy in live spot trading before using leverage. These are operational and risk-management notes, not evidence that any leveraged strategy is profitable.

Key ideas

  • Spot mode is unleveraged and does not support short positions.
  • Futures use derivative contracts and can add funding payments to price gains or losses.
  • Isolated margin separates collateral by market, while cross margin shares it across positions.
  • A liquidation buffer keeps the configured stop loss away from the estimated liquidation price.
  • Untracked liquidation fees and unavailable funding rates can make results inaccurate.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.