BLOG

Behind the numbers.

Code examples, market analysis, and data quality deep-dives.

Does Fast Earnings Growth Persist? Rank Correlation Analysis in Python
Split Adjustment Explained: Adjusted Close vs Close
Which Trading Day of the Month Pays Best? Turn-of-the-Month Analysis in Python
Can You Use Yahoo Finance Data Commercially?
How Many Independent Bets Does a Nine-Sector Portfolio Give You? Eigenvalue Analysis in Python
Which Volatility Forecast Wins One Month Ahead? HAR vs EWMA in Python
How Concentrated Are Institutional Equity Portfolios? Form 13F Concentration Analysis in Python
Do Stocks Earn Their Returns Overnight or Intraday? Return Decomposition in Python
When Do Corporate Insiders Actually Trade? Form 4 Timing Analysis in Python
Data Requirements for Backtesting a Trading Strategy
What Is Survivorship Bias in Backtesting?
Do High Dividend Yields Come From Bigger Payouts or Falling Prices? Yield Decomposition in Python
Do Stocks Fall Harder Than They Rise? Downside Beta vs Upside Beta in Python
Does Volatility Targeting Improve Sharpe Ratios? Seven-Asset Backtest in Python
Free Stock Market Data APIs: What You Actually Get
How to Give an LLM Financial Data With an MCP Server
Does Post-Earnings Announcement Drift Survive Real Filing Dates? PEAD Event Study in Python
Do Insider Buying Clusters Predict Returns? Signal Testing in Python
Does the S&P 500 Index Effect Still Exist? Event Study in Python
Are Companies Leaving the S&P 500 Faster Than They Used To? Index Survival Analysis in Python
Does Gross Profitability Predict Stock Returns? Quintile Factor Test in Python
What Growth Rate Is the Market Pricing In? Reverse DCF in Python
Does a Strong Balance Sheet Cushion Drawdowns? Leverage and Downside Risk in Python
Does Ticker Recycling Corrupt a Mean-Reversion Backtest? Entity-Resolved Z-Scores in Python
How Much of a Growth Screen's Backtested Edge Is Survivorship Bias? Point-in-Time Index Testing in Python
Why Do Leveraged ETFs Decay? Measuring Volatility Drag in Python
Are Consumer Staples Margins Shrinking Under Inflation? Gross Margin Trend Analysis in Python
Do Weak Jobs Reports Predict Market Drawdowns? NFP Surprise Event Study in Python
Is the Rotation From Tech to Industrials Backed by Earnings? Relative EPS Growth Analysis in Python
Is the Semiconductor Rally Broadening Beyond NVIDIA? Return Dispersion Analysis in Python
Which Stocks Benefit Most When Oil Prices Fall? Oil Beta Screening in Python
Do Bond Returns Predict Stock Returns? Granger Causality Test in Python
Which Stocks Actually Drive Portfolio Returns? Shapley Value Attribution in Python
Does "Sell in May" Still Work? Calendar Anomaly Backtest in Python
How to Build Complete Price History Through Ticker Changes? Entity Resolution in Python
Are KO and PEP Cointegrated? Pairs Trading Signal Construction in Python
Which Commodities Have the Strongest Momentum? Rotation Backtest in Python
Which Commodity ETFs Have the Worst Tail Risk? Expected Shortfall in Python
Are Gold Miners Leveraged Gold Bets? Rolling Beta Analysis in Python
Does the Base-Metals-to-Gold Ratio Lead Cyclical Stocks? Signal Test in Python
Can Risk Parity Tame Commodity Volatility? Portfolio Optimization in Python
Are Power Stocks Becoming an AI Infrastructure Trade? Momentum Screening in Python
Which AI Chip Stocks Have Margin Momentum? Profitability Trend Analysis in Python
Which AI Stocks Are Cheapest Relative to Growth? Growth-Adjusted Valuation in Python
Does AI Stock Leadership Persist? Momentum Backtest in Python
Which AI Stocks Have the Cleanest Balance Sheets? Net Cash Screening in Python
Can Risk Parity Reduce Mega-Cap Drawdowns? Portfolio Optimization in Python
Which Growth Stocks Are Self-Funding? Cash-Flow Quality Screening in Python
Which Sectors Struggle When the Dollar Rallies? Sector Rotation Analysis in Python
Do Cheap Stocks Hold Up When Bonds Sell Off? Valuation Rotation in Python
Does the Nasdaq 100 Have Better Growth Quality Than the Dow? Index Constituent Analysis in Python
Do Healthcare Cash-Flow Margins Predict Returns? Signal Evaluation in Python
Which Dividend Stocks Survive a Cash-Flow Stress Test? Dividend Screening in Python
Does Heavy Insider Selling Predict Weak Returns? Insider Flow Test in Python
Can Quality Screens Reduce Small-Cap Balance-Sheet Risk? Russell 2000 Test in Python
Which Retailers Have Positive Operating Leverage? Margin Screening in Python
Is MSTR a Leveraged Bitcoin Proxy? Rolling Beta Analysis in Python
Is Micron's Memory Cycle Recovering? Inventory and Margin Forecasting in Python
Which Sectors Work When Bonds Rally? Rate-Sensitive Rotation in Python
Do One-Month Price Extremes Reverse? Signal Evaluation in Python
Do Low-Volatility S&P 500 Stocks Reduce Drawdowns? Factor Test in Python
Is AI Capex Paying Back Fast Enough? Revenue Hurdle Forecasting in Python
Could Shorter AI Asset Lives Hit Earnings? Depreciation Stress Test in Python
How Much AI Capex Risk Can a Portfolio Remove? Constrained Optimization in Python
Is the AI Capex Trade Crowded? Rolling Volatility and Sector Rotation in Python
Did the AI Boom Come From Existing S&P 500 Members? Point-in-Time Momentum Test in Python
Is AI Revenue Circular? Customer-Vendor Capex Loop Analysis in Python
Is the AI Trade Connected to Private Credit? Rolling Correlation Network in Python
Is Apollo More Balance-Sheet Sensitive Than Peers? Leverage Screen in Python
Are AI Earnings Supported by Cash Flow? Accrual and Capex Screen in Python
Can Defensive Stocks Hedge AI Drawdowns? Basket Regime Test in Python
How Fast Does the Market Price In Fed Decisions? FOMC Event Study in Python
How Much Are Options Sellers Overpaid? The Variance Risk Premium in Python
Which Companies Have the Worst Earnings Quality? Sloan Accrual Screen with Geographic Revenue Data in Python
Does the Oil-to-Gold Ratio Signal Recessions? XLE/GLD Backtest in Python
Is AI Spending Crowding Out Free Cash Flow? Capex Sustainability Across the Mag 7 in Python
Does a Long Energy / Short Bonds Portfolio Capture Inflation Surprises? Factor Construction in Python
Can a Hidden Markov Model Detect Oil Market Regimes? HMM Analysis in Python
Do Grain Prices Predict Food Inflation? Granger Causality Test in Python
Does the Corporate Credit Spread Predict Stock Market Crashes? BAA-AAA Spread Analysis in Python
Do Oil Stocks Hedge Inflation? Rolling Beta Analysis in Python
Which Stocks Are Most Rate-Sensitive? Equity Duration via Bond Beta in Python
Which Companies Have the Highest Accrual Ratios? Earnings Quality Screening in Python
Is Alpha Persistent or Decaying? Rolling Sharpe Ratio Analysis in Python
Are Markets Trending or Mean-Reverting? Hurst Exponent Analysis in Python
Is Consumer Discretionary vs Staples a Leading Indicator? XLY/XLP Ratio Analysis in Python
Does Heavy Capex Predict Future Stock Returns? Capital Expenditure Analysis in Python
How to Estimate Cost of Equity Using CAPM in Python
Is Volatility Predictable? Testing for Volatility Clustering in Python
Which Industrials Are Overleveraged? Net Debt to EBITDA Screening in Python
GM Before and After Bankruptcy: Why Entity Resolution Matters for Financial Data
What Is Adjusted Beta? Merrill Lynch Beta Shrinkage in Python
How Good Is a Stock Pick? Information Ratio and Tracking Error in Python
Do Stock Returns Follow a Normal Distribution? Testing for Fat Tails in Python
Which Large Caps Have the Highest Free Cash Flow Yield? FCF Screening in Python
Which Sectors Won Over 5 Years? Sector Rotation Analysis in Python
How to Forecast Stock Volatility with GARCH Models in Python
Are Stock Prices Mean-Reverting? Augmented Dickey-Fuller Test in Python
How to Calculate CAPM Alpha and Beta with Regression in Python
How to Compare Sector Sharpe Ratios and Sortino Ratios in Python
DELL: Why Stitching Historical Price Data Together Is Wrong
How to Analyze Drawdown and Recovery for Bank Stocks in Python
How to Screen SaaS Stocks by Revenue Growth and Cash Flow in Python
How to Screen REITs by Dividend Yield and Valuation in Python
How Correlated Are the Magnificent 7? Intra-Group Correlation in Python
AAPL vs XOM: Do Individual Stocks Have Seasonal Patterns?
How to Rank Large-Cap Stocks by Momentum in Python
How to Build a Multi-Endpoint Financial Dashboard in Python
How to Compare Volatility Across Energy Stocks in Python
How to Screen Healthcare Stocks by Valuation in Python
How to Build a Sector Correlation Matrix for Portfolio Diversification in Python
How to Find Oversold and Overbought Stocks Using Z-Scores in Python
How to Measure Earnings Quality: Cash Flow vs Net Income in Python
How to Build a Multi-Factor Stock Screen in Python (Value + Momentum + Quality)
How to Build a Simple DCF Model for Any Stock in Python
How to Screen Tech Stocks by Revenue Growth in Python
How to Screen Stocks by Balance Sheet Health in Python
Is "Sell in May" Real? SPY Monthly Seasonality Over 10 Years
How to Compare Sector Performance YTD Using Python
How to Screen Dividend Stocks by Yield and Quality in Python
How to Calculate Max Drawdown and Recovery Time for Any Stock in Python
How to Compare Profitability Across Mega-Cap Tech Stocks in Python
Why Ticker Symbols Are Unreliable: The Recycling Problem Every Quant Should Know
How to Calculate and Compare Stock Volatility in Python
How to Screen Blue-Chip Stocks by P/E Ratio in Python
How to Track Companies Through Ticker Changes, Bankruptcies, and Renames in Python
S&P 500 Turnover: How Much the Index Has Changed Since 2010
How to Calculate Stock Beta and Correlation in Python
← All articles

