Short answer: Algo trading for beginners means writing trading rules as code, testing them on historical data, then running them on a paper or very small account while software watches for errors. It works as software, but the evidence on retail traders is sobering: EU regulators found 74 to 89% of retail CFD accounts lost money, and a peer-reviewed study found fewer than 1% of day traders reliably earned positive abnormal returns after fees. Learn the testing and the costs before any live order, and expect that you can lose money.
Below: the evidence on retail results, what to learn, which free software exists and what its licenses mean, and a short test showing how easily a backtest flatters a rule with no edge.
Nothing here is a strategy, a recommendation or a promise. Algorithmic trading can lose money, and a backtest does not predict future results. What you may trade, where and with how much leverage depends on your country and on the broker's or exchange's terms.
Is algo trading profitable? What the evidence shows
No regulator or peer-reviewed source read for this page shows that retail algorithmic trading is profitable on average; the official data that exists points the other way for active retail trading in general.
| Source | Who was measured | Finding |
|---|---|---|
| ESMA press release, 27 March 2018 (measures agreed 23 March 2018) | Retail CFD accounts across EU jurisdictions, analyses by national regulators | 74 to 89% of retail accounts typically lost money, with average losses per client of EUR 1,600 to EUR 29,000 |
| Barber, Lee, Liu and Odean, Journal of Financial Markets 18 (2014), pp. 1-24 | Day traders in Taiwan, 1992 to 2006 | Less than 1% of the day trader population could predictably and reliably earn positive abnormal returns net of fees |
| CFTC Release 8854-24, 25 January 2024 | Advisory on AI trading bot claims | Claims of high returns, or of returns said to be certain, are red flags of fraud |
None of these measures algorithmic traders specifically. The ESMA figure is about leveraged CFDs and the Taiwan study is about day traders, whether they used code or not. They still matter: a bot executes the same kind of trades, pays the same fees and faces the same competition, only faster. A regulator study that flags algo users separately is discussed in the guide do trading bots work.
So does algo trading work? The software can work exactly as written, which says nothing about whether the rules make money after costs. A seller quoting a bot's return is making the kind of claim the CFTC warns about; the guide to trading bot scams lists the patterns.
What algorithmic trading involves, step by step
Algorithmic trading is a pipeline of six stages, and beginners usually underestimate every stage except the rule itself.
| Stage | What you do | Common beginner failure |
|---|---|---|
| 1. Data | Get prices with the right time zone, adjustments and licence | Gaps, survivorship bias, data you may not use commercially |
| 2. Rules | Write entry, exit and position size precisely enough for code | Rules that depend on judgment the code cannot copy |
| 3. Backtest | Simulate the rules on past data with fees and slippage | Using information from the future, ignoring costs, trying hundreds of variants |
| 4. Paper trading | Run on a testnet or demo account in real time | Treating demo fills as real fills |
| 5. Small live run | Real orders at the smallest size the venue allows | Raising size after a few good days |
| 6. Operations | Logs, alerts, restarts, a kill switch, key rotation | A bot that keeps trading after a crash or a lost connection |
Stages 3 and 6 are where most of the work is. The backtesting pitfalls guide covers look-ahead bias and survivorship, and the paper trading API guide covers what demo modes hide.
What a beginner needs to learn first
You need enough programming, market mechanics and statistics to tell a bug from a result; trading ideas come last.
- Python basics and pandas. Reading data, handling time stamps and missing rows. Most free frameworks are Python.
- Order types and fills. Market versus limit orders, partial fills, minimum order sizes, and why a backtest fill is an assumption.
- Costs. Commission, spread, slippage and, for leveraged products, financing. A rule that trades often pays costs on every change; the trading fee calculator shows how quickly they add up.
- Overfitting. Every variant you try raises the chance that the best one is luck. The test below shows it.
- Risk controls. Maximum position, maximum daily loss and a manual stop, kept outside the rule code, as in the kill switch guide.
- Security. API keys with trade permission only, no withdrawals, stored outside the code; see API key security for trading bots.
- The rules that apply to you. Product bans, leverage limits and licensing differ by country; the guide on whether trading bots are legal compares several jurisdictions.
No-code platforms remove the programming step, not the others.
Free algorithmic trading software: what the projects state
Free, open-source frameworks exist for both backtesting and live trading, and they differ most in license, maintenance status and which venues they connect to.
| Project | License | Latest stable PyPI release | What it covers, as stated by the project |
|---|---|---|---|
| backtesting.py | AGPL-3.0 | 0.6.6 (22 July 2026) | Backtesting only; no broker or exchange connection |
| backtrader | GPL-3.0 or later | 1.9.78.123 (19 April 2023) | Backtesting and live trading through broker connections its features page names; no PyPI release since April 2023 |
| Freqtrade | GPL-3.0 | 2026.10 (30 October 2026) | Crypto bot; README lists 12 spot and 7 futures exchanges, others through CCXT without a guarantee; says to start in dry-run |
| NautilusTrader | LGPL-3.0 or later | 1.231.0 (2 August 2026); 2.0.0 release candidates since, latest 2.0.0rc9 (10 November 2026) | Backtest and live engine; README lists 21 adapters (16 venues, 5 data providers), each marked stable or beta, and warns that breaking changes can occur between releases |
| zipline-reloaded | Apache-2.0 | 3.2.1 (25 October 2026) | Backtesting; README says it is maintained for bug, security and compatibility fixes, with new features going to a successor project |
The license matters as soon as you share or sell anything built on the code. AGPL-3.0 can require you to offer source code to users who interact with your modified version over a network; GPL-3.0 applies when you distribute it. Read the license text, and take legal advice before building a product. The open-source trading bot guide covers licenses and pre-run checks, and the Python backtesting libraries guide compares engines on one test.
"Free" covers the code, not data, hosting or exchange fees. Some exchange links in the Freqtrade README carry invite or referral codes; this page links none of them, and naming a project here does not mean Fincode uses or has built on it. For readers in Turkey: Article 99/A of Capital Markets Law No. 6362 treats activity by foreign crypto-asset platforms directed at Turkish residents as unauthorized.
What happened when a framework ran on synthetic data
A minimal run of backtesting.py 0.6.6 on synthetic prices worked, and showed three defaults a beginner can misread.
Test run, 26 November 2026. Fresh virtual environment on Windows with Python 3.11; pip installed backtesting 0.6.6, pandas 3.1.1, NumPy 2.4.6 and Bokeh 3.9.2. Input: 500 daily bars of a random walk, generated in code. Rule: buy once and hold, used only to exercise the engine. Commission 0.1%.
- With default settings the report showed 0 trades and no commission line, plus a warning that open trades are left out of the statistics unless
finalize_trades=Trueis set. With it, the report showed 1 trade. - The order was filled at the open of the bar after the one where the rule fired, not at the signal bar's price.
- Position size was whole units (99), so some cash stayed unused.
- pandas 3.1.1 raised a deprecation warning from inside the library; pin versions.
These are defaults, not bugs, and the warning names the setting. Reconcile a report by hand on a tiny example before trusting any summary figure.
The first test to run: does your process find edges in noise?
Before trusting any backtest, check how good the best of many rules looks on data where no rule can have an edge.
Bailey, Borwein, López de Prado and Zhu showed in 2014 that with 5 years of data, trying more than about 45 independent configurations almost guarantees a winner with an in-sample Sharpe ratio of 1 and an expected out-of-sample Sharpe ratio of 0; on a 2-year backtest, 7 independent tries do the same. The script below makes the same point with coin flips. It uses only the Python standard library and rejects a non-finite or negative cost, so 1e400 or nan raise an error instead of passing silently.
import math
import random
import sys
def run(n_rules=200, days=1500, split=1000, cost_bps="5", seed=7):
cost = float(cost_bps)
if not math.isfinite(cost) or cost < 0:
raise ValueError("cost_bps must be a finite number >= 0, got " + repr(cost_bps))
if n_rules < 1 or not 0 < split < days:
raise ValueError("need n_rules >= 1 and 0 < split < days")
rng = random.Random(seed)
# Synthetic prices: a random walk with no edge for anyone to find.
rets = [rng.gauss(0.0, 0.01) for _ in range(days)]
def net(pos, lo, hi):
total, prev = 0.0, 0
for t in range(lo, hi):
total += pos[t] * rets[t] - abs(pos[t] - prev) * cost / 10_000
prev = pos[t]
return total
# Each "rule" is a coin flip per day: long (1) or flat (0).
rules = [[rng.randint(0, 1) for _ in range(days)] for _ in range(n_rules)]
ins = [net(r, 0, split) for r in rules]
outs = [net(r, split, days) for r in rules]
best = max(range(n_rules), key=ins.__getitem__)
print(f"cost per position change: {cost} bps (sums of daily returns)")
print(f"best of {n_rules} rules, in-sample: {ins[best]:+.1%}")
print(f"same rule, out-of-sample: {outs[best]:+.1%}")
print(f"all rules, out-of-sample avg: {sum(outs) / n_rules:+.1%}")
print(f"always long, out-of-sample: {sum(rets[split:]):+.1%}")
if __name__ == "__main__":
for c in sys.argv[1:] or ["0", "5"]:
run(cost_bps=c)
print()Output of python noise_test.py, Python 3.11, 26 November 2026:
cost per position change: 0.0 bps (sums of daily returns)
best of 200 rules, in-sample: +58.5%
same rule, out-of-sample: -1.2%
all rules, out-of-sample avg: +5.8%
always long, out-of-sample: +12.7%
cost per position change: 5.0 bps (sums of daily returns)
best of 200 rules, in-sample: +33.1%
same rule, out-of-sample: -14.4%
all rules, out-of-sample avg: -6.7%
always long, out-of-sample: +12.7%The data is synthetic, so these figures say nothing about any market or rule. They show the mechanism: the best of 200 coin-flip rules looked strong in-sample and lost its lead out-of-sample, and a 5 basis point cost per position change made frequent switching a steady drain. If your research process finds impressive rules in this kind of data, it is finding noise. Count every variant you try and report that count with any result.
Before the first live order: accounts, rules and limits
Go live only after the paper run matches the backtest closely enough that you can explain every difference, and only at a size you can afford to lose.
- Check that your country's rules and the broker's or exchange's terms allow you the product, the leverage and automated access; account types and API access vary by country.
- Create an API key with the least permission needed, never withdrawal rights, and an IP restriction where the venue offers one.
- Put limits outside the rule code: maximum order size, maximum position, daily loss stop and a manual kill switch.
- Log every order, fill and error, and test a restart with an open position.
- Compare live fills with the backtest's assumed fills each week, and stop when they diverge in a way you cannot explain.
The test plan for trading bots turns these steps into checks. If someone else wrote your bot, an independent review such as Fincode's trading bot code review service is one option; it reviews how the code behaves, not whether the rules will earn money.
Related guide: Hire a quant developer.
Frequently asked questions
Is algo trading profitable for beginners?
No regulator or peer-reviewed source read for this page shows that it is profitable on average. Official data on active retail trading shows most accounts losing money, so treat any profit claim as unproven.
Is there free algorithmic trading software?
Yes. Open-source projects such as backtesting.py, Freqtrade, NautilusTrader and zipline-reloaded are free to use under their licenses, but data, hosting and trading fees still cost money.
Can I start algo trading without coding?
No-code platforms exist, but they replace only the programming step. You still need to understand costs, testing and risk limits, and the platform's own terms and fees apply.
What should a beginner test first?
Test your process on synthetic or shuffled data first. If it finds impressive rules where no edge can exist, its results on real data are not evidence either.
Sources
- ESMA press release, 27 March 2018: ESMA agrees to prohibit binary options and restrict CFDs to protect retail investors (opens in a new tab)
- Barber, Lee, Liu, Odean: The cross-section of speculator skill: Evidence from day trading, Journal of Financial Markets 18 (2014) 1-24 (abstract on RePEc IDEAS) (opens in a new tab)
- CFTC Release 8854-24 (25 January 2024): CFTC Customer Advisory Cautions the Public to Beware of Artificial Intelligence Scams (opens in a new tab)
- Bailey, Borwein, López de Prado, Zhu: Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance (preprint of 1 April 2014, Notices of the AMS) (opens in a new tab)
- PyPI: backtesting (release 0.6.6, AGPL-3.0) (opens in a new tab)
- PyPI: backtrader (release 1.9.78.123, GPLv3+) (opens in a new tab)
- backtrader documentation: Features (live trading section) (opens in a new tab)
- Freqtrade repository README (GPL-3.0, supported exchanges, disclaimer) (opens in a new tab)
- PyPI: freqtrade (release 2026.10) (opens in a new tab)
- NautilusTrader repository README (LGPL-3.0, integrations table, versioning warning) (opens in a new tab)
- PyPI JSON metadata for nautilus_trader (stable 1.231.0 and 2.0.0 release candidates) (opens in a new tab)
- zipline-reloaded repository README (Apache-2.0, maintenance and new projects) (opens in a new tab)
- GNU Affero General Public License v3.0, as shipped in backtesting.py's LICENSE file (opens in a new tab)
- Capital Markets Law No. 6362, consolidated text, Article 99/A (Turkish) (opens in a new tab)
This guide is general information about software and markets, not investment, legal or tax advice. Automated trading can lose money, past or backtested performance does not guarantee future results, and the rules that apply depend on your jurisdiction and your exchange's terms. Sources, checks and corrections: see the editorial policy.