QuantRocket Blog

Posts for quant workflow

Why Backtests Run Fast or Slow: A Comparison of Zipline, Moonshot, and Lean

Mon Jul 31 2023 by Brian Stanley

Backtest speed can significantly affect research friction. The ability to form a hypothesis and quickly get an answer from a backtest allows you to investigate more hypotheses. In this article, I explore several factors that affect backtest speed and compare the performance of 3 open-source backtesters.

Analyzing the Profitability Factor with Alphalens

Wed Jun 28 2023 by Brian Stanley

How does a company's profitability affect its stock returns? In this post, I use Alphalens, a Python library for analyzing alpha factors, to investigate the relationship between operating margin, a profitability ratio, and future returns.

Exploratory Data Analysis of Fundamental Factors

Thu Jun 15 2023 by Brian Stanley

When researching fundamental factors, analyzing alpha shouldn't be your first step. You can save time and spot issues early by starting with a basic exploration of your factor's distribution and statistical properties, a process known as exploratory data analysis (EDA). This post looks at operating margin, a profitability ratio, to demonstrate what you can learn from exploratory data analysis.

How Python Type Hints Make Coding Easier

Thu Jun 01 2023 by Brian Stanley

You may have heard about Python type hints and wondered whether they're relevant to quants or only to professional software developers. In this article, I'll explain how QuantRocket's JupyterLab environment uses type hints to enable better auto-complete and in-editor documentation, and I'll explain when quants should use type hints in their own code.