← Quantery Blog

How should a backtest handle idle cash? | Quantery Blog

October 31, 2026 · 8 min readbacktestingcashtesting-method

A backtest should treat idle cash as an explicit portfolio rule. When the screen has fewer qualifying companies than the portfolio can hold, leave the unused allocation in a named cash sleeve and state what that sleeve earns. Then rerun the test with another defensible cash return. If the conclusion flips, the result depends on the cash assumption as much as the stock thesis.

Idle cash is the unallocated part of a hypothetical portfolio. It appears when no company qualifies, too few qualify to fill the available slots, or an exit releases money before another entry arrives. It still affects the compounded return, drawdown and benchmark comparison. Leaving its treatment undocumented doesn't remove the choice. It buries it.

Why does idle cash change a backtest result?

A sparse screen makes a gate decision and an exposure decision at once. Its gate decides which companies qualify. Its scarcity decides how much of the hypothetical portfolio reaches those companies.

Suppose a portfolio spreads available capital across every qualifier. When qualifiers are plentiful, each company gets a modest weight. When the gate admits only a thin set, the same rule can load the portfolio into a few names. That turns a claim about stock selection into a claim about concentration too. Position-weighting rules cover that problem from the allocation side.

A residual cash sleeve keeps position size from expanding just because the signal is scarce. It also creates cash drag during rising markets and can soften losses during falling ones. Those effects are part of the policy. A screen that sits out most of a broad rally may lag even if its qualifying companies do well. A screen that spends long intervals in cash may show a mild drawdown because it avoided exposure. That says little about whether it found unusually resilient businesses.

That distinction matters when reading Quantery's two backtest views. The event study asks what happened after a company qualified. The current naive portfolio turns overlapping qualifications into one path by taking the equal-weight average return of its open positions in each interval. When no position is open, that interval earns zero. It doesn't model target slots, a residual cash sleeve, interest on cash or fallback index exposure, and its report doesn't estimate cash exposure. Any explicit cash policy therefore needs a separate calculation outside the app. Arithmetic average and compounded returns can diverge from the portfolio result too.

What return should the cash sleeve earn?

There isn't one universal answer. Pick the convention that matches the research question, write it down before reading the finished curve, and keep it aligned through time.

Zero return is the hard baseline. It asks how the stock rule behaved without giving unused capital any help. This is easy to audit and useful as a stress case. It can understate what readily available cash might have earned, especially during periods with higher short-term rates. Call it what it is: an intentionally severe assumption.

A short-term Treasury proxy is a defensible research convention for cash that is meant to earn a low-risk market rate. The Fama/French research factors define their risk-free return using a one-month US Treasury bill rate. Their source changes from Ibbotson Associates through May 2024 to the ICE BofA US 1-Month Treasury Bill Index from June 2024 onward (Kenneth French Data Library). That definition shows the instrument and the source vintage. The convention is inspectable.

A public alternative is the Federal Reserve's monthly three-month Treasury bill series on FRED. It is an average of business-day observations, quoted on a discount basis and published monthly. That makes it a rate series, not a ready-made portfolio return. A backtest must convert it consistently to the return earned over each holding interval. It must also use the observation that was available for that interval. Pulling a later annual average backward would add information the simulated investor didn't have.

The benchmark return answers a different question. Moving unused money into an index means the policy remains invested when the stock gate is empty. Now the curve combines the custom thesis with a fallback index strategy. That may be a policy someone wants to study, but it no longer measures the gate's willingness to abstain. Label it as a hybrid. The fallback isn't cash.

The brokerage account's posted cash rate can fit an implementation study, provided the historical rate and product terms are available. Today's rate pasted across old periods won't do. Cash products have fees, eligibility rules and changing spreads. If you can't reconstruct the applicable history, use an auditable market proxy and state the gap.

How should cash returns enter the calculation?

Apply the cash return over the same interval used for the stock holdings. The portfolio return for an interval can be written as:

portfolio_return = invested_weight * stock_sleeve_return
                 + cash_weight * cash_sleeve_return

