Legal & tax

Is automated trading legal in Spain? What the law says and how it’s taxed

Published August 30, 2026 · By the AUREUM team · 8 min read

This guide is about Spain specifically: if you live somewhere else, the rules and taxes in your country may be different. In Spain, no law prohibits trading with a robot: it’s legal, and banks and funds have been trading algorithmically for decades. The questions that really matter are different ones: whether your broker is authorized, and how you report your gains or losses to Hacienda (the Spanish Tax Agency). Here’s the full picture, with no hype and no figures that will be out of date tomorrow.

A trading robot—what MetaTrader 5 calls an Expert Advisor—is simply software: a program that analyzes the market and sends buy and sell orders following rules written in advance. And in Spain there’s no rule that prohibits an individual from using a program to trade in their own account and with their own money.

That’s the key: you’re the one trading. The account is in your name, the capital is yours, and the robot only carries out the decisions you’ve delegated to it. Legally there’s no difference between you pressing the buy button and letting an algorithm press it: either way it’s your trading, with your risks and your results. If you want to dig into that comparison, we have a guide on automated vs manual trading.

In fact, trading with algorithms is no niche oddity: banks, asset managers and funds have been doing it on a massive scale for decades, and a huge share of daily market volume is executed by automated systems. An individual running an Expert Advisor like AUREUM on their platform is applying the same idea on a small scale.

What is regulated—and requires authorization from the CNMV (Comisión Nacional del Mercado de Valores, Spain’s securities regulator)—is managing other people’s money or providing financial advice. As long as the robot only trades your own account, you’re not providing an investment service to anyone: you don’t need a license, you don’t need to sign up to any register, and you don’t need anyone’s permission.

What does matter: trading with a regulated broker

The robot’s legality is almost never the real problem. Where you can actually get into trouble is in choosing your broker: the firm where you deposit your money and through which your orders are executed.

In the European Union, brokers operate under the MiFID II framework and the rules of ESMA, the European markets supervisor. In practice, that means very concrete protections for retail clients: client funds kept separate from the company’s own, capped leverage, negative balance protection and a regulator you can complain to. In Spain, supervision falls to the CNMV, and a broker authorized in another EU country can operate in Spain under its EU “passport,” as long as it’s properly registered.

Before you deposit a single euro, take a few minutes to check three things:

Useful tip

The CNMV publishes and updates a search tool on its website for warnings about unauthorized firms. Looking up the broker’s name there before opening an account is free and can save you a huge headache: it doesn’t matter how good a robot is if the firm holding your money won’t let you withdraw it.

An honest caveat: a regulated broker doesn’t make trading safe. Leveraged trading still carries a high risk of losing capital; regulation protects you against fraud and bad practices, not against the market.

How trading profits are taxed in Spain, broadly speaking

Let’s get the most important caveat out of the way first: what follows is a general overview, not a complete tax guide. The details change over the years and depend on your personal situation.

For an individual trading their own account, trading results are reported in the IRPF (Spanish personal income tax) as capital gains and losses and go into the savings income tax base. That base is taxed in brackets, between 19% and 30% depending on the brackets in force each tax year: the more you make, the higher the rate applied to the top portion.

Three more things to be clear about:

If your broker is foreign—common in automated trading—add one more item to the list: there may be additional reporting obligations for accounts and assets held outside Spain once certain thresholds are exceeded, such as the informational return on assets held abroad. It doesn’t mean paying more tax, but failing to file it when you’re required to can lead to penalties. The specific thresholds and forms change over time, so check every year.

This isn’t advice

Nothing you read here is tax or legal advice: it’s general guidance that may go out of date. Before you file your return—especially if you trade with a foreign broker or move significant amounts—talk to a tax advisor. It’s a small cost compared with the cost of getting it wrong.

Common tax mistakes when trading in Spain

In practice, trouble with Hacienda almost never comes from using a robot: it comes from very human slip-ups that happen again and again.

One simple habit fixes almost all of this: a folder for each year with your broker’s reports and your statements. The robot can automate the trading; keeping your paperwork in order is still up to you.

Quick questions

Do I need to register as self-employed to use a trading robot?

Generally, no. Trading your own capital isn’t a business activity or a service provided to others: it’s taxed as capital gains in your IRPF (personal income tax), with no need to register as self-employed (autónomo). The picture changes if you manage other people’s money or charge for trading-related services; in that case, get advice before you take any step.

Is VAT charged on a trading robot? Is it tax-deductible?

A trading robot is bought as a software subscription, just like any other program: you pay for the license with whatever taxes apply to that purchase. For an individual trading their own account, it’s generally not a deductible expense, because there’s no business activity to support it.

Can I leave it trading 24 hours a day on a server?

Yes. Many users run their robot on a trading VPS, a small remote computer that stays on around the clock. It’s just infrastructure: it changes absolutely nothing, legally or tax-wise.

AUREUM: automated trading with clear rules

An Expert Advisor for gold built to trade with regulated brokers on MetaTrader 5, with published metrics and the risk explained up front. No magic promises: just the numbers, unfiltered.

Discover AUREUM →
Disclaimer: trading leveraged instruments carries a high risk of losing capital and may not be suitable for all investors. This content is for information and education only and does not constitute financial advice or an investment recommendation. Past performance does not guarantee future results.