Long and short futures trades: how to test both sides in a backtest
A long futures order gains when the price rises, a short order gains when it falls, and both are plain contract trades with the same margin and fees. A strategy is only tested when its long trades and its short trades are judged as two separate reports, each with enough trades and each after costs.
By Soren Huang · Published · updated · Editorial policy
Contents
- What do long and short orders mean in futures?
- Why can futures be shorted as easily as bought?
- Are margin and fees the same for short orders as for long orders?
- How do you split a backtest report into long and short results?
- Should you test long-only, short-only or both?
- What does a real long-and-short ES backtest look like before you split it?
- Frequently asked questions
- References
What do long and short orders mean in futures?
期貨多空單, long and short futures orders, are the two sides of one contract: a long (多單) gains when the price rises, a short (空單) gains when it falls. Shorting a futures contract is one order, like buying. A strategy is only tested when both sides are measured separately, after costs, and each side stands on its own.
A long position is a contract you bought first and will sell later, so you gain when the price goes up and lose when it goes down. A short position is a contract you sold first and will buy back later, so you gain when the price goes down and lose when it goes up. Think of two friends who agree on the price of a bag of rice to be delivered next month. One of them is happy if rice gets more expensive, the other is happy if it gets cheaper. Neither of them owns any rice today. That is a futures contract.
Hypothetical example
Suppose a Nasdaq-100 futures contract trades at 20,000 points. A trader who buys one contract and sells it at 20,050 gains 50 points. A trader who sells one contract at 20,000 and buys it back at 19,950 also gains 50 points. On the E-mini contract each point is worth $20, so both trades gain $1,000 before costs. The direction of the price was opposite; the size of the gain was the same.
The mirror is perfect on paper and imperfect in the market. Index futures spend more time rising slowly than falling fast, so a rule that is a mirror image in its code often produces two very different trade lists. That is the reason this article keeps repeating one idea: do not judge a long-and-short strategy by its combined total. The five types of futures algo trading strategies all take both sides, and each one can carry a weak side that the total hides.
Why can futures be shorted as easily as bought?
A futures contract is an agreement, not a share you must borrow, so selling first needs no locate, no borrow fee and no rule about selling into a falling price. When you sell a stock you do not own, your broker must first find shares to lend you, charges you for the loan, and may be blocked from executing the sale while the price is dropping. When you sell a futures contract you have not bought, you simply create a new open contract. The exchange's clearing house stands between you and the buyer, and both of you post the same margin.
| Step or cost | Shorting a stock | Shorting a futures contract |
|---|---|---|
| Must borrow the shares first | Yes | No, a new contract is created |
| Borrow fee or locate | Yes, and the fee can change daily | No |
| Restriction on selling into a falling price | Can apply | No |
| What you post | Cash proceeds plus margin | The same margin as a long |
| What the order looks like | A sell with extra conditions | One order, like a buy |
This matters for backtesting because the short side of a stock strategy carries costs and interruptions that are hard to model, which is one reason the way stock trading algorithms work often leaves them long-only, and why testing a US stock day-trading idea needs a separate cost line for borrowed shares. A futures strategy has none of that. Its short side can be written as the exact mirror of its long side, with the same fees, and the backtest can treat both with one cost setting. That is what people mean when they say index and commodity futures strategies are symmetric by design. Symmetric in the rules does not mean symmetric in the results, which is the subject of the rest of this article.
Are margin and fees the same for short orders as for long orders?
Exchanges set one initial margin and one maintenance margin per contract, and both apply whether you are long or short; commission and exchange fees are charged per contract per side, so the cost inputs of a backtest are identical for both directions. Margin is the deposit the clearing house holds against your open contract. Initial margin is the amount you need to open the position, and maintenance margin is the lower amount your account must stay above while the position is open. Neither depends on which way you are facing.
Exchanges change these values when volatility changes, so read the current numbers from the exchange's contract specification page before you size a test, and use the free futures contract calculator to turn tick size and point value into dollars per trade. For the E-mini Nasdaq-100, the exchange page lists a contract size of $20 times the index and a minimum tick of 0.25 points, worth $5.00, for a long and a short alike.
| Backtest input | Long | Short |
|---|---|---|
| Initial margin | Same per contract | Same per contract |
| Maintenance margin | Same per contract | Same per contract |
| Commission per contract per side | Same | Same |
| Exchange and clearing fees | Same | Same |
| Slippage assumption | Same input | Same input, but fills can be worse in a fast drop |
| Price behaviour | Often different | Often different |
The last row is where the two sides part. Index futures tend to fall faster than they rise. A short entry on a stop order during a sharp drop can fill several ticks past the trigger, while the mirror-image long entry in a slow rise fills close to it. The cost setting is the same number for both sides, but the real cost on the short side can be higher on the days that matter most. A practical check is the one described in trading costs in backtests: rerun the short side alone with double the slippage and see whether its average trade stays above zero.
How do you split a backtest report into long and short results?
Read five numbers for the long trades and the same five for the short trades, as if they were two separate reports: net profit, trade count, average trade after costs, win rate and maximum drawdown. A combined total adds the two sides together and can look healthy while one side made all the money and the other only added drawdown. Average trade after costs is the net profit divided by the number of trades, after commission and slippage have been taken out of every trade. It is the first number to compare across the two sides because it does not depend on how many trades each side took.
| Number to read | Long trades | Short trades | Combined |
|---|---|---|---|
| Net profit after costs | Own figure | Own figure | Sum of both |
| Trade count | Own count | Own count | Sum of both |
| Average trade after costs | Net profit ÷ trades | Net profit ÷ trades | Hides which side carries it |
| Win rate | Own figure | Own figure | Blend of both |
| Max drawdown | From the long-only equity curve | From the short-only equity curve | Usually not the sum |
Hypothetical example
Two strategies both show a combined net profit of $40,000 over the same history. In the first, the long side made $45,000 from 60 trades and the short side lost $5,000 from 40 trades, and most of the drawdown came while short trades were open. In the second, the long side made $22,000 from 50 trades and the short side made $18,000 from 48 trades, and both equity curves rise through the period. The totals are equal. The evidence is not. The first strategy is a long-only strategy carrying a short side that only costs money; the second has two sides that each earn their place.
Two details make the split honest. First, the drawdown of each side is read from that side's own equity curve, not by splitting the combined drawdown. A long-only curve and a short-only curve each have their own worst stretch, and those stretches usually fall on different dates. Second, the trade count of each side has to pass the same minimum you would demand of any strategy. Forty short trades over ten years is a hint, not a result, and no average built from them should decide anything on its own. The long and short analysis in the Performance Report of AlphaPrime (Valynox) lays out exactly this split, so the two sides can be read side by side without rebuilding the report by hand.
Should you test long-only, short-only or both?
Run the same rule three times, once allowing both directions, once long-only and once short-only, with identical costs and sessions, and write down before the runs what each version must show. Pardo (2008) describes strategy evaluation as judging performance against standards fixed before the test, and the standards here are simple: a minimum number of trades per side, an average trade after costs above zero and well clear of the round-trip cost, and a drawdown limit you would accept in a live account. The order of steps matters, because the rule has to exist before any result is seen.
- Write the pass rule. For example: at least 30 trades per side before a side counts at all, a few hundred before it is trusted; average trade after costs above zero on each side; drawdown of each side within your limit.
- Run the both-sides version. Record the five numbers from the previous section for the long trades, the short trades and the combined result.
- Run the long-only version with the same costs, the same session and the same data. Nothing changes except that short entries are disabled.
- Run the short-only version in the same way.
- Decide: keep both sides, keep one side, or reject the rule, according to the pass rule you wrote in step 1.
Why run three versions instead of simply splitting the both-sides report? Because for many rules the long-only run is not the same as the long trades of the combined run. A stop-and-reverse rule is a rule that closes a long by opening a short, and closes a short by opening a long, so it is always in the market. Remove the short side from such a rule and every long trade now needs its own exit, which changes the trade list, the time in market and the drawdown. The split report from step 2 tells you which side carried the result; the separate runs from steps 3 and 4 tell you whether that side still works when it has to stand alone. The route in how to build and test a day trading algorithm fits this pattern: build the rule once, then test it as three candidates.
| What the three runs show | Decision | Why |
|---|---|---|
| Both sides pass the rule on their own | Keep both | Each side earns its drawdown; the combination smooths the curve |
| One side passes, the other fails or has too few trades | Keep the passing side only | The failing side adds drawdown and cost without a measurable edge |
| Neither side passes alone, but the combined total looks fine | Reject or go back to research | The total is the sum of two weak results, not evidence of one strong one |
What does a real long-and-short ES backtest look like before you split it?
Before the split, a two-sided run shows one set of summary numbers and one equity curve, and the figures below show what that looks like for a real search on E-mini S&P 500 futures. The run used ES daily bars from 2019-01-02 to 2025-06-30, allowed both long and short trades with one contract, and charged $20 commission and $25 slippage on every trade. It is the one candidate the search kept out of the 1,024 it tried, chosen for its return against its drawdown. Its only entry and exit came from a Record Test rule, a stand-in built from standard indicators, with no stop, no target and no filter, so it tests the shape of a two-sided report rather than any particular long-short strategy.
Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $56,377.5 |
| Max drawdown | $30,507.5 |
| Trades | 98 |
| Win rate | 60.2% |
| Profit factor | 1.498 |
| Average trade | $575.28 |
| Time in market | 34.26% |

