QuantRocket Blog

Quick Tips: Code Reuse, the Pipe Character, Dry Runs

Thu Aug 29 2024
preview

This article's tips:

  • Quick Tip 1: Reuse code for multiple variants of a strategy
  • Quick Tip 2: Chain multiple commands with the pipe ( | ) character
  • Quick Tip 3: Dry run your Zipline or Moonshot strategy

Extracting Structured Datasets for Systematic Strategies from Unstructured Textual Sources: Brain Alternative Datasets

Wed Jul 10 2024 by Francesco Cricchio and Matteo Campellone
preview

Natural Language Processing (NLP) is a broad field that enables computers to process and analyze unstructured textual data. In this article, we present several proprietary Brain datasets derived from news articles, SEC regulatory filings, and earnings calls, along with case studies implemented in QuantRocket.

Is There Alpha in Borrow Fees?

Wed May 15 2024 by Brian Stanley
preview

Borrow fees reflect how likely short sellers think a stock is to decline. Can this information be incorporated into trading strategies as an alpha factor? This article uses Alphalens to explore the relationship between borrow fees and forward returns and uses Moonshot and Zipline to demonstrate ways to incorporate borrow fees into long or short strategies.

Cloud or Local: Where to Run Your Quant Trading?

Tue Nov 28 2023 by Brian Stanley

Is it better to run your quant trading in the cloud or locally? In this article, I outline the pros and cons of each approach and explain why running locally is often better for research while running in the cloud is better for live trading.

Market Cap vs Dollar Volume: Which to Use for Universe Selection?

Thu Oct 19 2023 by Brian Stanley
preview

Market cap and dollar volume are two commonly used metrics for filtering a trading universe by size of security. Does it matter which one you use? In this post, I quantify the difference between market cap and dollar volume and explain the kinds of stocks that may unexpectedly appear in your universe with each metric.

Researching the Quality Factor with Alphalens and Zipline

Wed Sep 27 2023 by Brian Stanley
preview

Buying high-quality stocks and avoiding low-quality ones can improve investment returns. In this post, I use Alphalens and Zipline to analyze the Piotroski F-Score, a composite measure of a firm's financial health and quality.

Financial Distress Factors: the Altman Z-Score and Interest Coverage Ratio

Wed Sep 06 2023 by Brian Stanley
preview

Are rising interest rates straining balance sheets and increasing the risk of bankruptcies? This article investigates two financial distress factors, the Altman Z-Score and interest coverage ratio, to see if distress is on the rise and how it impacts stock returns.

Sector Neutralization: Why It Matters and How to Use It

Mon Aug 21 2023 by Brian Stanley
preview

Sector neutralization is a technique to hedge out sector bets and reduce the impact of sector-specific risks on the portfolio by ranking factors within sectors rather than across sectors. This post uses the debt-to-equity ratio to show why sector neutralization is important and how to perform it in Pipeline.

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

Sun Jul 30 2023 by Brian Stanley
preview

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.

What's Better, High Profit Margins or Improving Profit Margins?

Wed Jul 12 2023 by Brian Stanley
preview

Should investors prefer companies with high profit margins or companies with improving profit margins? Is it better to own an unprofitable company that's getting better, or a profitable company that's getting worse? This post explores these questions by analyzing the profitability growth factor and how it interacts with the profitability and size factors to impact stock performance.