Basics

What Is a CFD (Contract for Difference)? How It Works, What It Costs and Its Risks

Published December 2, 2026 · By the AUREUM team · 7 min read

When someone trades gold, currencies or indices on MetaTrader 5 with a broker, they are almost always using CFDs. They do not buy anything: they sign a contract with the broker to exchange the price difference between opening and closing. Understanding it explains where the costs come from, why you can lose faster than it seems and how European rules protect you.

What a CFD is

A CFD (contract for difference) is a contract between you and the broker to exchange the difference between an asset's price when you open the position and when you close it. If the price moves in your favour, the broker pays you the difference; if it moves against you, you pay it.

Three features define it:

It is a way of trading the price, not of investing in the asset. We compare the alternatives in how to invest in gold.

How the result is calculated: a gold example

At most brokers, 1 lot of gold (XAU/USD) is 100 ounces. The result is the price difference times the size:

Formula

Result = (closing price − opening price) × ounces (the other way round for a sell position), minus costs.

Buying 0.10 lots (10 ounces) of gold at $2,000 (example)
Closing priceDifferenceGross result
$2,020+$20+$200
$1,990−$10−$100
$1,950−$50−$500

A 10-ounce position at $2,000 is worth $20,000, even though the collateral the broker asks for is much smaller. The result is calculated on the $20,000, not on the collateral.

Margin and leverage

In the European Union, retail clients can use at most 1:20 leverage on gold: you must deposit at least 5% of the position's value. In the example, $20,000 × 5% = $1,000 of margin. A 5% fall in the gold price ($100 per ounce) would mean a loss equal to all of that margin. We explain it in detail in gold leverage explained.

What a CFD costs

Usual costs of a gold CFD
CostWhen you pay it
SpreadOn opening: the difference between the buy and sell price.
CommissionPer trade, on some account types.
Swap (overnight financing)Every night the position stays open; it can be a charge or, sometimes, a credit.

Swap matters little on trades lasting hours and a lot on positions held for weeks. We cover it in what is swap in trading.

Who you trade with: the broker as counterparty

CFDs are not listed on an exchange: they are OTC (over-the-counter) contracts between you and the broker. Some brokers keep the opposite risk to their clients themselves and others pass it on to liquidity providers, but in both cases your legal counterparty is the broker. That is why it matters so much that the broker is regulated and how it executes orders, as we explain in how to choose a broker.

Which protections European rules require

Since 2018, ESMA and then national supervisors (in Spain, the CNMV) have set rules for selling CFDs to retail clients:

The risks, plainly

The mandatory warnings of European brokers usually state that between 55% and 80% of retail accounts lose money with CFDs, with a median of 73.7%; we collect the published figures in how many traders lose money. The usual causes are oversized positions, accumulated costs and trading without a tested plan. CFDs are complex products and are not suitable for everyone.

If you are tax resident in Spain, CFD gains and losses are declared in personal income tax; we explain it in trading taxes in Spain.

Frequently asked questions

What is a CFD in simple terms?

A contract with the broker under which you receive or pay the difference in an asset's price between the moment you open the position and the moment you close it. You do not buy the asset.

Do I own gold with a gold CFD?

No. You only have exposure to the gold price. You cannot ask for the metal to be delivered.

Can I lose more than I deposited with a CFD?

In the European Union, brokers must give retail clients negative balance protection, so the maximum loss is the money in the account. Outside the EU it depends on the broker.

What costs does a CFD have?

The spread on opening, a commission on some accounts and swap or financing for every night the position stays open.

Are CFDs legal in Spain?

Yes. They are offered by brokers authorised by the CNMV or by supervisors in other EU countries, with the leverage limits and protections of European rules.

Risk warning

The figures in this article are examples to explain how a CFD works. CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. Leveraged gold trading can make you lose some or all of your capital. Past or simulated results do not guarantee future results. This content is educational and is not financial advice.

AUREUM: automated rules on gold, with its backtest published

Software that runs two strategies on XAU/USD in your own MetaTrader 5 account, where every trade opens with its loss and profit limits already calculated. Its 2024–2026 backtest, with both strategies together, is published with its drawdowns: a maximum drawdown of 22.35% across 345 trades. It’s a simulation, not a live account, and trading leveraged CFDs can lose you money.

See the full report →