Split Adjustment Explained: Adjusted Close vs Close

Split adjustment restates a company’s older prices onto its current share basis, so the series does not jump on the day a split takes effect. The raw close is the price that printed on the tape. The split-adjusted close divides each earlier raw price by the cumulative factor of every split that came after it. Both columns describe the same investment, and they disagree about exactly one thing: the return measured across a split date, where the raw column is wrong by the full split ratio. Neither one contains dividends.

What does a split adjustment do to the numbers?

Chipotle ran a 50-for-1 split in June 2024. Holders of record on 18 June received 49 additional shares for each share held, distributed after the close on 25 June, and the stock began trading on a post-split basis at the open on 26 June. Nobody’s position changed value over that Tuesday night. The printed price fell by a factor of fifty.

import xfinlink as xfl

xfl.set_api_key("YOUR_API_KEY")  # free at https://xfinlink.com/signup

df = xfl.prices("CMG", start="2024-06-24", end="2024-06-27",
                fields=["close", "adj_close", "volume", "split_ratio", "return_daily"])
print(df.drop(columns=["entity_id", "entity_name", "gics_sector"]).to_string(index=False))

Output:

ticker       date      close  adj_close   volume  split_ratio  return_daily
   CMG 2024-06-24 3193.73999  63.874800   412931          NaN     -0.005217
   CMG 2024-06-25 3283.04004  65.660801   481061          NaN      0.027961
   CMG 2024-06-26   65.86000  65.860000 27266346         50.0      0.003034
   CMG 2024-06-27   62.41000  62.410000 28454247          NaN     -0.052384

