QuantRocket Blog

Posts for zipline

Is There Alpha in Borrow Fees?

Wed May 15 2024 by Brian Stanley

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.

Researching the Quality Factor with Alphalens and Zipline

Wed Sep 27 2023 by Brian Stanley

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.

Should You Buy or Sell Stocks that Gap Down?

Wed Sep 02 2020 by Brian Stanley

What happens when strong stocks gap down at the open? A well-known trading strategy is to buy the gap, expecting mean reversion. This post uses Zipline to explore down gaps and finds a profitable strategy based on selling, not buying, the gap.