Spot and futures prices of the same asset, for example spot gold (XAUUSD) and gold futures, usually move together. For short moments a gap opens between them. An arbitrage EA watches that gap and trades when it is large enough. This post explains the idea, what a live system needs, and the risks.
The basic idea
- Read both prices at the same moment.
- Calculate the gap after spread and costs.
- When the gap is above your entry level, buy the cheaper side and sell the more expensive side.
- Close both legs when the gap comes back to normal.
Because one leg is long and the other is short, the position is partly hedged against the overall price direction. What you trade is the gap between the two prices, not the direction of gold.
Why the gap is not free money
A gap on the screen is not the same as a gap you can trade. Each side has its own spread, commission and swap, and contract sizes can differ between spot and futures. A gap that looks large can disappear after costs. This is why the second step above says "after spread and costs". Any system that ignores costs will give a false picture.
What it needs to work live
- Two terminals, often at two brokers, linked by a fast bridge so both orders go out together.
- Accurate cost accounting: spread, commission, swap and contract size of each side.
- Leg protection: if one order fills and the other does not, the system must detect it and repair the hedge.
- Monitoring: a live dashboard of gap, slippage and P/L.
Speed and execution
The two orders should leave as close together as possible. The longer the delay between legs, the more the gap can change. Speed depends on your PC or VPS, your internet, your brokers and the bridge. We cannot promise a fixed speed, because much of it is outside the software. Testing on your own setup shows what you really get. See also why backtests differ from live trading, because the same issues apply here with more force.
Risks to know
Gaps can widen before they close, fills can slip, and some brokers do not allow arbitrage or latency trading in their terms. Check your broker's rules first and test on demo. Margin matters too: you hold positions at two brokers, and each needs enough funds. A system that works on paper can still fail because one account runs short.
How we build these systems
An arbitrage build starts from the ₹25,000 level and takes 1 to 4 weeks, depending on the setup. We agree the entry and exit gap rules, cost model, leg protection and dashboard in writing before work starts. You can see more on the arbitrage service page, and the prices on the pricing page. For a related tool, read about trading dashboards, since monitoring is a big part of this work.
A simple worked example
Suppose the spot side shows 2,000.00 and the futures side shows 2,001.50. The raw gap is 1.50. If the combined spread, commission and swap on both sides cost 1.10 in the same units, the real gap is only 0.40, and your entry level has to be set with that in mind. If costs were 1.60, the same screen gap would be a loss. The numbers here are only to show the method; real values depend on your brokers, symbols and contract sizes. Work out your own cost model before choosing entry levels.
What to test before going live
- Run on demo at both brokers and record the gap, spread and fill price of each leg.
- Check what happens when one leg is rejected, and confirm the repair logic works.
- Test during news, rollover and low-liquidity hours.
- Confirm margin is enough at both brokers for the largest position you plan.
- Read each broker's terms on arbitrage and automated trading.
Keep in mind that arbitrage systems depend on infrastructure as much as on code. A well-written EA on a slow connection will give different results from the same EA on a fast VPS near your brokers. We help you think through the setup, but your own test results should decide whether the system fits your accounts.
Frequently asked questions
Is arbitrage risk free?
No. Execution risk, slippage, widening gaps, margin and broker rules all remain. The hedge reduces direction risk only when both legs are filled and matched correctly.
Can I run this on one broker?
Some setups use two instruments at one broker, but many use two brokers because spot and futures are often offered by different ones. Which one fits depends on your accounts and your brokers' terms.
Can you check my idea before I commit?
Yes. Use the free strategy check on the contact page and tell us your instruments, brokers and gap rules. A written quote follows after the rules are reviewed.