Tuesday’s raw close of $3,283.04 becomes Wednesday’s $65.86. Differencing that column books a 97.99% single-day loss. The adj_close column has already divided the earlier prices by 50, and 3283.04 / 50 is 65.6608, which is the number the frame carries on the Tuesday row. Measured that way the Wednesday reads 65.6608 to 65.86, a gain of 0.30%, matching return_daily at 0.003034. The split_ratio column holds the 50 on the effective date, so a pipeline can identify the corporate action instead of inferring it from an implausible return.

Volume counts shares as they changed hands. 481,061 on the Tuesday and 27,266,346 on the Wednesday are quantities in different units, and a filter comparing today’s turnover against a twenty-day average will trip on the unit change alone. Dividing the earlier volumes by the same ratio puts both sides of the event on one basis.

Why does a reverse split break screens in the opposite direction?

Because it manufactures a gain rather than a loss, and a gain gets selected instead of caught.

Lucid Group consolidated its shares 1-for-10, effective at 5:00 p.m. Eastern on 29 August 2025, with split-adjusted trading from the market open on 2 September.

df = xfl.prices("LCID", start="2025-08-28", end="2025-09-03",
                fields=["close", "adj_close", "volume", "split_ratio", "return_daily"])
print(df.drop(columns=["entity_id", "entity_name", "gics_sector"]).to_string(index=False))

Output:

ticker       date  close  adj_close   volume  split_ratio  return_daily
  LCID 2025-08-28  2.070     20.700  8344920          NaN     -0.004808
  LCID 2025-08-29  1.980     19.800 12997360          NaN     -0.043478
  LCID 2025-09-02 17.660     17.660 21813800          0.1     -0.108081
  LCID 2025-09-03 16.785     16.785 23414200          NaN     -0.049547

