Introduction to the Futures Portfolio Bot
What Is the Futures Portfolio Bot?
The Futures Portfolio Bot is an automated tool that helps simplify the management of multiple futures contracts. You can combine multiple contracts into a portfolio and set the trading direction and target allocation for each contract. After the bot is created, the system establishes initial positions, continuously monitors the portfolio, and automatically executes according to your configured rules. With this tool, you can execute multi-contract strategies more efficiently and flexibly adjust your portfolio based on different market conditions.
How Does the Futures Portfolio Bot Work?
2.1 How the Bot Works
When using the Futures Portfolio Bot, you can combine 2–10 contracts into a portfolio. You can manually configure the portfolio or copy popular strategies, setting the trading direction, target weight, and portfolio leverage for each contract. Once the bot is running, it continuously monitors the actual weight of each contract and automatically rebalances based on your configured allocation threshold or fixed time interval, aiming to restore the portfolio to its preset allocations.
Building a Portfolio
A portfolio can include 2–10 USDT-margined perpetual futures contracts, with each contract set independently to long or short. The target weights of all contracts must be integers and add up to 100%.
Establishing Initial Positions
The system calculates the order quantity for each contract based on the investment amount, unified leverage, and target weights. To maintain a risk buffer, the bot does not use all funds as initial margin. The system determines the executable quantity based on order precision, minimum order requirements, fees, and market risk parameters.
Automatic Rebalancing
The Futures Portfolio Bot supports two automatic rebalancing modes:
-
Allocation-Based Rebalancing: When the actual position allocation of any contract in the portfolio deviates from its target allocation by more than the configured value, the system automatically rebalances the portfolio to restore each contract to its target weight. The actual rebalancing amount must meet the minimum order amount for the relevant contract.
-
Scheduled Rebalancing: The system checks position allocations at the configured time interval. If the rebalancing amount resulting from changes in position allocations meets the minimum order amount for the relevant contract, the system automatically rebalances the portfolio.
You can also manually trigger rebalancing while the bot is running. Due to price changes, order precision, minimum order quantities, risk limits, and available margin, rebalancing aims to bring the portfolio close to the target weights but does not guarantee an exact match with the configured values.
2.2 Bot Advantages
Flexibly build multi-contract portfolios: A single bot can manage 2–10 contracts and supports custom trading directions and target weights, reducing the operational effort of placing orders, checking, and maintaining positions one by one.
Automatic rebalancing to maintain the target structure: You can choose allocation-based or scheduled rebalancing. When position weights reach the preset deviation threshold or the specified time interval arrives, the system automatically adjusts the portfolio to bring each contract as close as possible to its target allocation.
Long-short portfolios for a wide range of strategies: Supports all-long, all-short, or mixed long-short configurations. You can also set unified leverage and rebalancing conditions, making it easier to implement portfolio strategies such as trend following, thematic trading, long-short hedging, and relative value.
Multiple creation methods for greater flexibility: New users can review and copy popular public strategies. Experienced users can manually configure their own contracts, trading directions, target weights, leverage, and rebalancing rules.
2.3 Case Studies
The following examples use simplified data to illustrate the two rebalancing methods. To make them easier to understand, fees, funding fees, slippage, quantity increments, and risk limits are not considered. Actual positions and order amounts are subject to system calculations and final execution results.
Example 1: Allocation-Based Rebalancing
Assume a user creates a mixed long-short portfolio with the following parameters:
-
Portfolio configuration: BTCUSDT, ETHUSDT, SOLUSDT
-
Unified leverage: 2x
-
Rebalancing mode: Allocation-based rebalancing, with a threshold of 5%
-
Investment amount: 4,000 USDT
-
Initial position calculation ratio: 50%, calculated and adjusted by the system based on risk conditions.
After market prices change, the position values and rebalancing directions for the contracts are as follows:
| Item | BTCUSDT | ETHUSDT | SOLUSDT |
|---|---|---|---|
| Trading direction | Long | Long | Short |
| Target weight | 45% | 35% | 20% |
| Initial position value (USDT) | 1,800 | 1,400 | 800 |
| Position value before rebalancing (USDT) | 2,200 | 1,200 | 600 |
| Actual weight before rebalancing | 55% | 30% | 15% |
| Rebalancing action | Sell to close long | Buy to open long | Sell to open short |
| Reference order amount (USDT) | 400 | 200 | 200 |
| Target value after rebalancing (USDT) | 1,800 | 1,400 | 800 |
BTCUSDT has a target weight of 45%. With the threshold set to 5%, its allowable range is 40%–50%. Its current weight has reached 55%, exceeding the upper limit and triggering rebalancing. The system reduces the overweight BTCUSDT long position and increases the underweight ETHUSDT long and SOLUSDT short positions, bringing the portfolio back closer to its target structure of 45%, 35%, and 20%.
Example 2: Scheduled Rebalancing
Assume a user creates another portfolio with the following parameters:
-
Portfolio configuration: BTCUSDT, ETHUSDT, SOLUSDT
-
Unified leverage: 2x
-
Rebalancing mode: Scheduled rebalancing, checked every 4 hours;
-
Investment amount: 5,000 USDT;
-
Initial position calculation ratio: 50%, calculated and adjusted by the system based on risk conditions.
Based on simplified calculations, the portfolio's target total notional value at time T is 5,000 USDT. Four hours later, the position values of each leg have changed:
| Item | BTCUSDT | ETHUSDT | SOLUSDT |
|---|---|---|---|
| Trading direction | Long | Long | Short |
| Target weight | 50% | 30% | 20% |
| Position value at time T (USDT) | 2,500 | 1,500 | 1,000 |
| Position value at T+4H (USDT) | 2,650 | 1,350 | 1,000 |
| Actual weight at T+4H | 53% | 27% | 20% |
| Rebalancing action | Sell to close long | Buy to open long | No adjustment needed |
| Reference order amount (USDT) | 150 | 150 | — |
| Target value after rebalancing (USDT) | 2,500 | 1,500 | 1,000 |
At the 4-hour check, the system finds that BTCUSDT and ETHUSDT have each deviated from their target weights by 3%. If the order amounts meet minimum order requirements and risk checks pass, the system reduces the BTCUSDT long position and increases the ETHUSDT long position, bringing the portfolio back closer to its target structure of 50%, 30%, and 20%. SOLUSDT is already near its target allocation, so no order is needed.
Risk Warning
-
Leverage and liquidation risk: Leverage in futures trading amplifies both profits and losses. If margin is insufficient, some or all positions may be liquidated, and the bot may also terminate.
-
Multiple legs do not necessarily mean lower risk: Contracts may move in unfavorable directions at the same time. A long-short portfolio may also experience a rapid drawdown if both legs incur losses simultaneously.
-
Rebalancing may amplify position changes: Automatic rebalancing increases or reduces positions according to target weights. If directional judgment remains incorrect, rebalancing cannot eliminate losses.
-
Slippage and execution risk: During sharp market movements or periods of insufficient liquidity, the actual execution price may differ from the price at the time of triggering. Rebalancing may also fail because of order specifications or risk restrictions.
Disclaimer
The content provided herein is for reference and educational purposes only and does not constitute any financial, investment, trading, or legal advice, nor does it constitute an offer or solicitation to buy or sell any digital assets. Gate makes no express or implied representations or warranties regarding the accuracy, completeness, or timeliness of the information contained herein. Product features, interfaces, rules, and fee structures may be updated or adjusted at any time. Please refer to the latest announcements and the actual information displayed on the Gate platform for the most accurate details.
Digital asset investments involve significant risk, and prices may fluctuate substantially. You may lose the entire amount of your investment. Please make decisions cautiously based on your own financial situation and risk tolerance after fully understanding the associated risks. If necessary, you are advised to consult an independent professional financial or legal advisor.
For more information about potential risks, please refer to Gate's Risk Disclosure and User Agreement.
