About
About
Quantitative research in Python, published by QUANTARMY. What we cover, how it is made and what it is not.
Who publishes
Python For Trading is a quantitative research site by QUANTARMY. It publishes in Spanish and English: each English research is the translation of a Spanish one.
Authors:
- Jesús Cuesta. Investor since 2014 and doing research since 2017. He has worked at asset managers and crypto hedge funds. He signs most of the archive.
- Enric Jaimez (Un Especulador). Economist and research analyst: global macro, factor investing, volume profile and order flow. Author of the research on monetary policy.
What it covers
Algorithmic trading and quantitative research with Python: backtesting with Zipline, financial data management with ArcticDB, seasonality, volatility, microstructure and liquidity, stochastic processes, alpha factors and portfolio reporting. Long topics are published as multi-part series. The paths order the archive so it can be read from start to finish.
How the research is made
- Code you can run. Each research includes its code in input and output cells, ready to copy. When there is a repository or notebook, it is linked in the header (“Code on GitHub”). Our own libraries and environments are in the lab and on GitHub.
- Data sources. Market and macro data from public sources or vendors: Yahoo Finance (yfinance), EODHD, FRED (with fredapi or OpenBB), OpenBB and Alpha Vantage, among others. The source of each series is in the research code.
- Storage, backtesting and metrics. Data in ArcticDB (Datalake), backtests with zipline-reloaded and metrics with QAStats, empyrical and pyfolio. The full environment fits in a Docker container (Quantstack).
- Reproducibility. The same code with the same data and the same library versions gives the same result. Vendors revise their data (dividends, splits, macro revisions): a later download can give slightly different figures.
- Simulated results. A backtest is a simulation with assumptions about data, costs and execution. It is not a real result and does not anticipate future results.
- Header figures. The figure of each research in its header and on the cards is a diagram of the content; when it is illustrative, its caption says so. The charts in the body come from the research code.
Corrections
At the end of each research there is a “Spotted an error? Let us know →” link. It opens the contact form with the “Correction” reason and that research already selected. Each report is reviewed; if the error is confirmed, the research is corrected and its header shows the update date.
Conflicts of interest
Nothing published here is investment advice or a recommendation to buy or sell. The content is educational and for research.
The authors and the QUANTARMY team may hold positions, long or short, in the assets analysed, before or after publication, and are not required to disclose them. The details are in the disclaimer.
Contact
Technical questions, collaborations and corrections: contact. On X: @PythonTradingES. Each new research arrives by email with the newsletter.