Read the raw close and the stock went from $1.98 to $17.66, a gain of 791.92% in one session. What holders experienced was a fall of 10.81%. The adjustment runs the same division in the other direction because the ratio is 0.1 rather than 50: $1.98 divided by 0.1 restates the Friday at $19.80 on the consolidated basis.

Any screen that ranks names by trailing return will put a company like that at the head of its list, and the number looks nothing like a parsing error, which is how the mistake survives review. Companies reach for a reverse split when the price has fallen far enough to threaten a listing standard, so the fake winners a raw-price screen selects come from exactly the population it was meant to avoid.

Where do dividends fit into an adjusted price?

Nowhere, and that is deliberate. A split changes the units a holding is denominated in and nothing else, while a dividend takes cash out of the share price and puts it in the holder’s account. Folding the second into the price level makes every historical value a function of every dividend paid since, so a figure pulled last quarter stops matching the one pulled today. Split-only adjustment leaves the level alone on ex-dates.

Ignoring the cash is expensive over any long window.

Coca-Cola over ten years, comparing a split-adjusted price index against a total return index with dividends reinvested.
ko = xfl.prices("KO", start="2016-07-29", end="2026-07-29",
                fields=["adj_close", "return_daily", "dividend"]).sort_values("date")

price_return = ko["adj_close"].iloc[-1] / ko["adj_close"].iloc[0] - 1
total_return = (1 + ko["return_daily"].fillna(0)).prod() - 1
paid = ko["dividend"].dropna()

print(f"price return {price_return:+.2%}   total return {total_return:+.2%}")
print(f"{len(paid)} dividend payments, ${paid.sum():.2f} per share")

Output:

price return +104.17%   total return +167.28%
40 dividend payments, $17.30 per share

Sixty-three percentage points over 2,513 sessions, from a stock whose trailing yield is 2.3%. A test judged on adj_close alone understates an income or value strategy by roughly the yield every year, and the shortfall compounds. return_daily carries the total return directly, and the dividend column carries the cash on the row where it went ex, which is what makes the two figures above come from a single call. The wider set of columns a backtest needs is covered in the guide on data requirements for backtesting.

The free tier serves a rolling one-year window, so the ten-year pull above needs a paid key; daily prices reach 1996 on the $29 Pro plan.

Which price column should you actually read?

What is needed Column
The price that printed, for reconciling against a statement or a filing close
A continuous series for charts, moving averages, volatility adj_close
Daily performance including dividends return_daily
The corporate action itself, on the date it happened split_ratio, dividend

Checked on 30 July 2026 against each project’s own documentation: yfinance takes an auto_adjust argument on download(), described as “Adjust all OHLC automatically” with a default of True, which is the kinder default for anyone who just wants a chart. Alpha Vantage splits the two apart, with TIME_SERIES_DAILY returning a “raw (as-traded) daily time series” while adjusted close values and the split and dividend events sit behind TIME_SERIES_DAILY_ADJUSTED, which its documentation labels “a premium API function”. Sources: the yfinance download reference and the Alpha Vantage documentation.

xfinlink returns the whole set on every row of one frame: close as traded, adj_close split-adjusted, split_ratio and dividend sitting on the event dates, return_daily for total return. The performance question and the reconciliation question get answered by the same call, with no second source to align and no adjustment convention to guess at. Field definitions are in the docs, and everything above was built from SEC EDGAR public filings and market data.

FAQ

Is adjusted close the same as total return?
No. Split-adjusted close removes the artificial steps a split leaves in the price series and stops there. Total return needs the dividends as well, which is what return_daily provides.

Why keep the raw close at all?
Because it is the only column that matches an outside record. A broker statement, a Form 4, an options chain and a filed per-share figure all refer to the price that traded, and a split-adjusted series will not tie to any of them.

How can a split-adjusted number be made reproducible years later?
Store the as-traded price together with the split factors that follow it. Backward adjustment is defined relative to the current share basis, so the durable representation is the raw price plus the events, and adjust="none" returns the frame without the adjusted column for exactly that purpose.

Do free data sources handle splits correctly?
Coverage of the mechanics varies more than the mechanics themselves. What separates sources in practice is whether the raw price, the adjusted price and the corporate action arrive together, which the guide on free stock market data APIs works through tier by tier.

Built with xfinlink — free financial data API for Python. pip install -U xfinlink

Built with xfinlink — free financial data API for Python. pip install -U xfinlink
← All articles