VALYNOX
VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Backtesting and validation

Time in market in a backtest: what the exposure percent tells you

Time in market is the share of bars on which a strategy held a position. Read every backtest return next to it: the same profit means something different at 10 percent exposure and at 90 percent, and a strategy that is almost always in must be judged against simply holding the contract.

By · Published · updated · Editorial policy

Contents
  1. What does time in market tell you about a backtested strategy?
  2. How is time in market calculated?
  3. How low is low exposure?
  4. How do you measure return per unit of exposure?
  5. How does exposure compare with buy and hold?
  6. Why do low-exposure strategies show a high Sharpe?
  7. What should you check before trusting an exposure figure?
  8. Frequently asked questions
  9. References

What does time in market tell you about a backtested strategy?

The time in market backtest figure, often labelled exposure, is the share of bars on which the strategy held a position, long or short. It tells you how much of the result came from being exposed to the market and how much from picking moments. Read every return next to its exposure.

Time in market is the number of bars with an open position divided by the number of bars in the test period, written as a percent. Strategy exposure is the same number under a different name. A bar is one row of price data, for example one day or one 30-minute period. Two fishermen come home with ten fish each. One sat on the lake all day; the other fished for one hour. The catch is the same, but the two fishermen are not equal, and you would not plan tomorrow the same way for both.

A backtest replays a rule on old prices with costs included, so that you can see what the rule would have done; what backtesting in trading means explains the setup. The report then gives you a net profit. That net profit has two possible sources. One is the market moving in the direction you were positioned while you held a position at almost all times. The other is the rule choosing specific moments and standing aside the rest of the time. A strategy that is in the market 95 percent of the time on a rising index future earns much of its result from the rise itself. A strategy that is in the market 10 percent of the time cannot, and its result depends on the moments it picked. The percent time in market is the number that separates the two cases before you look at anything else.

A hypothetical timeline of 20 bars: 3 bars long and 3 bars short hold a position and 14 bars are flat, so time in market is 6 divided by 20, or 30 percent Time in market: 30% Hypothetical 20-bar test Long Short Flat 6 held ÷ 20 bars = 30% Exposure counts bars, not profit. So: read it next to the return.
Exposure counts the bars with a position, long or short, against the whole timeline. It says nothing about how much those bars earned.

How is time in market calculated?

Divide the number of bars with an open position by the total number of bars in the test period, count long and short positions the same, and multiply by 100. The calculation is simple, so the mistakes come from the two counts rather than from the division.

  1. Count the bars with an open position. Walk through the trade list. For each trade, count the bars from the entry bar to the exit bar. Long and short bars both count as exposure; a short position carries market risk just as a long one does.
  2. Count the total bars in the test period. Use the same bar series the backtest ran on, from the first bar it could trade to the last.
  3. Divide and multiply by 100. The result is the percent time in market.

Two details change the answer. The first is the session. A day-session strategy counted against full-session bars, which include the night session, shows a much lower exposure than the same strategy counted against day-session bars only, because every night bar is a flat bar it never had a chance to trade. The second is the convention for the entry and exit bars. Some reports count the bar on which a trade was opened, some count the bar on which it was closed, and some count both. For positions held many bars this changes little; for one-bar or two-bar holds it can change the percent by a lot. On intraday data you can also count minutes instead of bars, which removes the second problem but not the first.

Hypothetical example

A day-session strategy holds positions on 1,500 bars. The day-session test period has 5,000 bars, so time in market is 1,500 ÷ 5,000 = 30 percent. If the same trades are counted against a full-session series of 10,000 bars, the figure becomes 1,500 ÷ 10,000 = 15 percent. The trades did not change; only the denominator did.

