Learn › Q&A › Does automated trading really work while you sleep?

Does automated trading really work while you sleep?

For US equities, mostly yes — with one clarification: the market itself sleeps too. Regular sessions run 9:30am–4:00pm ET, and most systematic strategies act at opens, closes, or intraday checkpoints inside those hours. What genuinely works while you're away: resting orders (profit targets and stops sitting at the broker as GTC orders fill the moment price touches them, no attention required) and scheduled logic that fires at the open whether or not you're awake. What doesn't exist: some 24/7 stream of stock profits. The honest pitch for automation isn't trading at 3am — it's that Monday's 9:30:00am entry happens with perfect punctuality even when you're in a meeting, asleep, or on a plane.

Automated trading does work while you sleep, with one limit that decides the rest of the answer: US stocks and ETFs only trade during the regular session, which runs 9:30am to 4:00pm ET. Nothing a strategy does at 3am changes a position, because there is no regular market to trade in. What the automation does is act at the right moment inside the session when you are not at a screen. That covers two things. The first is resting orders, such as a profit target or a stop, that sit at the broker and fill when price touches them. The second is scheduled logic that fires at the open or at a set time on the clock whether or not anyone is awake.

This page separates what runs unattended from what does not, and uses the measured data in the library to show where the unattended part matters. The window is 2021-01-04 to 2026-10-02, 5.74 years, with $10,000 of starting capital in each run. The headline runs have no fees or slippage and no margin, so every figure is a hypothetical backtest and not a record of live trading.

The session limit

The regular US session is 9:30am to 4:00pm ET. A strategy that checks its rules once a day does so at the open, at the close, or at a time in between. The engine behind these pages makes daily decisions on minute-resolution data, and orders fill on minute bars. That matches how most retail systematic rules are written: one decision per session, executed at a known point.

The practical meaning of "while you sleep" is therefore narrower than the phrase suggests. The strategy is not working through the night. The position you hold at 4:00pm stays as it is until the next session opens, and the first thing that can change it is the open at 9:30am. What happens in between is the overnight gap, the move from one day's close to the next day's open. A strategy cannot trade that gap. It can only hold through it.

Extended-hours trading exists at some brokers. The facts for the three supported brokers list extended hours as available on Alpaca, Webull and Schwab. The backtests on the library pages do not model it. They use the regular session on consolidated minute bars, so no result on this page depends on pre-market or after-hours fills.

Resting orders that fill without you

A resting order is an instruction that stays at the broker until price reaches it. A take-profit sell sits above the entry price. A stop sits below it. The broker's system watches the price, so the exit happens at the moment of the touch, including a brief spike that a person watching a chart would miss. The take-profit order page covers the mechanics from the seller's side.

For that to work overnight and across days, the order has to stay alive after the close. A day order expires at the end of the session. A good-til-canceled order does not. It stays working across sessions until it fills or is cancelled, which is why standing targets and stops are usually placed as GTC orders. A GTC target placed on Monday is live from the opening bell on Tuesday without anything re-placing it.

Four templates in the library lean on an order of this kind. The weekly 7% target buys at the first open of each week, parks a +7% profit target, and sells on Thursday afternoon if the position is under water. The dip buyer enters after a 10% drop from the 20-day high and sells at +8%. The momentum breakout enters after a +10% four-week burst and leaves through a 10% trailing stop. The trend plus trailing stop holds while price is above the 200-day average and leaves only on a 15% trailing stop. Each exit is a standing instruction at the broker. Only the entry needs a decision.

The weekly 7% target as a worked case

The weekly 7% target is the clearest example of a rule that depends on unattended orders. The entry is scheduled for the first open of the week. The profit target rests at the broker for the rest of the week. The Thursday afternoon check is a second scheduled event. Three separate moments need to happen on time, and only one of them is the entry.

Over the 59 funds tested, the median CAGR was 6.61%, the median max drawdown 26.26% and the median trade count 106 round trips. Buy-and-hold lost to it on 34 of the 59. That count is tied for the highest of any template in the library, and the median CAGR is the highest of the twelve. It also traded far more often than the trend rules, which is the reason it is hard to run by hand. A median of 106 round trips over 5.74 years is a trade roughly every few weeks, each with a target to place and a Thursday check to remember.

The median drawdown is not small. At 26.26% it sits among the deeper medians in the table, so the automation does not remove the experience of holding through a decline. It removes the need to be present for each entry and exit. Whether that matters depends on the person. A rule that trades 106 times is the kind where a missed Monday or a forgotten Thursday exit changes the result, and a scheduler does not miss them.

