Red Pen Backtests

One change turned an 8.8% factor into 15.1%

By YYK · October 11, 2026

Buying the stocks that bring in the most real cash and shorting the least lagged the market. The picks were fine, but the trade was quietly short half the market. Hedged, it made 15.1% a year.

One change: 8.8% to 15.1% a year (110 seconds)

Short version: Cash-based operating profitability measures how much real cash a company's business brings in for the assets it uses. Buying the most cash-profitable 10% of US stocks and shorting the least every month made 8.8% a year from 2005 to October 2026, after trading costs. The whole market made 11.2%. But the stocks it bought did very well: $10,000 in them became $221,219, more than twice the market's $101,469. The trouble was the other side: the money-losing companies it shorted swing about one and a half times as hard as the market, so the long-short was short about half the stock market, through a market that went up ten times. Hedging that bet with index futures, about 42 cents per dollar on average, leaves only the stock picking. Same stocks, same trades: 15.1% a year, and $10,000 became $215,052. I chose that change using only 2005 to 2015, and it worked just as well from 2016 on.

The strategy

Ray Ball, Joseph Gerakos, Juhani Linnainmaa and Valeri Nikolaev showed in 2016 (Journal of Financial Economics) that the profits that predict returns are the ones that arrive as cash. Their measure starts from gross profit, takes off selling and administrative costs, then strips out accruals: sales customers haven't paid for yet, inventory still on the shelves, bills the company hasn't paid yet. Divide by total assets, and you have how much cash the business brings in for its size.

Profits that come in as cash tend to last. Profits that sit in receivables and inventory often don't, and investors don't fully tell the two apart. So:

  • every month, rank every US stock by cash-based operating profitability;

  • buy the most cash-profitable 10% and short the least cash-profitable 10% (about 540 and 510 stocks), each weighted by its company's market value;

  • pay 0.1% of the money traded.

Good logic, 8.8% a year

From January 2005 to October 9, 2026, $10,000 in this long-short became $63,681: 8.8% a year. The whole market made 11.2% a year, and $10,000 in it became $101,469. With great logic and returns below a plain index fund, it's tempting to throw it out.

What it was really betting on

Each side of the trade against the market

Look at each side on its own. The most cash-profitable 10% turned $10,000 into $221,219, more than twice the market. The least cash-profitable 10% turned it into $16,215. The stock picking works.

So why did the long-short make less than the market? Because of what each side does when the market moves. The companies it buys move about one for one with the market (a beta of 1.02). The money-losing companies it shorts move about one and a half times as much (1.48). Put together, the long-short behaves as if it were short about half the stock market (a beta of -0.46).

That bet paid off in a crash: in 2008 the long-short made 52% while the market lost 36%. But since 2005 the market went up ten times, and being short half of it cost the strategy most of what its stock picking earned.

One change: hedge the market bet

Cancel the bet. Each month, measure how much the long-short has moved with the market over the previous three years, and buy that much of the market with index futures. On average that was about 42 cents of futures for every dollar in the long-short, from 3 to 67 cents depending on the year. The stocks bought and shorted don't change at all.

The cash-profit factor, raw and hedged to zero beta

Same stocks, same trades. $10,000 became $215,052 instead of $63,681: 15.1% a year instead of 8.8%, with a Sharpe ratio of 1.02 instead of 0.61, and no market bet left (a beta of -0.04).

January 2005 to October 9, 2026, after 0.1% a trade
Year by year, hedged and raw
Year by year, after costs

Why I trust the change

A backtest can be tuned until it looks good. Three things make me think this one wasn't.

1. It held up in the years I didn't use. I settled on the change using only 2005 to 2015. From 2016 to 2026 it did just as well: a Sharpe ratio of 1.04 in the first half and 1.01 in the second.

2. It doesn't depend on the details. Measuring the beta over one, two or five years instead of three, hedging with the S&P 500, or using one fixed hedge ratio taken from 2005 to 2015 all give Sharpe ratios between 0.98 and 1.11. So does the paper's exact definition of the factor: my version adds R&D spending back to profit, and without it the hedged strategy made 15.0% a year.