Three steps to time in market: one and a half thousand bars with a position, five thousand bars in the day-session test, divided and multiplied by 100 gives 30 percent; counted against ten thousand full-session bars the same trades give 15 percent Same trades, 30% or 15% It depends on the bars counted Held bars 1.5k Test bars 5k Percent 30% Full session: 1.5k ÷ 10k = 15% Same trades, half the percent. So: check the bar series first.
The three steps from a trade list to a percent. The session you count against decides the denominator, so the same trades can show 30 or 15 percent.

Before you compare exposure figures from two programs, confirm that both count against the same bar series and use the same entry-bar convention. The six checks before you pay for backtesting software include reading how a report defines its numbers, and exposure is one of the numbers where definitions differ most.

How low is low exposure?

Below about 20 percent is low exposure, 20 to 60 percent is selective, 60 to 80 percent is mostly in, and above 80 percent is close to always-in. These bands are working conventions among systematic traders, not exchange rules, and each band changes which other numbers in the report you should trust first.

Exposure bandWhat it usually isMain check
Below 20 percentEvent or pattern strategy: trades a specific setup, flat the rest of the timeTrade count, and the Sharpe ratio recalculated for flat days (next sections)
20 to 60 percentSelective trend or swing strategyCost per trade against the average trade
60 to 80 percentMostly-in trend following with some flat periodsDrawdown against buy and hold over the same dates
Above 80 percentClose to always-in; flips between long and shortCompare with buy and hold directly
Four exposure bands: below 20 percent is an event strategy, check trade count and Sharpe; 20 to 60 percent is selective, check cost per trade; 60 to 80 percent is mostly in, check drawdown against buy and hold; above 80 percent is always in, compare with buy and hold Each band has a first check Time in market, read before profit Band Usually Check first Below 20% Event Trades, Sharpe 20–60% Selective Cost per trade 60–80% Mostly in Drawdown vs hold Above 80% Always in Buy and hold
Four exposure bands and the first check each one calls for. The band decides which other number in the report to read first.

Low exposure and few trades go together. A strategy that is in the market one bar in ten, and holds for several bars each time, can produce only a small number of trades per year. A small trade count is the condition under which a search over many rule variants most easily finds one that looks good by chance; Bailey, Borwein, López de Prado and Zhu (2014) show that the history needed to separate the best of many candidates from luck grows with the number of candidates tried. The practical consequence: a low-exposure strategy needs a longer history, or a design that produces more trades, before its result means anything.

Hypothetical example

Ten years of daily bars is roughly 2,500 bars. A strategy with 10 percent time in market holds positions on about 250 of them. If the average hold is five bars, that is about 50 trades in ten years, or five per year. Fifty trades is a hint, not a result. The same ten years give a strategy with 70 percent exposure and the same five-bar hold about 350 trades, which is enough to read a per-trade figure with some confidence.

How do you measure return per unit of exposure?

Divide net profit after costs by the fraction of time in market, and read the result as a measure of how efficiently the strategy used the time it was exposed, never as a forecast of what a higher exposure would earn. Return per unit of exposure is the net profit the strategy would show if its exposure were scaled to 100 percent with the same efficiency, and the point of the number is comparison between strategies, not prediction.

Hypothetical example

Strategy A and Strategy B both show a net profit of $30,000 after costs over the same ten years on the same contract. Strategy A was in the market 25 percent of the time, Strategy B 75 percent. Return per unit of exposure is $30,000 ÷ 0.25 = $120,000 for A and $30,000 ÷ 0.75 = $40,000 for B. Strategy A extracted three times as much from each bar it held. It also left the account free for three quarters of the period, which matters when you combine strategies.

Two hypothetical strategies each net thirty thousand dollars; A was in the market 25 percent of the time and B 75 percent, so net profit divided by exposure is one hundred twenty thousand dollars for A and forty thousand dollars for B, a diagnostic rather than a forecast Same profit, less exposure Hypothetical, $30k net each Exposure Net Net ÷ exposure A: 25% $30k $120k B: 75% $30k $40k A earned 3× more per bar held. So: use it to compare, not forecast.
Equal net profit, unequal exposure. The ratio shows which strategy used its time in the market more efficiently; it does not say what Strategy A would earn if it traded more often.