The 3-month momentum rule sits at the other end. It had a median of 12 round trips and a median CAGR of 0%, and it beat buy-and-hold on 20 of the 59 funds. It checks a trailing return once a day and rarely acts. Automation helps it very little, since there is almost nothing to catch.

Scheduled logic at the open

The second kind of unattended work is a rule that fires on a schedule. A strategy that buys the first session of the month and sells the last needs to act at the open on a specific date. The monthly cycle does exactly that. Across the 59 funds it posted a median CAGR of 5.46%, a median max drawdown of 36.63% and 69 round trips. It came out ahead of buy-and-hold on 14 funds, the fewest of the twelve templates.

That result matters for this question. A scheduler can execute a calendar rule with perfect punctuality, and the monthly cycle still trailed buy-and-hold on most funds. Punctuality is a property of the machinery. Whether the rule has an edge is a property of the rule. The two are separate, and the trading bots page makes the same point from the other direction: a bot applies instructions exactly, and the instructions decide the outcome.

The RSI(2) snapback is a scheduled rule of a different kind. It looks at a 2-day RSI under 10 and exits when it recovers above 70. Median round trips were 166, median CAGR 4.74%, and median max drawdown 17.47%, the shallowest of the twelve. It won against buy-and-hold on 34 funds, level with the weekly 7% target. With 166 round trips over 5.74 years, the signals arrive often enough that a person checking by hand would soon stop doing it.

The golden cross is the opposite. Its median was 3 round trips, and its median CAGR was 2.05%. A rule that trades three times in five years does not need a machine to execute it. It needs one to watch for the cross every session without missing it, which is a smaller job.

What the market did overnight

Holding through the night is where the exposure sits, so the overnight data is the relevant measurement. The library splits each fund's return into the part earned from close to next open and the part earned from open to close.

On SPY, the log return from overnight moves was 49.65% and the log return from intraday moves was 29.84%. Overnight accounted for 62.46% of the total and intraday for 37.54%. QQQ was similar: 58.29% overnight and 31.89% intraday, a split of 64.64% to 35.36%. In both funds, most of the gain over this window came while the market was closed. A strategy that only held positions during the session would have missed the larger share.

TLT shows how uneven this can be. Its overnight log return was -70.11% and its intraday log return was 18.78%. The fund lost across the window overall, with a CAGR of -8.64% and a max drawdown of 44.06%, and the loss arrived in the overnight gaps. IWM had an overnight share of 165.24% and an intraday share of -65.24%, which means its open-to-close moves were negative in total while the overnight moves carried the whole gain. Its CAGR was 8.03%.

These splits describe one window and six years of data, and a different window can give a different split. They do show that the overnight position is not a side effect of trading. For many funds it is most of the return and most of the risk, and a strategy that is long at the close is exposed to it whether or not the owner is awake.

Gap size differs by fund. SPY opened an average of 0.44% away from the prior close, with a daily high-to-low range averaging 1.15%. For QQQ the pair was 0.59% and 1.58%. TQQQ averaged 1.78% overnight and 4.74% intraday, and UVXY 2.53% and 7.03%. A resting stop does not help with a gap. If a fund opens below the stop level, the order becomes live at the open and fills at the price then available, which can be below the level that was set.

Funds where unattended orders matter more

The more volatile the fund, the more a resting order does. TQQQ ran at 67.11% annualized volatility with a 4.74% average intraday range. Its worst drawdown was 81.68%, from 2021-11-19 to 2022-12-28. It returned 291.92% over the window with a CAGR of 26.86%. A 7% target on a fund that swings 4.74% in a typical session can be touched in a single day, and a person who is away at that moment does not get the fill.

UVXY sits at the far end. Annualized volatility ran 103.95% and its max drawdown was 99.95%, from 2021-01-29 to 2026-09-22, with no recovery in the window. Total return was -99.94%. The average intraday range of 7.03% means a profit target can fill within hours of an entry. A rule on this fund gets its fills from resting orders, and it also shows that a fast fill is not the same as a profitable strategy.

For calmer funds the case is weaker. SPY had a volatility of 16.41%, and QQQ had 22.39%. Their max drawdowns were 24.51% and 35% respectively, and both recovered by December 2023. A rule on either fund can be checked once a day without losing much, because a typical session moves about 1% to 1.6% from high to low.

The drawdown figures also address the sleep question from another side. SPY's longest drawdown ran 488 sessions and QQQ's ran 516. A strategy that holds through those periods does so with or without supervision. Automation does not shorten a drawdown. It only applies the rules through one at the speed the rules were written for.

How the three brokers handle resting orders

Whether a resting order can exist depends on what the broker's API accepts. The facts list the following for the three supported brokers.

