Open research

Getting started with open source for quantitative finance

Open research · Published 2026-10-20

Twenty years ago, quantitative research mostly required expensive commercial software. Today almost every step, from downloading data to pricing derivatives and training models, can be done with free, open-source tools. The difficulty has shifted from access to choice. This guide sets out the main options and how to start without getting lost.

Choosing a language

Python is the default for most new quantitative work. Its scientific stack is mature, it is used across banks, hedge funds and universities, and it connects to almost everything: databases, broker APIs, machine-learning frameworks and cloud services. Its weakness is raw speed in pure Python loops, which is usually addressed by vectorised libraries or compiled extensions.

R remains strong in statistics and econometrics, with a deep library of packages on CRAN, many written by the academics who developed the methods. Its time-series and performance-analysis packages are excellent for research and reporting.

Julia, first released in 2012, aims to combine the convenience of a high-level language with the speed of compiled code. Its ecosystem is smaller but growing, and it suits numerically heavy tasks such as simulation.

C++ is still used where latency or raw throughput matters: execution systems, pricing libraries and high-frequency infrastructure. Most researchers interact with C++ code through Python bindings rather than writing it themselves.

For someone starting out, Python is the most practical choice, with R as a valuable second language for statistics.

The core Python stack

Pricing and risk

QuantLib, started in 2000, is a comprehensive open-source C++ library for derivatives pricing, yield-curve construction and risk, with Python bindings. It is used both in education and in production systems. Learning it is a good way to understand how curves, day-count conventions and calendars work in practice.

Backtesting frameworks

Backtesting libraries fall into two broad designs:

Whatever framework is used, check how it handles transaction costs, slippage, corporate actions, delisted securities and the timing of signal versus execution. Before trusting a framework, reproduce a simple strategy by hand, for example the moving-average rule in our spreadsheet tutorial, and check that the results match.

Data

Free data sources are good enough for learning and for research on factors and macro series. The Kenneth French Data Library, FRED and Robert Shiller's long-run data are reliable starting points; we list more on our resources page. Free daily stock prices are widely available but often exclude delisted companies, which inflates backtest returns through survivorship bias. For research on individual stocks, find out whether your data include dead companies before drawing conclusions.

Communities and learning

The Quantitative Finance Stack Exchange answers technical questions; SSRN and arXiv's quantitative finance section host working papers; aggregators such as Quantocracy collect blog posts. Reading code from well-maintained projects on GitHub is one of the most effective ways to learn. Contributing documentation fixes or tests to an open-source project is also a credible way to show skills to employers.

Habits for reproducible research

  1. Use version control (Git) from the first day, including for notebooks.
  2. Record environments with a lock file or environment file so results can be recreated.
  3. Separate raw data from processed data, and keep the scripts that transform one into the other.
  4. Write tests for any function that computes a signal, label or return.
  5. Log experiments, including the ones that failed, so you know how many variations you tried.
  6. Respect licences for both code and data; see our note on packages and licences.

These habits are the foundation of the open research approach described in running a research project in the open.

A first project

A good first exercise combines the tools above. Download the monthly momentum and market factors from the Kenneth French Data Library with pandas; compute their cumulative returns, volatility and drawdowns; run a regression of momentum on the market with statsmodels; and plot the results. Then extend it: compute rolling twelve-month volatility, scale the momentum factor to a constant volatility, and see how the drawdowns change, reproducing in miniature the research discussed in our article on momentum crashes. Commit each step to a Git repository with a short note on what you found.

Once the first project works, rebuild it from a clean environment using only your lock file and README. If you cannot reproduce your own result a week later, nobody else will be able to, and fixing that early is far easier than later.

Sources