The reason the ratio is not a forecast is that a selective strategy's edge lives in the moments it picks. Making it trade more often means trading moments it did not pick, where there is no reason to expect the same efficiency. The same division applied to maximum drawdown is a useful second reading: a drawdown of a given size at 25 percent exposure is a harsher figure than the same drawdown at 75 percent, because the loss was taken in a quarter of the time. Use both ratios side by side when two candidates have similar net profit, and let the exposure band from the previous section tell you which other checks come next.

How does exposure compare with buy and hold?

A strategy at about 90 percent exposure on an index future has to be judged against simply holding one contract over the same dates, because both carry nearly the same market exposure and much of the strategy's result may be the market's own drift. Buy and hold is the result of entering one position on the first day of the test and holding it, including roll costs, to the last day. It is the natural benchmark for any strategy that is rarely flat.

The run below is the example. AlphaPrime (Valynox) tested a rule on ES daily bars from 2019-01-02 to 2025-06-30, long and short, one contract, with $20 commission and $25 slippage charged on every trade. The rule is a stand-in: a Candlesticks rule built from standard indicators serves as the only entry and exit, with no stop, no target and no filter, so the run shows how an exposure figure is read, not how a time-in-market rule performs. The candidate shown is the one the search kept out of 1,024 it tried, chosen for its return against its drawdown, and choosing the kept one after the fact flatters it.

Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.

NumberResult
Net profit (closed trades)$129,630
Max drawdown$59,010
Trades56
Win rate57.14%
Profit factor2.022
Average trade$2,314.82
Time in market93.48%
Hypothetical return per unit of exposure: buy and hold 20 percent at 100 percent exposure gives 0.20, Strategy A 12 percent at 30 percent gives 0.40, Strategy B 10 percent at 90 percent gives 0.11, below buy and hold Return per unit of exposure Return ÷ exposure, hypothetical Buy & hold 20 ÷ 100 0.20 Strategy A 12 ÷ 30 0.40 Strategy B 10 ÷ 90 0.11 A beats holding; B trails it. So: divide return by exposure.
Find the Time in market line in the summary and read it next to the trade count and the drawdown before you read the net profit. ES · daily · 2019-01-02 to 2025-06-30 · CPU engine backtest

The time in market of 93.48% puts this candidate in the always-in band. With 56 trades over six and a half years, the rule held each position for weeks on average and was flat only in short gaps between an exit and the next entry. The S&P 500 finished these dates well above where it started, so a rule that was long for much of the period benefited from the index's rise, and the net profit of $129,630 cannot be credited to the rule until that is separated out. This is not money the rule earned by itself, and it is not a result a reader should expect from it. The Time in market line sits in the summary of AlphaPrime's Performance Report next to net profit, drawdown and trade count, and the long and short analysis in the same report shows how much of the result came from each side, which is the first split to make for an always-in rule.

Two schematic timelines over the same ES dates: buy and hold is long 100 percent of the time, the tested rule is in the market 93 percent of the time with alternating long and short segments and short flat gaps, so they share the market drift but differ in direction and drawdown path Almost the same exposure Same ES dates, schematic segments Buy and hold: 100% Tested rule: 93% Long Short Flat Same drift, different path. So: compare with buy and hold.
Buy and hold at 100 percent exposure and the tested rule at 93 percent share almost the same market exposure. What differs is direction, the flat gaps and the path of the drawdown.
AspectBuy and hold one contractTested rule at 93.48% exposure
Market driftFully captured, long onlyCaptured while long, worked against while short
Overnight gapsCarried every nightCarried almost every night
Direction changesNone56 trades, alternating long and short
Flat periodsNoneAbout 6.5 percent of bars
Drawdown pathThe index's own falls, in full$59,010 at its worst, on a different path