Read these numbers as a candidate, not as a finding. Picking the kept candidate after the fact flatters it: when more than a thousand variants are compared on one history and the best is kept, part of what it shows is luck that happened to fit those years, which Bailey et al. (2014) describe as the reason the best backtest in a search is usually inflated. The numbers say nothing about which direction earned what. There were 98 trades in the whole period, and the two directions share them, so each side on its own holds only a part of that count. A minimum-trades line in a pre-written pass rule exists for exactly this situation.

The next step is the one this article has been building toward. Take a two-sided run of your own on the same kind of data, open the long and short analysis in your Performance Report, and write the five numbers for each side into the pass rule you set down before the run. Then run the long-only and short-only versions with the same costs and session, and let the rule, not the combined total, decide which sides stay.
Frequently asked questions
What do 多單 and 空單 mean in futures trading?
多單 is a long position: you bought a contract first and gain if the price rises. 空單 is a short position: you sold a contract first and gain if the price falls. Both are ordinary futures trades that you open with one order and close with the opposite order. Neither requires owning or borrowing anything.
Can you short futures?
Yes, and it is as simple as buying. A futures contract is an agreement, so selling one you have not bought creates a new open contract rather than requiring borrowed shares. There is no locate, no borrow fee and no restriction on selling while the price is falling. You post the same margin as a long position of the same size.
Are the fees and margin for a short order the same as for a long order?
For outright futures positions, the exchange sets one initial and one maintenance margin per contract, and it applies to long and short alike. Commission and exchange fees are charged per contract per side regardless of direction. The one practical difference is slippage: short entries during a fast drop can fill worse than the mirror-image long entries, so test the short side with a higher slippage setting before trusting it.
How do I see long and short results separately in a backtest?
Read five numbers for each direction as two separate reports: net profit after costs, trade count, average trade after costs, win rate and the maximum drawdown of that side's own equity curve. Some report tools lay this split out directly; otherwise export the trade list and group it by direction. Then rerun the rule as a long-only and a short-only version, because removing one side can change the exits of the other.
Why does a strategy work long but not short on index futures?
Index futures spend more time rising slowly than falling fast, so a rule written as a mirror image produces two different trade lists: many long trades in gradual trends and fewer, faster short trades in sharp drops. The short side often has too few trades to judge and pays more slippage on the days that matter. That is why the short side should be judged on its own trade count and its own average trade after costs, not on the combined total.
References
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Pardo, R. (2008). The Evaluation and Optimization of Trading Strategies (2nd ed.). John Wiley & Sons.
- CME Group. E-mini Nasdaq-100 Futures contract specifications (contract size $20 × index, minimum tick 0.25 index points = $5.00). cmegroup.com/markets/equities/nasdaq/e-mini-nasdaq-100.contractSpecs.html

