QuantRocket logo
Disclaimer


Brain Sentiment Data › Part 3: Brain Language Metrics on Company Filings


Brain Language Metrics on Company Filings¶

In this notebook, we use Alphalens to examine the Brain Language Metrics on Company Filings dataset (BLMCF).

Start by setting the bundle for this notebook:

In [1]:
from zipline.research import use_bundle
use_bundle("usstock-1d-bundle")

Next, we create a Pipeline that contains the SCORE_CONSTRAINING field, which measures the percentage of "constraining" words in the report. We limit the analysis to 10-K reports for the top 1000 stocks by dollar volume.

In [2]:
from zipline.pipeline import Pipeline, brain, master
from zipline.pipeline.factors import AverageDollarVolume

# limit analysis to stocks
universe = master.SecuritiesMaster.SecType.latest.eq("STK")

avg_dollar_volume = AverageDollarVolume(window_length=90)

constraining_language =  brain.BLMCF.slice("10-K").SCORE_CONSTRAINING.latest

pipeline = Pipeline(
    columns={
        "constraining_language": constraining_language,
    },
    initial_universe=universe,
    screen=(
        avg_dollar_volume.top(1000) 
        & constraining_language.notnull()
    )
)

Next, we run the Pipeline and generate the tear sheet. Stocks with more constraining language in their 10-K reports underperform stocks with less constraining language.

In [3]:
import alphalens as al

factor_data = al.from_pipeline(
    pipeline,
    start_date="2010-01-01", # start of dataset
    end_date="2024-03-31",
    factor="constraining_language",
    periods=[1, 21],
    quantiles=5,
    segment="Y"
)
Factor Distribution
 minmaxmeanstdcountavg daily countcount %
Constraining Language Quantile       
10.0470.1120.0960.011509,583142.220.1%
20.0990.1230.1130.004505,836141.120.0%
30.1140.1320.1240.003504,808140.919.9%
40.1220.1460.1360.004505,420141.020.0%
50.1300.3530.1570.014504,902140.920.0%
Returns Analysis
 1D21D
Ann. alpha-0.025-0.025
beta0.0730.090
Mean Relative Return Top Quantile (bps)-0.621-0.574
Mean Relative Return Bottom Quantile (bps)0.8750.684
Mean Spread (bps)-1.496-1.302
Information Analysis
 1D21D
IC Mean-0.006-0.018
IC Std.0.1000.095
Risk-Adjusted IC-0.063-0.191
t-stat(IC)-3.752-11.445
p-value(IC)0.0000.000
IC Skew0.0560.020
IC Kurtosis-0.274-0.453
Turnover Analysis
 1D21D
Quantile 1 Mean Turnover0.0050.049
Quantile 2 Mean Turnover0.0100.088
Quantile 3 Mean Turnover0.0110.095
Quantile 4 Mean Turnover0.0100.089
Quantile 5 Mean Turnover0.0070.064
1D21D
Mean Factor Rank Autocorrelation1.00.994

Next Up¶

Part 4: Brain Language Metrics on Earnings Call Transcripts