Practitioner course in programming
Python for Algorithmic Trading, with Backtrader
How research code becomes a trading system: an event-driven engine, a broker connection, order and position state, risk checks, logging, and a strategy that runs on a schedule without you watching it. It also teaches Backtrader, the open-source backtesting library.
Python for algorithmic trading is mostly not about clever signals. A strategy that looks good in a notebook still has to receive data, place orders, survive a dropped connection, and agree with the broker about what it owns. This course is about that part.
What is the difference between a backtest and a trading system?
A backtest reads history and assumes every order fills. A trading system reads data that arrives late or not at all, sends orders that may be partly filled or rejected, and must recover after a crash without doubling a position. The course builds one engine that runs in both modes, so the strategy you test is the strategy you run.
Why is the assessment two weeks of paper trading?
Because the faults that matter only appear over time: a weekend data gap, an exchange holiday, a rate limit, a fill that arrives after a restart. Two weeks of logs show whether your system notices and contains them. The report on what went wrong is marked as heavily as the code.
What does Backtrader do for you, and what does it hide?
Backtrader is one of the most used open-source backtesting frameworks in Python. It is a good teacher: its design separates data, strategy, broker and analysis cleanly, and that separation is the right habit whatever tool you use later.
It runs your strategy bar by bar, keeps track of orders, cash and positions, and reports the result. It also makes choices on your behalf: how an order on one bar fills on the next, what commission is charged, whether slippage exists. The defaults are optimistic. Half of this course is learning to replace them with assumptions you can defend.
Who is this course for?
Traders and analysts with working Python who want to automate a strategy, and developers moving into trading.
What you will be able to do
- Structure trading code as data, signal, portfolio, risk and execution components.
- Write an event-driven backtest that uses the same strategy code as live trading.
- Connect to a broker API in paper mode and manage orders, fills and positions.
- Add pre-trade risk checks, logging and alerts to a running strategy.
- Schedule and monitor a strategy so that a failure is noticed and contained.
- Load daily and intraday data into Backtrader and run multi-asset tests.
Syllabus, module by module
From notebook to system
Why research notebooks fail in production, and the component layout used for the rest of the course.
Events and the main loop
Bars, ticks and timers as events; a queue-driven engine that runs the same in test and live.
Market data handling
Streaming and polled data, bar construction, gaps and stale data detection.
Orders and state
Order types, partial fills, cancels, rejections and keeping positions consistent with the broker.
How Backtrader is organized
Cerebro, data feeds, strategies, brokers, sizers, observers and analyzers.
Data feeds
CSV and pandas feeds, timeframes, resampling, and several instruments in one test.
What every course contains
Every paid course comes with the first seven and the certificate, whichever level it sits at. The proctored exam and the credential come when the course is taken as part of a Certificate, Diploma or Fellowship. Everything is self-paced: the material is yours to study in any order, at any hour, for the whole of the license.
- Workbooks. Written to train the thinking patterns and the important concepts of the course, with worked problems and the reasoning behind each answer, so that you learn to think the way the subject is thought.
- Audio edition. Focused, well-presented recordings with explainers and examples of the material, made to be interesting, relevant and entertaining, so that the general subject can be learned away from the desk.
- Notes. Pre-produced notes with every fact the course relies on, written out in full, so that nothing has to be transcribed from the films or the audio.
- Cheat sheet. One sheet with every important learning concept of the course on it, to keep beside you during the work and to revise from before the exam.
- Named sources. Every fact in the notes names its source, the paper, the book or the dataset, for anyone who wants to dig in further.
- Explainer films. Focused films, in the style of the sample films on the catalog page, that walk through the most difficult concepts of the course with visual explanations of a high standard.
- Transcript. A full transcript of every film and every audio recording, searchable and quotable.
- Proctored exam. Taken as part of a Certificate, Diploma or Fellowship, the course ends in a proctored multiple-choice questionnaire, with a pass mark of 60% and three retakes included. A course taken on its own is assessed by its coursework and has no exam.
- Verifiable certificate. A certificate of completion that a third party can verify: an employer sends the code on it to the credentials office and receives written confirmation of the course, the date and the result.
- Credential of the program. The Certificate, Diploma or Fellowship of the program, track or path the course belongs to, awarded when every course in it is passed. Which one depends on the program you choose.
How the certificate is earned
An assessed project: you build a small event-driven system that runs one strategy in paper trading for at least two weeks, and submit the code, its logs and a short report on what went wrong and how you handled it. On a pass you receive the Course certificate in Python for Algorithmic Trading, with Backtrader, issued by the Institute with a verification code. A course taken as part of a Certificate, Diploma or Fellowship ends in a proctored online exam with a pass mark of 60%. The fee includes three retakes; each attempt after that carries a reduced proctored exam fee. A course taken on its own is assessed by its coursework and has no exam. Read how certification works.
Before you start
Working Python with pandas, and the basic vocabulary of orders and strategies.
This course counts toward
- Certificate in Algorithmic TradingSeven courses and a capstone that take a strategy from idea to a costed, sized and validated system, traded on paper and reported the way a trading desk would read it.
- Certificate in Statistical ArbitrageSeven courses and a capstone on market-neutral trading: time series foundations, pairs and baskets, cointegration, regimes, costs and the validation that keeps spread strategies honest.
- Professional Diploma in Algorithmic TradingThe top credential on the practitioner path. Twenty-one courses and an 80-hour capstone covering everything between the mathematics and a book you could defend to a risk committee.
Questions applicants ask
Can I build a trading bot in Python?
Yes, and this course builds one in paper mode. Most of the work is not the signal but the handling of orders, failures and state, which is what the course concentrates on.
Which broker does the course use?
Exercises use a broker that offers a free paper-trading API. The design is broker-neutral, and the course shows where a different broker would plug in.
Does the course trade real money?
No. All work runs in paper trading. Moving to real money is your decision, and the course covers the checks to make first.
Is Backtrader still maintained?
Backtrader is open source and widely used, but its main repository has seen little development in recent years. The course teaches it because it is clear and well documented, and the final module covers when to move to another tool.