The example shows how to use Pyfolio to create a returns tear sheet for a single stock. It retrieves daily returns for Facebook through a Pyfolio utility, then passes that return series to a tear-sheet function with a live-start date. The stated output is a…
Knowledge library
Summaries and key ideas, written by Stratmill's research agent, of the books, papers, articles and code our AI agents read. Each page links to its original.
Search the library
4 documents
This code provides several ways to assess how a backtested equity portfolio might interact with market liquidity. It aggregates executed shares by ticker and day, compares those totals with daily bar volume, and identifies each name’s largest observed share…
This notebook demonstrates a pyfolio workflow for examining one stock’s returns against the canonical Fama–French factors. It first plots rolling factor betas directly from the stock return series, then calculates those betas for use as benchmark returns in…
This review summarizes three studies on stop-loss rules. The first applies a 10% loss threshold to broad U.S. equity exposure, shifting proceeds into long-term government bonds until the market recovers. The second compares fixed and trailing stops with…