BLOG

Behind the numbers.

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

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 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

How to Screen SaaS Stocks by Revenue Growth and Cash Flow in Python

What’s the question?

Revenue growth is the defining metric for software-as-a-service (SaaS) companies, where recurring subscription revenue compounds over time. But growth alone is insufficient for evaluation. A company growing revenue at 30% while burning cash is in a fundamentally different position than one growing at the same rate while generating positive operating cash flow. The question is: among high-growth cloud and SaaS companies, which are scaling efficiently — converting revenue growth into cash generation — and which are still spending more than they earn?

The approach

Six publicly traded SaaS and cloud infrastructure companies are screened: Cloudflare (NET), Snowflake (SNOW), Datadog (DDOG), Zscaler (ZS), MongoDB (MDB), and CrowdStrike (CRWD). For each, three years of annual fundamentals are fetched to compute year-over-year revenue growth between the two most recent fiscal years. GAAP net income determines profitability status, and operating cash flow margin (OCF margin) — defined as operating cash flow divided by revenue — measures how efficiently the company converts top-line revenue into cash. OCF margin is preferred over free cash flow margin here because it isolates operational efficiency before capital expenditure decisions.

import xfinlink as xfl
import pandas as pd
xfl.set_api_key("your_key")  # free at https://xfinlink.com/signup
tickers = ["DDOG", "ZS", "CRWD", "NET", "MDB", "SNOW"]
df = xfl.fundamentals(tickers, period_type="annual",
    fields=["revenue", "net_income", "operating_cash_flow"], period="3y")
latest2 = df.sort_values("period_end").groupby("ticker").tail(2)
results = []
for ticker in tickers:
    rows = latest2[latest2["ticker"] == ticker].sort_values("period_end")
    if len(rows) < 2: continue
    prev, curr = rows.iloc[0], rows.iloc[1]
    rev_g = (curr["revenue"] - prev["revenue"]) / prev["revenue"]
    results.append({"ticker": ticker, "entity_name": curr["entity_name"],
        "revenue": curr["revenue"], "rev_growth": rev_g,
        "profitable": curr["net_income"] > 0 if pd.notna(curr["net_income"]) else None,
        "ocf_margin": curr["operating_cash_flow"]/curr["revenue"] if pd.notna(curr["operating_cash_flow"]) else None})
rdf = pd.DataFrame(results).sort_values("rev_growth", ascending=False)
print("=== SaaS / Cloud Growth Screen (YoY Revenue Growth) ===")
for _, r in rdf.iterrows():
    prof = "YES" if r["profitable"] else "NO"
    ocf = f"{r['ocf_margin']:.1%}" if pd.notna(r["ocf_margin"]) else "N/A"
    print(f"  {r['ticker']:5s}  {r['entity_name'][:22]:22s}  rev=${r['revenue']:.0f}M  growth={r['rev_growth']:.1%}  profitable={prof:>3s}  OCF_margin={ocf:>5s}")

Output:

=== SaaS / Cloud Growth Screen (YoY Revenue Growth) ===
  NET    CLOUDFLARE INC          rev=    $2168M  growth= 29.8%  profitable= NO  OCF_margin=27.8%
  SNOW   SNOWFLAKE INC           rev=    $4684M  growth= 29.2%  profitable= NO  OCF_margin=26.1%
  DDOG   DATADOG INC             rev=    $3427M  growth= 27.7%  profitable=YES  OCF_margin=30.6%
  ZS     ZSCALER INC             rev=    $2673M  growth= 23.3%  profitable= NO  OCF_margin=36.4%
  MDB    MONGODB INC             rev=    $2464M  growth= 22.8%  profitable= NO  OCF_margin=20.5%
  CRWD   CROWDSTRIKE HOLDINGS I  rev=    $4812M  growth= 21.7%  profitable= NO  OCF_margin=33.5%

What this tells us

All six companies are growing revenue above 20% annually, confirming that the SaaS growth premium remains intact in this cohort. However, the gap between GAAP profitability and cash generation reveals an important nuance.

Datadog is the only company in the group that is GAAP profitable, and it also posts the highest OCF margin among the growth leaders (30.6% at 27.7% growth). This combination of profitability and growth places it in the “Rule of 40” territory — a heuristic where the sum of revenue growth rate and profit margin should exceed 40% for a healthy SaaS business.

Zscaler presents the most interesting divergence: it is not GAAP profitable, yet its OCF margin of 36.4% is the highest in the group. The gap between GAAP profitability and operating cash flow is almost entirely explained by stock-based compensation (SBC), which is a non-cash expense under GAAP but does not reduce operating cash flow. Whether SBC represents a “real” cost depends on whether you view dilution as economically equivalent to a cash expense.

All six companies generate positive operating cash flow despite five being GAAP unprofitable. For subscription businesses, OCF is generally a more reliable health indicator than GAAP net income because subscription revenue is collected in advance (deferred revenue), creating a natural cash flow tailwind.

So what?

When screening SaaS stocks, filtering by GAAP profitability alone would eliminate five of these six companies, all of which are generating substantial operating cash flow. A more informative screen combines revenue growth rate with OCF margin. Companies like Datadog and Zscaler that deliver both high growth and high cash conversion are typically valued at premium multiples for good reason — they have demonstrated the ability to scale without proportional cash burn. The “profitable=NO” label is a GAAP artifact that obscures the underlying economics of the subscription model.

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