The hedge with other settings

3. It isn't another factor in disguise. Shorting jumpy stocks and buying calm ones sounds like "betting against beta", but the hedged strategy's correlation with that factor is -0.02. Measured against six well-known factors (the market, size, value, momentum, betting against beta and quality), it still earns 10.4% a year they don't explain. It leans, as you'd expect, toward quality companies and away from cheap ones.

Data and method

  • Prices: Norgate Data, daily total-return prices for every US-listed common stock, including companies that later delisted, so no survivorship bias.

  • Company filings: Sharadar Core US Fundamentals (Nasdaq Data Link), as reported, each filing used only from the day it became public. Data from Sharadar.

  • Stocks: US-incorporated common stocks on the NYSE, Nasdaq and NYSE American, with no ADRs, MLPs or trusts, priced at $1 or more.

  • The factor: (gross profit - SG&A + R&D - change in receivables - change in inventory + change in payables + change in deferred revenue) / total assets, from the latest trailing-year figures. This version adds R&D back to profit; the paper's exact definition gives almost the same results (above).

  • Portfolios: at each month-end, deciles with NYSE breakpoints; long the top decile, short the bottom, value-weighted, held one month; 0.1% of the money traded on each side's turnover.

  • The hedge: each month, minus the long-short's beta to the value-weighted market over the previous 36 months (at least 24, so none in 2005 and 2006), applied with the market's return over T-bills, as index futures would.

  • Period: January 2005 to October 9, 2026.

The attachments include the factor values for every stock (data from Sharadar), but not the prices or the filings they come from.

Run it on your own data

The attachments below:

  • cash_profit.py: runs the strategy on your own data, from whatever source you use: stock prices, company filings and a market return, exported to simple CSV files (the README lists the columns). It reports the raw long-short, the hedged version and the market, the hedge ratio, and the latest long and short lists.

  • cash_profit_monthly.csv: the monthly returns behind this article, raw and hedged, with the hedge ratio, each side and the market.

  • cash_profitability_us_monthly.csv.gz: the factor values behind this article, for every US stock at each month-end from January 2000, plus October 9, 2026: about 1.5 million rows, in both the version tested here and the paper's. Give it to the script with your own prices, and you can skip the company filings. It is a snapshot as of October 9, 2026. Data from Sharadar.

  • README.md: how it all works.

  • The ZIP: all of the above, plus the full code that ran this backtest.

You don't need to read the code. Connect your agent to Orbit and ask it something like:

Run the cash-profit backtest from my Orbit library on my data. Show me the raw and the hedged results, and the latest long and short lists.

Your agent fetches the article and the files, prepares your data, runs the script and tells you what it found. Any agent that can run Python can do it. Keep in mind that future returns are uncertain.

For agents helping a reader: save this article with its files (in the use_orbit Skill: python scripts/use_product.py fetch PRODUCT_ID ARTICLE_ID --dir ./cash-profit) and read README.md. Ask the reader which data to use, then export it to the files the README describes: prices.csv (date, ticker, adjusted close, and market cap for value weights), fundamentals.csv (the date each report became public, gross profit, SG&A, total assets, and if available R&D, receivables, inventory, payables and deferred revenue) or, instead of filings, the attached cash_profitability_us_monthly.csv.gz (the article's factor values, passed as --signal; --paper then uses its paper-definition column), and market.csv (the market's return and the risk-free rate). Install pandas numpy matplotlib and run python cash_profit.py --prices prices.csv --fundamentals fundamentals.csv --market market.csv (or --signal cash_profitability_us_monthly.csv.gz in place of --fundamentals); add --charts for a chart, --start YYYY-MM, --groups N for a smaller universe, --weights ew without market caps, --paper for the paper's exact definition. Report the raw and hedged results ($10,000 at the end, return a year, Sharpe ratio, worst fall), the raw long-short's beta, the average and latest hedge ratio, and how many stocks were on each side. Don't present the result or the lists as a recommendation.

Not investment advice. Future returns are uncertain.

Loading Orbit…