The weights should come from the portfolio state at the start of that interval, subject to the saved entry, exit and rebalance rules. Don't look at the end-of-interval survivor list and pretend those were the opening weights. That would use later information to rewrite the path.

The cash sleeve compounds. If money remains unused across several intervals, each interval's cash return builds on the previous balance. Treating a quoted annual rate as though it were earned in full every month would inflate the result. Treating a monthly rate as an annual one would suppress it. Record the conversion method with the run so someone else can reproduce the arithmetic.

Timing needs the same discipline as fundamentals. A historical Treasury proxy must be aligned to dates without peeking. If a monthly value summarizes observations throughout the month, decide whether your simulation uses a prior published value, a daily series available on the date, or a return series constructed from bill prices. Each version answers a slightly different implementation question. Keep one convention across the test. Don't switch when rates become inconvenient.

Missing rate data also needs a rule. Carrying the last known value forward may be reasonable over a short gap. Substituting zero is more conservative. Dropping the whole portfolio interval changes the stock sample too, which is usually the worst choice. The important part is that a missing cash input can't select which stock outcomes remain in the backtest.

Which cash rule matches the thesis?

Start with the economic claim.

If the thesis says a strict gate identifies rare accounting setups and should abstain otherwise, residual cash is part of the idea. Let unused capital remain in a cash sleeve. Compare a zero-return baseline with a point-in-time Treasury proxy. The difference shows how much waiting contributed to the measured result.

If the thesis says its score ranks the best available companies at every rebalance, idle cash may signal a mismatch. A relative-ranking design is supposed to choose among the eligible universe even when absolute quality is poor. Adding a cash gate changes that claim by allowing the strategy to refuse the entire opportunity set. Test the abstention rule separately.

If the thesis is meant to describe company-level signal quality, lead with the event study. A forced portfolio policy can obscure the question by mixing signal overlap, concentration and cash. Once the event pattern earns further work, the portfolio test can ask whether a stated allocation rule turns it into a usable path. The guide to reading a backtest report keeps those layers separate.

Don't infer the cash policy from the final chart. Write a sentence before the run: unused allocation earns the prior available short-term Treasury return and is reallocated only on scheduled rebalance dates. That sentence fixes the instrument, information timing and deployment rule. It also gives you something precise to challenge.

How do you test whether the cash assumption is carrying the result?

Start with one Quantery backtest to fix the thesis version, universe, dates, rebalance frequency, benchmark and the app's entry and exit behavior. Treat its naive portfolio as the equal-weight open-position result described above. That result doesn't simulate a cash sleeve.

Reconstruct the position intervals outside the app. Recreate the qualifying set at each rebalance from the saved thesis version, universe, point-in-time fundamentals and price history, then apply the app's next-trading-close entry, gate-fail, maximum-holding-period and delisting rules. With those intervals fixed, run the severe baseline first: residual cash earns zero. Then substitute the defensible short-term-rate proxy. If the intended policy stays invested through a fallback index, calculate that as a separate hybrid and name it accordingly. These backtested returns are hypothetical. They exclude trading costs.

Your external calculation must define a target allocation before it can measure unused capital. Use that definition to calculate how much time and capital sat outside qualifying companies, and inspect drawdown during those intervals. Quantery's current report doesn't provide those cash-exposure fields. Compare the app's event study, which doesn't need a cash sleeve, with each separately calculated portfolio path. If stock events remain similar while the calculated paths move, the cash rule is driving the disagreement.

Also inspect when the difference appears in those calculations. A gap concentrated in high-rate periods says the return paid on waiting mattered. A gap concentrated when qualifiers were scarce says the gate's exposure policy mattered. Those are useful findings, but neither proves that the selected companies caused the full portfolio result.

The clean conclusion is conditional: under this gate, this allocation rule and this cash convention, the hypothetical portfolio produced this path before costs. Change the convention and rerun it. A durable thesis shouldn't need idle money to be mislabeled, left at an unexplained rate, or poured into the remaining names after the fact. The rules are yours, including the rule for doing nothing.

Want to try this on your own rules? Quantery is free for 14 days: the full app, no card required.

← All articles