What time in the market measures
Time in the market—also called exposure time—measures the share of eligible return intervals during which a strategy holds the asset. A long-or-cash stock strategy with 60% exposure participated in roughly six out of every ten measured close-to-close intervals and sat in cash for the rest.
This sounds simple, but it answers a question that total return cannot: how often did the portfolio accept the stock’s market risk? A strategy that earned 20% while exposed 95% of the time is different from one that earned 20% while exposed 30% of the time. The second result may indicate successful timing, concentrated risk, or pure luck. The number alone cannot decide which, but it tells you where to investigate.
Exposure is not the same as trade count. One ten-year trade can create nearly 100% exposure, while dozens of one-day trades can create little. It is also not the same as average position size in a portfolio that scales positions. TickRun’s strategy engine is binary and long-only, so its position is either 0 for cash or 1 for fully invested; that makes time exposure especially direct.
A precise calculation
For a binary daily strategy, a useful session-based definition is:
time in market = invested return intervals / eligible return intervals
Imagine 101 saved closing prices. They define 100 close-to-close return intervals. If the position carried into 40 of those intervals is 1, time in the market is 40%. The first price row creates no prior close-to-close return, so counting it in the denominator can slightly distort the result.
For positions that vary between zero and one, average exposure can instead be calculated as the mean position applied to each return interval. Leveraged and short portfolios require more labels: gross exposure, net exposure, long exposure, and short exposure describe different things. A single percentage is sufficient only when the position model is simple and clearly stated.
Use the position that actually earned the return
Exposure must follow the backtest’s execution convention. TickRun calculates a daily signal at the completed close and applies the previous row’s position to the current close-to-close asset return:
strategy_return[t] = position[t−1] × asset_return[t] − cost[t]
Therefore, exposure for return interval t is position[t−1], not the newly calculated position[t]. If a buy appears on Tuesday’s close, the first interval attributed to the position is Tuesday close to Wednesday close. Counting Tuesday’s prior interval would give the strategy exposure to a move it could not have earned under this timing rule.
This alignment matters most for short holding periods. An off-by-one error can add the signal-producing return to every trade and remove the final held return. Even when the total percentage changes only slightly, the performance attributed to the exposed intervals can change substantially.
Sessions, calendar days, and capital exposure
Session exposure counts market return intervals. Calendar exposure counts elapsed days, including weekends and holidays. A position held from Friday’s close through Monday’s close represents one saved close-to-close interval but about three calendar days of economic exposure. Both measurements can be useful, but they should not be mixed.
Session exposure is natural for a daily-close backtest because returns are observed on saved market sessions. Calendar exposure may matter when financing, option decay, borrow fees, or risk limits accrue through non-trading days. TickRun’s current transaction-cost model does not accrue those daily holding costs, so session exposure is the cleaner companion to its reported results.
Capital exposure adds another dimension. A strategy that is half invested for every interval has 100% time exposure but 50% average capital exposure. For binary all-in/all-out rules, time exposure and average capital exposure have the same percentage across the sample, but strategies with variable position sizes should report both.
Why return needs exposure context
Suppose Buy & Hold returns 30% over a sample and a strategy returns 24%. It is tempting to label the strategy inferior. If it was invested only half the time and spent the remainder in zero-return cash, the result may still be interesting: it captured much of the benchmark gain with less direct market exposure.
The reverse can also happen. A strategy may nearly match Buy & Hold because it was invested 98% of the time. In that case, the signal may have done little beyond briefly moving to cash, while its transaction costs explain the remaining shortfall. Exposure makes that resemblance visible.
Do not divide total return by exposure and call the result an “exposure-adjusted return” without explaining the severe limitations. Compounded returns are path-dependent, market opportunities are not evenly distributed, and cash intervals may have different economic conditions. The ratio can be descriptive, but it is not a substitute for a risk model.
Exposure also changes the risk story
A flat position has zero stock return in TickRun’s model. More time in cash can therefore reduce measured volatility and sometimes drawdown, even when the entry signal has no special forecasting skill. This is not fake risk reduction—the portfolio really was unexposed under the model—but it changes how metrics should be interpreted.
TickRun’s Sharpe ratio uses the full daily strategy-return series, including zeros while flat when no transaction cost is charged, and assumes a zero risk-free return. Long flat stretches can lower both the mean and the sample standard deviation. The final ratio reflects the complete strategy path, not only the days it held stock. A separate conditional analysis of returns while exposed can answer a different question, but it should not replace the portfolio-level result.
Maximum drawdown also depends on timing. Cash periods can avoid a market decline, but they can also miss the recovery that follows. A strategy with lower exposure is not automatically safer if its few invested periods are concentrated in unusually volatile episodes.
The hidden assumption about cash
Time out of the market means money is somewhere. TickRun currently models flat intervals with a zero return. It does not credit interest to cash. That is a clear and simple comparison, but it can understate the result of low-exposure strategies when short-term rates are positive.
Adding a cash return is not as simple as applying today’s annual yield everywhere. A historical test needs a point-in-time rate series, a stated instrument, an accrual convention, and any delay or cost required to access it. The benchmark must use a compatible convention. Otherwise the “improvement” imports information or assumptions unavailable at the time.
The zero-cash-return assumption is most important when strategies spend long periods flat. An exposure metric tells you when this modeling choice is material. At 99% exposure it will rarely dominate; at 20% exposure it can be central.
Warm-up periods can distort the percentage
Indicators need prior observations before their first valid signal. A 200-session moving average cannot produce a fully formed value at the start of a newly loaded series. If the exposure denominator includes the entire warm-up, a slow strategy appears to choose cash even though it was not yet capable of making a decision.
Report the convention. One version can measure exposure over the full backtest, accurately describing the capital path the user received. A second diagnostic version can begin when all required indicator values are valid, describing behavior after the rule became eligible. Neither is universally correct; hiding the denominator is the real problem.
The same issue affects fair benchmark comparison. Buy & Hold is exposed from the beginning, while a strategy with a long warm-up may start much later. Comparing their total returns is still valid for the actual modeled portfolios, but it combines signal performance with an initial allocation choice.
How to inspect exposure in TickRun
TickRun currently reports return, Buy & Hold return, maximum drawdown, Sharpe ratio, win rate, and completed trades. It does not yet display a dedicated time-in-market metric. The underlying result still makes exposure visible: the position series is persistent, and the equity curve is flat before costs whenever the position applied to a return interval is zero.
For a careful manual review, inspect the buy and sell markers and count the saved session intervals between them. Remember that an open position at the end affects equity even though it does not appear as a completed trade. The correct numerator includes every interval for which the prior session’s position was invested, including intervals belonging to that open final trade.
A future explicit metric should use eligible close-to-close intervals as its denominator, count position[t−1] in the numerator, and label the result as session exposure. If warm-up-adjusted exposure is also shown, it should be a separate value rather than a silent replacement.
TickRun timing rule: signals are completed on today’s row, but today’s return uses yesterday’s position. Exposure must be counted from the same position that the backtest uses for returns.
A practical exposure review
- Record the number of eligible close-to-close intervals.
- Count intervals with an invested prior position.
- State whether the denominator includes indicator warm-up.
- Report completed trades and any open final position separately.
- Compare return, drawdown, volatility, and costs with Buy & Hold.
- Inspect whether gains came from many exposed intervals or one short episode.
- Repeat after adding plausible costs and a signal delay.
Also compare nearby parameters. A small threshold change that moves exposure from 25% to 90% has fundamentally changed the strategy, even if the headline return is similar. Parameter stability includes stability of behavior, not merely stability of final capital.
Common exposure mistakes
- Counting price rows rather than return intervals.
- Using today’s new position for today’s already-completed return.
- Calling low exposure low risk without inspecting the exposed periods.
- Ignoring the return assumption for cash.
- Confusing trade count with time invested.
- Omitting an open final position because it is not a completed trade.
- Comparing session exposure in one test with calendar exposure in another.
The practical takeaway
Time in the market is a small metric with a large explanatory role. It shows how much stock exposure produced the reported return, helps explain flat equity periods and volatility, and reveals when the treatment of cash or warm-up materially affects a comparison.
Use it beside return, drawdown, Sharpe ratio, turnover, and trade count. Do not use it to mechanically scale performance or declare a low-exposure strategy superior. Its job is to make two backtests more comparable and the strategy’s behavior more honest.
Continue with choosing a backtest benchmark, learn how to read an equity curve, or open TickRun to inspect a strategy’s positions.