BLOG

Behind the numbers.

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

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 Track S&P 500 Additions and Removals Over Time in 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

Could Shorter AI Asset Lives Hit Earnings? Depreciation Stress Test in Python

What’s the question?

An AI data center is not only a growth asset. It is also a depreciating asset. Depreciation is the accounting expense that spreads the cost of a long-lived asset over its useful life. If useful-life assumptions prove too generous, companies may need to recognize higher depreciation expense or write down assets sooner than investors expected.

This matters because AI infrastructure is unusually exposed to technological obsolescence. Chips, servers, power systems, networking hardware, and buildings do not all age at the same speed. If the economic life of the fast-moving components is shorter than the accounting life, earnings can remain strong for a period and then reset lower when depreciation policy catches up.

The practical question is how much operating income would be at risk if annual depreciation and amortization rose materially.

The approach

The test covers AMZN, MSFT, GOOG, META, ORCL, NVDA, AVGO, and TSM. The group mixes infrastructure buyers with semiconductor and hardware suppliers, which helps separate who carries the capital burden from who earns the profit pool. Built from SEC EDGAR public filings and market data, the screen uses each company's latest annual statement.

  1. Pull revenue, operating income, capital expenditure, depreciation and amortization, and net property, plant, and equipment
  2. Calculate capex divided by depreciation, a rough measure of how much new investment exceeds current depreciation expense
  3. Estimate implied PP&E life as net PP&E divided by annual depreciation and amortization
  4. Apply a 25% depreciation stress and measure the reduction in operating income

The 25% stress is not a prediction. It is a sensitivity case for shorter useful lives.

Code

import xfinlink as xfl
import pandas as pd

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

tickers = ["AMZN", "MSFT", "GOOG", "META", "ORCL", "NVDA", "AVGO", "TSM"]
fields = ["revenue", "operating_income", "capital_expenditures",
          "depreciation_amortization", "property_plant_equipment_net"]

df = xfl.fundamentals(tickers, period_type="annual", period="5y", fields=fields)
latest = df.sort_values(["ticker", "period_end"]).groupby("ticker").tail(1).set_index("ticker")

latest["capex_abs"] = latest["capital_expenditures"].abs()
latest["capex_to_depreciation"] = latest["capex_abs"] / latest["depreciation_amortization"]
latest["implied_ppe_life"] = latest["property_plant_equipment_net"] / latest["depreciation_amortization"]
latest["extra_depreciation"] = latest["depreciation_amortization"] * 0.25
latest["operating_income_hit"] = latest["extra_depreciation"] / latest["operating_income"]

print(latest[["capex_to_depreciation", "implied_ppe_life", "operating_income_hit"]])

Full script with formatting and visualisation: ai-depreciation-policy-stress-test-python.py

Output

Depreciation stress test showing operating income sensitivity for AI infrastructure companies
=== AI Depreciation Policy Stress Test ===
Stress case: depreciation and amortization rises 25%
Latest annual periods: 2024-12-31 to 2026-01-25

Combined capex / depreciation: 2.7x
Aggregate operating-income hit: 6.1%

Company-level depreciation sensitivity:
AMZN  capex/depr= 2.0x  implied_PPE_life= 5.4y  depr=$ 65.8B  op_income_hit=20.6%  stressed_op_income=$  63.5B
TSM   capex/depr= 1.4x  implied_PPE_life= 4.9y  depr=$ 20.2B  op_income_hit=12.5%  stressed_op_income=$  35.3B
META  capex/depr= 3.7x  implied_PPE_life= 9.5y  depr=$ 18.6B  op_income_hit= 5.6%  stressed_op_income=$  78.6B
ORCL  capex/depr= 5.5x  implied_PPE_life=11.3y  depr=$  3.9B  op_income_hit= 5.5%  stressed_op_income=$  16.7B
MSFT  capex/depr= 2.9x  implied_PPE_life= 9.3y  depr=$ 22.0B  op_income_hit= 4.3%  stressed_op_income=$ 123.0B
GOOG  capex/depr= 4.3x  implied_PPE_life=11.7y  depr=$ 21.1B  op_income_hit= 4.1%  stressed_op_income=$ 123.8B
AVGO  capex/depr= 1.1x  implied_PPE_life= 4.4y  depr=$  0.6B  op_income_hit= 0.6%  stressed_op_income=$  25.3B
NVDA  capex/depr= 2.1x  implied_PPE_life= 3.7y  depr=$  2.8B  op_income_hit= 0.5%  stressed_op_income=$ 129.7B

What this tells us

The aggregate picture is not catastrophic, but it is uneven. Across the group, capital expenditure is 2.7 times depreciation and amortization. A 25% depreciation stress would reduce aggregate operating income by 6.1%. That is manageable at the group level, but the average hides large company differences.

AMZN is the most sensitive company in this screen. A 25% increase in depreciation and amortization would reduce operating income by 20.6%. TSM is next at 12.5%. Both companies have large physical asset bases relative to current operating income, so a shorter useful-life assumption has a visible earnings effect.

The suppliers with the strongest current economics are much less exposed on this measure. NVDA's stress impact is 0.5% of operating income, and AVGO's is 0.6%. Their earnings risk is more tied to demand, pricing, and margins than to depreciation on their own asset base.

So what?

Depreciation is a useful early-warning variable in the AI cycle. If companies begin shortening useful lives or discussing faster replacement cycles, the risk is not only lower accounting earnings. It is evidence that the economic life of the infrastructure may be shorter than the original investment case assumed.

For research and risk management, the companies to monitor are not necessarily the largest AI winners. They are the firms where depreciation expense is already large relative to operating income. In this screen, AMZN and TSM deserve closer earnings-quality monitoring than NVDA or AVGO for depreciation-specific risk.

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

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