Lesson 10.2: Alternative data and NLP signals
Learn how alternative data and text become trading signals: sentiment scoring, event studies, breadth and decay, the cost of data and the legal limits.
By the end of this lesson you will be able to name the main kinds of alternative data and their typical problems, score text with a dictionary and say where that fails, run an event study to test whether a text signal moves prices, use the fundamental law to see how coverage limits what a data set can deliver, estimate how fast a signal decays and what a data set must earn to pay for itself, and list the legal and ethical limits. You will show that a headline scored with a simple word list can read "not a loss-making business" as negative, that 30 news events with a true abnormal return of 0.8 per cent against 2 per cent noise give an average t-ratio of 2.3 and a significant result only 58 per cent of the time while 200 events give 5.7, that an information coefficient of 0.04 gives an information ratio of 0.88 over 40 covered names and 3.1 over 500, and that a data set costing ₹1 crore a year needs about ₹40 crore of capital to pay for itself at an information ratio of 0.5 and a tracking risk of 5 per cent. You should have read Lessons 3.1, 3.3 and 10.1. The mathematics is averages, t-ratios and the fundamental law. This course is education about how markets and research work, not investment advice.
Prices and company accounts are the oldest inputs to a quantitative strategy, and everyone has them. The edge in a crowded field, then, comes increasingly from other information: data that no one used before, or that others use badly. This lesson covers two kinds, alternative data gathered from outside the usual financial sources, and text, which holds most of what people know and say about companies. Both can carry signal, and both come with a long list of ways to fool yourself, and some legal lines that must not be crossed.
What counts as alternative data
Alternative data is information about the economy or about a company that does not come from financial statements, exchange prices or the standard market-data vendors. It is usually collected as a by-product of something else, so it arrives untidy.
Source · What it measures · Example use · Typical problemsCard and payment transactions · Spending at merchants and platforms · Predict a retailer's sales before results · Panel is not representative of all customers; coverage changes
Satellite and aerial images · Car parks, oil storage tanks, crop health, construction · Estimate store traffic, inventories, harvest · Cost of processing, cloud cover, short history
Geolocation (mobile phones) · Foot traffic at stores, factories, airports · Gauge activity ahead of reports · Privacy, sample bias, vendor changes
Web and app data · Site visits, searches, app downloads and usage · Track growth of digital businesses · Methodology changes, bots
Job postings · Hiring by company and skill · Read strategy and growth · Duplicates, lag between posting and hiring
Shipping and logistics · Cargo movements, vessel positions, customs records · Nowcast trade and commodity flows · Gaps in coverage
Supply-chain and procurement · Links between suppliers and customers · Find spillovers between companies · Incomplete maps
Text: news, filings, earnings calls, social media · What companies and others say · Sentiment, topics, risk language, changes in tone · Timestamps, duplicates, language drift
Patents, regulatory filings, legal records · Innovation, approvals, disputes · Predict product success or legal risk · Slow, noisy
Weather and satellite climate data · Temperature, rainfall · Agriculture, energy demand · Weak link to single stocks
The promise of such data is timeliness: it can reveal what is happening before the official numbers come out. A series of card spending is available daily, the retailer's sales only quarterly.
The problems that come with the data
Before any model, ask these questions, which link to Lesson 3.1.
How long is the history? Many data sets have three to five years of history, which is few independent observations for a quarterly signal, and the standard errors of Lesson 4.2 apply. A signal tested on 12 quarters cannot be told from luck.
Is it point-in-time? Was each number available at the date the backtest says it was? Vendors often backfill history with data they obtained later, or revise their methods, so that the history looks better than anything a live user could have had.
What is the coverage and is it representative? A card panel covers some banks' customers, in some regions. If its mix changes over time, the "growth" in the data is partly the panel changing.
Does the relationship to the company's results hold? Foot traffic is not sales, and sales are not earnings. Each link adds noise and, often, a bias that needs modelling.
How is it delivered and updated? Frequency, delay, revisions and gaps all matter.
Who else has it? Once many funds buy the same data set, the edge is competed away. The value of a data set falls with the number of users, and some vendors limit sales for that reason.
How did the vendor get it? Provenance and legality matter, as the last section explains.
From data to signal
The steps are the pipeline of Lessons 3.2 and 3.3 with a few special features.
1. Link the data to the securities. Map merchants, locations or text to the right company, and keep track of changes of name and ownership. This mapping is often the hardest part.
2. Clean and normalise. Adjust for seasonality, the growth of the panel, store openings and calendar effects. A common choice is to compare with the same period a year ago.
3. Form a signal that predicts something the market cares about, such as the revenue surprise relative to expectations, and test it in the usual way, with the IC and the decile spread (Lesson 3.3).
4. Check the timing. The signal must use only data available at the time (Lesson 3.2), with the vendor's own publication delay.
5. Test for significance and decay. Is the effect stable across years, sectors and market conditions, or did it come from a few episodes?
How significant is a small IC?
The information coefficient of a good alternative-data signal is small, a few hundredths. Its t-ratio depends on the number of observations n, the stock-months in the test:
t = IC × √(n − 2) ÷ √(1 − IC²)
An IC of 0.03 over 2,000 stock-months gives t = 1.34, not significant. Over 20,000 stock-months it gives t = 4.24. An IC of 0.05 over 2,000 gives 2.24. A short history over a few stocks is simply not enough data to tell, which is why the length and the coverage of a data set matter so much.
Breadth and coverage
The fundamental law of Lesson 3.3, IR ≈ IC × √breadth, applies: the value of a data set depends on how many independent bets it supports. A data set that covers only a few companies, or only a few periods, gives low breadth.
Worked example 1. A signal with an information coefficient of 0.04 is formed monthly. If it covers 40 names, the number of independent bets a year is about 40 × 12 = 480, and IR = 0.04 × √480 = 0.88. If the same signal covers 500 names, the breadth is 6,000 and IR = 0.04 × √6,000 = 3.1. The assumption is that bets are independent and the IC is constant, which flatters the second case, since names in the same sector are correlated and the IC is lower for small, illiquid stocks. But the point stands: the same skill is worth far more over a wide universe than a narrow one, so coverage is value.
Decay
An edge from a data set does not last. As more people use it, as the market learns the relationship, and as the underlying behaviour changes, the information coefficient falls. If it decays exponentially with a half-life h, the fraction left after t years is 0.5^(t ÷ h).
Half-life · After 1 year · After 2 years · After 4 years1 year · 50% · 25% · 6%
2 years · 71% · 50% · 25%
4 years · 84% · 71% · 50%
### Does the data pay for itself?
Data costs money, from tens of lakhs to crores a year for a premium set, plus the staff to clean it. The test is simple. A signal with an information ratio IR at a tracking risk TE earns about IR × TE per rupee of capital, so the capital needed to cover a cost C is C ÷ (IR × TE).
Worked example 2. A data set costs ₹1 crore a year. Suppose it supports an information ratio of 0.5 at a tracking risk of 5 per cent, so an expected excess return of 2.5 per cent of capital. Then the fund needs ₹1 crore ÷ 0.025 = ₹40 crore just to break even on the data, before any other costs, and with a signal that is likely to decay. A data set that suits a billion-rupee fund can be uneconomic for a ₹20 crore one.
Text and natural language processing
Most of what is known about a company is in words: filings, results announcements, earnings-call transcripts, news and social media. Natural language processing (NLP) turns text into numbers. The usual pipeline: collect the text with its timestamp, clean it, split it into words or pieces, represent it numerically, build a score or a classification, then test the score as a signal. The main approaches, from simple to complex:
Approach · How it works · Strength · WeaknessDictionary (lexicon) counts · Count positive and negative words from a list and form a score · Transparent, cheap, hard to overfit · Ignores context, negation and domain meaning
Bag of words with weights (TF–IDF) · Represent a document by weighted word counts, and learn which words predict the outcome · Learns from the data, simple · Needs labels, ignores word order
Topic models · Find recurring themes in a collection · Reveals structure, such as risk topics · Hard to interpret and unstable
Embeddings and transformers · Represent words and sentences as vectors that capture meaning and context · Handle context and paraphrase · Opaque, heavy, risk of leakage in the model's training data (Lesson 10.4)
Change detection · Measure how much a document differs from the company's previous one · Finds what moved, not just what is there · Boilerplate and format changes create noise
### A dictionary score, and where it fails
The simplest score counts positive words P and negative words N in a headline and takes (P − N) ÷ (P + N). We built a small word list for illustration and scored six invented headlines.
Headline · Positive words · Negative words · ScoreCompany beats estimates and raises full-year guidance on strong growth · 4 · 0 · +1.00
Regulator opens probe into lender; shares fall as fine is feared · 0 · 3 · −1.00
Quarterly profit declines but management says it is not a loss-making business · 1 · 2 · −0.33
Firm wins approval for new drug; analysts upgrade the stock · 3 · 0 · +1.00
Board cuts dividend after weak results and a recall · 0 · 3 · −1.00
Company announces appointment of new chief financial officer · 0 · 0 · 0.00
The scores are sensible for four of the six. The third headline shows the characteristic failures. The words "declines" and "loss" count as negative, and "profit" as positive, but the phrase "not a loss-making business" is a negation that the counter misses, so the score of −0.33 understates a mixed message. The sixth headline is neutral news on which the model has nothing to say. Two other problems are well known. Domain meaning: Tim Loughran and Bill McDonald showed in 2011 that a large share of the words that a general-purpose dictionary calls negative, such as "liability", "cost" or "tax", carry no negative meaning in financial documents, and they built a finance-specific word list. And context: "fall" in "shares fall" and "fall" in "autumn" are different.
Dictionary scores are still useful as baselines, as rung 1 of the ladder in Lesson 10.1: they are transparent and hard to overfit, and a more complex text model must beat them out of sample. Texts can also be used for what they say about change: Lauren Cohen, Christopher Malloy and Quoc Nguyen's 2020 paper "Lazy Prices" found that when a company's annual report changed in wording from the previous year, subsequent returns were weaker, which a simple measure of text similarity could detect.
Event studies: does the text move prices?
A natural test of a text signal is an event study. For each event, such as a news item or an announcement, measure the stock's return around the event, subtract the return that would have been expected without the news, and average across events.
1. Estimate normal returns from a window before the event, for example by the market model of Lesson 2.3: expected return = α + β × market return.
2. Compute the abnormal return on each event: the actual return minus the expected return.
3. Cumulate over the event window: the cumulative abnormal return, CAR.
4. Average across events and test whether the mean differs from zero: t = mean ÷ (standard deviation ÷ √N).
Worked example 3. Suppose 'positive' news items have a true abnormal return of +0.8 per cent on the event day, and the daily idiosyncratic noise is 2 per cent. For N events the standard error of the average is 2% ÷ √N. We simulated 1,000 repeats of each case.
Number of events N · Average t-ratio · Share of repeats with a t-ratio above 230 · 2.27 · 58%
100 · 4.09 · 97%
200 · 5.71 · 100%
500 · 8.99 · 100%
With 30 events, a genuine effect of 0.8 per cent is detected at the 5 per cent level only 58 per cent of the time: a study that small will often miss a true effect, and when it finds one it will overstate it. With 200 events the effect is clear. The window matters as well. If the same total effect of 0.8 per cent is spread over six days, the noise of the cumulative return is √6 times larger, and the t-ratios for 30, 100, 200 and 500 events fall to 0.89, 1.63, 2.31 and 3.65. Use the shortest window that captures the effect.
Pitfalls
Timestamps and look-ahead. A headline published at 6 p.m. cannot be traded at that day's close. Time zones, delays and the difference between the publication time and the time a data set records are a frequent source of leaks (Lesson 3.2). Always lag conservatively.
Duplicates and syndication. The same story appears in many outlets, so counting items overstates the evidence and the number of independent events.
Boilerplate. Legal language in filings changes for reasons unrelated to the business, and a measure of change picks it up.
Selection of sources. News coverage is richer for large companies, so a text signal may be a size effect in disguise.
Language drift. Words change meaning, and new terms appear, so a model trained on old text decays.
Multiple testing. There are endless ways to score text, and the best of many is subject to the deflation of Lesson 3.4.
Backfilled or revised data. Check that the history is what a live user would have received.
Confusing a proxy with the cause. Foot traffic might predict sales because of the weather, not because of the company.
The legal and ethical limits
This is an area where mistakes are costly, and where the rules differ by country, so this section lists the questions to ask, not the answers.
Material non-public information. Trading on inside information is illegal. In India, SEBI's rules on insider trading cover unpublished price sensitive information. A data vendor must have obtained its data legitimately, and a fund should be able to show that a data set does not contain information that is confidential to a company or breached a duty. Data from an insider, or obtained by deceit, is not usable.
Privacy. Location, card and app data can concern individuals. Data protection laws, such as India's Digital Personal Data Protection Act of 2023 and the equivalent laws abroad, set conditions for collecting and using personal data, and vendors must anonymise and aggregate properly.
Terms of service and scraping. Collecting data from websites may breach their terms or the law, depending on the data and the place.
Vendor due diligence. Ask how the data was collected, whether the sources consented, and what the vendor's compliance process is. A fund is responsible for what it trades on.
Using public pieces to form a view. Combining public information in clever ways is generally fine, a principle known in the United States as the mosaic theory, but the line between it and misuse of confidential information is a legal question.
A fund should have a compliance review for every new data set before it is used, and a record of the decision. If in doubt, ask.
The code below scores the headlines, runs the event-study simulation and works out the breadth, decay, significance and break-even numbers.
python
import re
import numpy as np
from math import sqrt
1. a simple dictionary sentiment score
POSITIVE = {"beat", "beats", "record", "strong", "growth", "upgrade", "upgrades", "surge", "surges", "raises", "profit",
"gain", "gains", "outperform", "wins", "approval", "approved"}
NEGATIVE = {"miss", "misses", "loss", "losses", "weak", "decline", "declines", "downgrade", "downgrades", "fraud", "lawsuit",
"cuts", "fall", "falls", "default", "probe", "penalty", "fine", "recall"}
def score(text):
words = re.findall(r"[a-z']+", text.lower())
p, n = sum(w in POSITIVE for w in words), sum(w in NEGATIVE for w in words)
return p, n, (p - n) / (p + n) if p + n else 0.0
headlines = [
"Company beats estimates and raises full-year guidance on strong growth",
"Regulator opens probe into lender; shares fall as fine is feared",
"Quarterly profit declines but management says it is not a loss-making business",
"Firm wins approval for new drug; analysts upgrade the stock",
"Board cuts dividend after weak results and a recall",
"Company announces appointment of new chief financial officer",
]
for h in headlines:
print(score(h), h)
2. an event study: true abnormal return 0.8%, noise 2%
def eventstudy(N, seed, true=0.008, sd=0.02):
ar = np.random.defaultrng(seed).normal(true, sd, N)
return ar.mean(), ar.std(ddof=1) / sqrt(N)
for N in (30, 100, 200, 500):
res = np.array([eventstudy(N, s) for s in range(1000)])
t = res[:, 0] / res[:, 1]
print(f"N = {N:>3}: average t-ratio {t.mean():.2f} | theory {0.008 / (0.02 / sqrt(N)):.2f} | share with t above 2: {(t > 2).mean():.3f}"
f" | six-day window theory t {0.008 / (0.02 sqrt(6) / sqrt(N)):.2f}")
3. significance of a small IC, breadth, decay, break-even capital
for ic, n in ((0.03, 2000), (0.03, 20000), (0.05, 2000)):
print(f"IC {ic} over {n} observations: t = {ic sqrt(n - 2) / sqrt(1 - ic 2):.2f}")
for names, peryear in ((40, 12), (500, 12)):
print(f"IC 0.04 over {names} names, {peryear} signals a year: IR = {0.04 sqrt(names peryear):.2f}")
for h in (1, 2, 4):
print("half-life", h, "years: share left after 1, 2, 4 years", [round(0.5 (t / h), 3) for t in (1, 2, 4)])
cost, ir, te = 1.0, 0.5, 0.05
print("capital needed to cover Rs", cost, "crore of data cost:", cost / (ir te), "crore")
Common mistakes
Buying data before testing whether it can matter. Ask for a trial, test on a clean history and cost the signal first.
Trusting a vendor's backtest. Re-run it on point-in-time data you control.
Testing on a short history. An IC of 0.03 needs tens of thousands of observations to be significant.
Ignoring coverage. A beautiful signal on 30 stocks supports a small strategy.
Scoring text with a general dictionary. Words like "liability" are not negative in finance, and negation breaks counts.
Using long event windows. They add noise and reduce power.
Forgetting timestamps. A signal available after the close cannot be traded at the close.
Counting duplicates as independent events. Syndicated news inflates the evidence.
Skipping the compliance review. A data set with a legal problem is a liability, not an asset.
Assuming the edge will last. Estimate a half-life, and ask what the data must earn before it decays.
Key takeaways
Alternative data comes from card spending, satellites, geolocation, web and app activity, jobs, shipping, text and more. Its value is timeliness, its problems are short history, backfilling, unrepresentative coverage, revisions and crowding.
The t-ratio of an IC is IC × √(n − 2) ÷ √(1 − IC²): an IC of 0.03 gives 1.34 over 2,000 stock-months and 4.24 over 20,000.
Breadth drives value. An IC of 0.04 gives an information ratio of 0.88 over 40 names and 3.1 over 500, if bets are independent.
Signals decay: with a two-year half-life half of the IC is left after two years. A data set costing ₹1 crore a year needs ₹40 crore of capital to pay for itself at an IR of 0.5 and a tracking risk of 5 per cent, more once decay is allowed for.
Text becomes numbers through dictionaries, weighted words, topic models, embeddings and change measures. A dictionary is a useful baseline but misses negation, context and domain meaning.
An event study measures abnormal returns around events. With a true effect of 0.8 per cent and noise of 2 per cent, 30 events find it only 58 per cent of the time, 200 events give a t-ratio of 5.7, and longer windows lose power.
Watch for timestamps, duplicates, boilerplate, source selection, language drift, multiple testing and backfilled data. Observe the legal limits on inside information, privacy and data provenance, and run a compliance review on every new data set.
Check yourself
1. A signal has an IC of 0.02. How many observations are needed for a t-ratio of 2?
n = 4 × (1 − IC²) ÷ IC² + 2 = 4 × 0.9996 ÷ 0.0004 + 2 = about 10,000.
2. A data set covers 100 stocks, you form a signal weekly (52 times a year), and the IC is 0.02. What is the information ratio, if all bets are independent?
IR = 0.02 × √(100 × 52) = 0.02 × 72.1 = 1.44. In practice the weekly signals are correlated, so the real figure is lower.
3. A signal's IC has a half-life of 18 months. What share remains after three years?
3 years is two half-lives, so 25 per cent.
4. A headline reads "Firm avoids default after lenders agree new terms". What will a simple dictionary score show, and why is that a problem?
"Default" is a negative word, so the score is negative, but the news is positive: the firm avoided it. The counter ignores the verb "avoids" and the context.
5. An event study of 50 events finds an average abnormal return of 0.6 per cent with a standard deviation of 3 per cent. Is it significant?
The standard error is 3% ÷ √50 = 0.42%, so t = 0.6 ÷ 0.42 = 1.41. It is not significant at the 5 per cent level.
Try this
Set aside forty-five minutes. You need Python and the code in this lesson.
1. Run the code. Check the headline scores and the event-study table.
2. Add five headlines of your own, including one with a negation and one with a finance term such as "liability". Score them and note the failures.
3. Extend the word lists, and check whether your new scores change on the examples.
4. Change the true abnormal return in the event-study simulation to 0.4 per cent. How many events do you need for 80 per cent of repeats to be significant?
5. Choose a data set you can name, such as web-search interest or job postings, and write down its coverage, history, timeliness and likely half-life. Use the break-even simulator to estimate the capital it would need.
6. List the compliance questions you would ask a vendor before using the data.
7. Write a short note: whether the data you chose is worth testing, the evidence you would need, and the legal checks.
A good result is a text score you can compute by hand and criticise, an event study with an honest statement of its power and a cost-benefit estimate for a data set. The next lesson turns to deep learning and reinforcement learning, and why their power is limited in finance.
Read more
Paul Tetlock's 2007 paper "Giving Content to Investor Sentiment: The Role of Media in the Stock Market" in the Journal of Finance is a classic study of text and returns. Tim Loughran and Bill McDonald's 2011 paper "When Is a Liability Not a Liability? Textual Analysis, Dictionaries, and 10-Ks" in the Journal of Finance introduced a finance-specific word list. Lauren Cohen, Christopher Malloy and Quoc Nguyen's 2020 paper "Lazy Prices" in the Journal of Finance studies changes in filings. Craig MacKinlay's 1997 article "Event Studies in Economics and Finance" in the Journal of Economic Literature is the standard guide to the method. For legal context, read SEBI's insider trading regulations and the text of the Digital Personal Data Protection Act, 2023.
Tags: Quant Trader Alternative data NLP Sentiment analysis Event study