To make the comparison, take the ES close on the first and last dates of the test from your own data, multiply the point difference by the contract's point value, subtract one commission and slippage for each roll, and set the result next to the strategy's net profit; the free futures contract calculator gives the point value and the profit or loss of the position. Then compare the two maximum drawdowns and their dates. An always-in rule earns its place only if it shows a clearly better return for its drawdown than holding, or a drawdown on a different schedule, after the long and short sides have been read separately.

Why do low-exposure strategies show a high Sharpe?

Flat days enter the return series as zero-return days, which shrink the measured volatility without adding profit, so the Sharpe ratio of a strategy that is in the market one day in ten describes a smoothness the account never experiences on the days it holds risk. The Sharpe ratio is the average return of a series divided by its volatility, where volatility is the standard deviation of the returns, a measure of how far single returns typically sit from the average. Only one formula is needed:

Sharpe = average return ÷ volatility

Here average return is the mean of the daily returns over the test (the interest earned on cash is left out for simplicity), and volatility is their standard deviation, usually scaled to a year. When nine days in ten are flat, nine of every ten returns are exactly zero. The average return falls, because the zeros add nothing to it. The volatility falls more, because the zeros sit close to the average and pull the standard deviation down by roughly the square root of the exposure. The volatility figure in the report therefore describes the whole year, flat days included, and understates the volatility you carry on the days a position is open by that same square-root factor.

Hypothetical example

A strategy is in the market 10 percent of the time. On the days it holds a position, its daily returns have a standard deviation of 2 percent. Over the full series, with flat days counted as zeros, the measured daily standard deviation is about 2 × √0.10 ≈ 0.63 percent. Suppose the strategy returned 8 percent in a year. Annualized volatility over the full series is about 0.63 × √252 ≈ 10 percent, so the reported Sharpe is 8 ÷ 10 = 0.8. Annualize the in-market volatility instead, 2 × √252 ≈ 32 percent, and the same 8 percent return gives 8 ÷ 32 = 0.25. The reported figure is not a wrong calculation; it is the smoothness of an account that is in cash nine days in ten.

A hypothetical strategy with 10 percent time in market: nine of ten days return zero and one day holds a position; Sharpe equals average return divided by volatility, so counted over all days the Sharpe is 0.8 but measured with in-market volatility it is 0.25 Flat days flatter the Sharpe Hypothetical, 10% time in market 000000000 Sharpe = average ÷ volatility All days 0.8 Held days 0.25 Zeros shrink volatility, not risk. So: recompute on held days only.
Flat days add zeros to the return series. The zeros shrink the volatility in the denominator, so the reported figure describes a calm that exists only because the strategy was in cash.

Two further effects push in the same direction. A series that is mostly zeros with a few large values is far from the bell-shaped distribution the standard Sharpe calculation assumes; Lo (2002) shows that the statistical reliability of a Sharpe estimate depends on the properties of the return series, and Bailey and López de Prado (2014) adjust the ratio for exactly this kind of non-normality and for the number of candidates that were tried before one was kept. Few trades also mean a Sharpe estimate that swings widely from sample to sample, and a search keeps the upward swings, which is the mechanism described in why the best backtest is usually inflated. The practical check is simple: run the daily returns through the free Sharpe ratio calculator twice, once with the flat days included and once with only the days a position was open, and compare the two volatility figures. If the second is about three times the first, your exposure is near 10 percent, and the reported Sharpe should be read for an account that holds cash most of the year.

What should you check before trusting an exposure figure?

