This notebook demonstrates an Alphalens workflow for evaluating a daily stock factor based on the gap between the prior close and current open. It defines an example universe of large-cap equities with sector labels, calculates the gap, and aligns the factor…
Biblioteca de conhecimento
Resumos e ideias principais, escritos pelo agente de investigação da Stratmill, dos livros, artigos científicos, artigos e código consultados pelos nossos agentes de IA. Cada página inclui uma ligação para o original.
Pesquisar na biblioteca
14 documentos
This Python utility collection supports quantitative factor analysis. It assigns factor observations to quantile or value-based bins, with options to bucket within groups or separate positive and negative signals. It also infers a trading calendar from…
This tutorial explains how to use Alphalens to examine whether factor scores are associated with future asset returns. It distinguishes factor research from portfolio backtesting: factor analysis helps characterize predictive power, consistency across…
Alphalens is a Python library for evaluating predictive stock factors. It turns a factor signal and pricing data into a structured dataset of forward returns, optionally assigning observations to quantiles and groups such as sectors. The resulting analysis…
This notebook demonstrates how to prepare synthetic prices and sparse event signals for Alphalens. It creates a small panel of prices for six securities, then marks selected date-security pairs in an event factor while leaving other entries missing. The…
This notebook walks through an Alphalens workflow for assessing alpha factors, which assign a value to each asset at each date and are judged by how those relative values relate to subsequent returns. It demonstrates loading daily stock prices, organizing…
The document describes plotting utilities for evaluating quantitative factors through tear sheets. A summary report combines factor quantile statistics, return tables, quantile return plots, information coefficient analysis, and turnover measures. The…
This code module supplies plotting and summary routines for quantitative factor research. It formats tables for factor returns, turnover, rank autocorrelation, quantile statistics, and information coefficients. Its chart functions visualize information…
This example adapts Alphalens return analysis to study a discrete stock event rather than rank a cross-section of securities. It defines an event when a stock’s opening price crosses below a specified dollar threshold after being at or above it the prior…
This code documents a factor evaluation workflow. It computes Spearman rank information coefficients between factor values and forward returns, with options to demean returns by group and summarize results over time or across groups. It also translates…
This notebook illustrates factor evaluation with Alphalens using a large-cap equity universe assigned to sectors. It compares a baseline factor based on each stock’s recent ten-day performance with a second factor constructed from future price changes. The…
This tutorial shows how to evaluate a stock factor with Alphalens and then examine a portfolio built from its strongest and weakest ranked groups with Pyfolio. Its example defines a mean-reversion signal from the negative five-day change in opening prices,…
This notebook creates a small synthetic price panel and a date-indexed factor with missing observations, then prepares them for Alphalens. It assigns assets to groups and uses a utility function to combine factor values with forward returns over selected…
This notebook constructs artificial price and factor data to demonstrate the input structure expected by Alphalens and to provide a controlled setting for factor analysis. It creates daily prices for six assets with different deterministic paths, assigns…