GTC appears on all three lists, so a standing target or stop can rest at any of them. A trailing stop held at the broker is available on Alpaca and Schwab, and Webull does not list one. A rule that needs a fill at the close can use the on-close choices on Alpaca and Schwab.

DeployQuant paper trading needs no broker account. The strategy runs on the live market data feed and fills are simulated, so a rule can run for a while with no money at risk. That is the practical route on Webull and Schwab, where the broker offers no paper account.

What an unattended strategy still needs

A strategy left alone still needs something between it and the broker to catch a bad order. The product reference describes these checks.

Each strategy has its own sleeve with separate cash, positions and P&L, and every order is tested against that sleeve's cash before it goes out. A broker connection carries trade and read permissions. It cannot move money out. These controls protect execution. They say nothing about whether a strategy is any good, so the backtest and its drawdown still need reading before deployment.

The weekly 7% target shows why. A strategy with a 26.26% median drawdown will go through stretches where it is down by about a quarter, and the owner is awake for them. Unattended execution handles the clicking. Whether to keep a strategy running through a decline stays with the owner.

Where this test stops

Everything here comes from a single 5.74-year window that opens in January 2021. It contains the 2022 decline and the recovery after it, and it is one path through the market. The headline runs charge no fees and no slippage. Cost runs at 5 and 10 basis points sit on each strategy page. Orders fill on minute bars, and a live resting order may fill at another price than a simulated one, most of all across a gap.

The backtests do not measure operational reliability: a broker API outage, a missed schedule, a rejected order. They show what the rules would have done had every order been placed and filled as modeled. The figures describe how the rules behaved in that window. Nothing here is investment advice, and live trading carries risk of loss.

Frequently asked questions

Does automated trading really run while I am asleep?

It runs inside the regular session, 9:30am to 4:00pm ET. Resting orders such as GTC profit targets and stops fill whenever price touches them, and scheduled logic fires at the open without anyone present. Nothing trades US stocks in the middle of the night, so a position at the close stays put until the next open.

What is a GTC order and why does it matter for unattended trading?

A good-til-canceled order stays working at the broker across sessions until it fills or is cancelled. A day order expires at the close. A standing target or stop placed as GTC is live from the next opening bell without being re-placed. The [GTC order](/learn/glossary/gtc-order/) page has the definition.

Which strategy templates depend most on orders that run unattended?

The weekly 7% target, the dip buyer, the momentum breakout and the trend plus trailing stop all rely on a standing exit. Of the four, the weekly 7% target trades most, at a median of 106 round trips across 59 funds, so it is the hardest to run by hand. Its median CAGR was 6.61% and its median max drawdown 26.26%.

Does a stop order protect me from an overnight gap?

A resting stop cannot trade while the market is closed. If a fund opens below the stop level, the order becomes live at the open and fills at the price then available. TQQQ's average overnight gap was 1.78% and SPY's was 0.44%, so the gap risk is larger on volatile funds.

Does it matter which broker I use for unattended trading?

All three supported brokers list GTC orders. Trailing stops appear on the Alpaca and Schwab lists and not on Webull's. Only Alpaca offers a paper environment, so on Webull and Schwab the DeployQuant paper mode is the place to test a rule first. See [Alpaca](/learn/brokers/alpaca/), [Webull](/learn/brokers/webull/) and [Schwab](/learn/brokers/schwab/).

Can an automated strategy lose money while I am away?

Yes. Automation applies the rules on time and does not change what the rules earn. TQQQ's max drawdown in this window was 81.68%, and the monthly cycle beat buy-and-hold on only 14 of 59 funds. The [trading bots](/learn/answers/do-trading-bots-actually-work/) page covers what bots do and do not deliver.

What safeguards exist when no one is watching a live strategy?

Live deployments need a typed confirmation before real money moves. Price bands, per-order and per-position dollar caps, a dry-run mode and pause switches for one strategy or a whole connection sit between the strategy and the broker. Connections hold trade and read permissions and cannot withdraw money.

Run your first strategy yourself, free →

Build it from blocks (or type it in English), backtest it on 5.7 years of minute data in seconds, tweak any parameter, then paper trade it on live data. No card, no broker needed to start.

Terms used here

GTC (Good-Til-Canceled) OrderdefinitionTake-Profit Orderdefinition

Related questions

Do trading bots actually work?answered

Backtests are hypothetical, computed by DeployQuant's engine on minute-resolution consolidated US market data (2021-01-04 to 2026-10-02, $10,000 starting capital, no margin, no fees or slippage in the headline run; buy-and-hold puts 98% of the account in at the first open, as the templates do) and do not guarantee future results. Nothing on this page is investment advice. Live trading involves risk of loss.