Confirm the session and bar count behind the percent, compare the same exposure across the in-sample and out-of-sample periods, and check how a low-exposure strategy behaves when it is combined with others, because its flat periods are where another strategy's drawdown may land. The three checks take a few minutes each and catch the three most common misreadings of a time in market figure.

  1. Session and bar count. Write down which bar series the percent was counted against (day session or full session) and whether entry and exit bars count. If the report does not say, recompute the percent from the trade list using the steps in the second section, and use your own number from then on.
  2. In-sample against out-of-sample exposure. A rule that was in the market 30 percent of the time while it was being tuned and 8 percent of the time afterwards has stopped firing. Either the market condition it describes went away, or the rule was fitted to a pattern specific to the tuning period. Both are reasons to stop before reading the out-of-sample profit at all. A large rise in exposure out of sample is the same signal in the other direction.
  3. Portfolio exposure. Two strategies with 30 and 40 percent exposure each do not give a portfolio with 70 percent exposure. Where their positions overlap, the account carries both risks at once; where they do not, one strategy's flat period is where the other's losses may fall. Read the exposure of the combined position timeline, not the sum of the two percents.
Hypothetical timelines: Strategy A is in the market 30 percent of the time and Strategy B 40 percent; combined, the account holds any position 55 percent of the time and both positions at once 15 percent of the time 30% + 40% is not 70% Hypothetical two-strategy account A: 30% B: 40% Any: 55% Both: 15% Both hold risk on 15% of days. So: check overlap, not the sum.
Portfolio exposure is read on the combined timeline. The days both strategies hold risk are where their drawdowns can add up.

The third check is why exposure matters most when you move from one strategy to several. The drawdown that counts is the one of the combined equity curve, which a portfolio backtest and its combined drawdown explains in detail, and a low-exposure strategy contributes to that curve only on the days it holds a position. Two strategies that are each flat most of the time and rarely in the market together smooth each other; two that fire on the same days add their drawdowns. The free portfolio backtest tool shows the combined drawdown for a set of futures and ETFs held together, which is the fastest way to see whether overlap is small or large.

The next step is one number from your own report. Open the backtest you trust most, find its time in market, and write down the band it falls in before you look at the net profit again. If it is above 80 percent, compute buy and hold over the same dates and set the two results side by side. If it is below 20 percent, recompute the volatility on the days a position was open and read the Sharpe ratio against that figure.

Frequently asked questions

What is a good time in market percentage for a trading strategy?

There is no single good value, because exposure describes the type of strategy rather than its quality. Below about 20 percent usually means an event or pattern strategy with few trades; above 80 percent means a strategy that is nearly always in and must be compared with buy and hold. Judge the percent together with the trade count, the return per unit of exposure and the drawdown, not on its own.

How is time in market calculated in a backtest?

Count the bars on which the strategy held a position, long or short, divide by the total number of bars in the test period and multiply by 100. The result depends on which bar series you count against: a day-session strategy counted against full-session bars shows a lower percent because the night bars are all flat. Check that two reports use the same bar series before comparing their exposure figures.

Does low exposure make a Sharpe ratio misleading?

It makes the Sharpe ratio describe the whole account rather than the trades. Flat days enter the return series as zeros, which lower the measured volatility by roughly the square root of the exposure, so the volatility you carry on the days a position is open is much larger than the reported figure. The series is also far from bell-shaped and the trade count is small, so the estimate itself is less reliable than the same figure from an always-in strategy.

Should I compare my strategy with buy and hold?

Yes, whenever exposure is high. A strategy that is in the market 90 percent of the time on an index future shares almost all of its market exposure with simply holding one contract, so much of its result may be the index's own drift. Compute the buy-and-hold result over the same dates, including roll costs, compare the two maximum drawdowns and their dates, and read the long and short trades separately.

Does a short position count as time in market?

Yes. A short position carries market risk just as a long one does, so bars with an open short count as exposure. A strategy that flips between long and short with short flat gaps can show exposure above 90 percent even though its direction changes many times, which is why such a strategy is read against buy and hold rather than as a low-risk selective strategy.

References

  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
  • Bailey, D. H., & López de Prado, M. (2014). The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality. The Journal of Portfolio Management, 40(5), 94–107.
  • Lo, A. W. (2002). The Statistics of Sharpe Ratios. Financial Analysts Journal, 58(4), 36–52.