The First Question in Building a Directional Trading Strategy: What Time Horizon Should You Predict?

The First Question in Building a Directional Trading Strategy: What Time Horizon Should You Predict?

The First Question in Building a Directional Trading Strategy: What Time Horizon Should You Predict?

Time to read:

15min

Most people start a directional trading strategy in the wrong place.

They ask:

What model should I use?

Should I use a transformer, XGBoost, logistic regression, random forest, LSTM, or some clever ensemble?

That is not the first question.

The first question is much more basic:

What future return should the model be trying to predict?

That question sounds simple. It is not. It is one of the practical details that can make you go in circles forever if you get it wrong.

We have seen this in real trading environments. We have built strategies at trading firms and for our own capital. A lot of wasted research does not come from bad model code. It comes from training a model on a target that was never economically sensible in the first place.

The model may be statistically interesting. It may even predict direction slightly better than random. But if the move it predicts is too small to pay for fees, spread, slippage, market impact, funding, and your own error rate, the strategy is not useful.

This post is about avoiding that trap.

It is one of those lessons people usually learn through scar tissue. We would rather just give it away.

Direction Is Not Enough

A directional strategy tries to answer a simple question:

Will this asset go up or down?

If the model thinks the asset will go up, the strategy wants to be long. If the model thinks the asset will go down, the strategy wants to be short. If the model has no strong view, the strategy should probably stay flat.

In principle, that sounds easy.

In practice, being directionally right is not enough.

Every trade has costs. You may pay an entry fee. You may pay an exit fee. You may cross the spread. You may get slipped. You may move the market. You may pay funding. You may have latency or execution quality issues. You may also be wrong more often than you want to admit.

So the real question is not:

Can we predict whether price goes up?

The real question is:

Can we predict a move large enough to be worth trading?

That is a different problem.

And it starts with the forecast horizon.

The Horizon Defines The Target

In supervised learning, the target variable defines the problem.

For a directional trading model, the raw target is usually some version of future return.

If the current time is t, the forecast horizon is h, and the asset price is P_t, then a simple forward return is:

Rt,h=Pt+hPtPtR_{t,h} = \frac{P_{t+h} - P_t}{P_t}
Rt,h=Pt+hPtPtR_{t,h} = \frac{P_{t+h} - P_t}{P_t}

Once you choose h, you have defined what the model is trying to predict.

If h = 5 minutes, the model is predicting the next five-minute return.

If h = 1 day, the model is predicting the next one-day return.

Those are not the same research problem. They may require different data, different features, different validation, different execution, and different assumptions about costs.

This is why the horizon comes first.

Before asking which features to build, you need to know what return those features are supposed to predict.

Simple Returns Versus Log Returns

You can define returns in a few ways.

The simple return is:

Rt,hsimple=Pt+hPtPtR_{t,h}^{\text{simple}} = \frac{P_{t+h} - P_t}{P_t}
Rt,hsimple=Pt+hPtPtR_{t,h}^{\text{simple}} = \frac{P_{t+h} - P_t}{P_t}

The log return is:

Rt,hlog=log(Pt+hPt)R_{t,h}^{\text{log}} = \log\left(\frac{P_{t+h}}{P_t}\right)
Rt,hlog=log(Pt+hPt)R_{t,h}^{\text{log}} = \log\left(\frac{P_{t+h}}{P_t}\right)

Simple returns are intuitive. If price moves from 100 to 105, the simple return is 5%. This maps cleanly to how most people think about trade PnL before leverage, fees, and sizing details.

Log returns are mathematically convenient. They add across time, which makes them useful for certain statistical models and longer return chains. If you are aggregating returns across adjacent periods, log returns often behave more cleanly.

For small moves, the two are almost identical. For larger moves, they diverge.

Neither is universally correct. The important thing is to choose deliberately and stay consistent. If your trading threshold is expressed in simple return terms, make sure your labels and evaluation are using the same convention, or convert carefully.

For this essay, we will use simple returns because they are easier to reason about.

A Directional Label Is Usually Too Naive

A very simple classification target might be:

yt={1if Rt,h>00if Rt,h0y_t = \begin{cases} 1 & \text{if } R_{t,h} > 0 \\ 0 & \text{if } R_{t,h} \le 0 \end{cases}
yt={1if Rt,h>00if Rt,h0y_t = \begin{cases} 1 & \text{if } R_{t,h} > 0 \\ 0 & \text{if } R_{t,h} \le 0 \end{cases}

This asks the model to predict whether the asset ends the horizon higher or lower.

The problem is that tiny positive returns are not necessarily tradable.

If the asset goes up 0.05% but your round-trip cost is 1.00%, then the model was directionally right and economically wrong. You do not get paid for being technically correct. You get paid for being right by enough.

A more useful target introduces a threshold:

yt={1if Rt,h>θ1if Rt,h<θ0if Rt,hθy_t = \begin{cases} 1 & \text{if } R_{t,h} > \theta \\ -1 & \text{if } R_{t,h} < -\theta \\ 0 & \text{if } |R_{t,h}| \le \theta \end{cases}
yt={1if Rt,h>θ1if Rt,h<θ0if Rt,hθy_t = \begin{cases} 1 & \text{if } R_{t,h} > \theta \\ -1 & \text{if } R_{t,h} < -\theta \\ 0 & \text{if } |R_{t,h}| \le \theta \end{cases}

Here, theta is the minimum move required for the trade to be interesting.

Do not think of theta as fees only. It should include your best estimate of trading costs plus a margin of safety. Fees, spread, slippage, market impact, funding, latency, and execution quality all belong in the conversation.

The goal is not to train a model to predict microscopic wiggles.

The goal is to train a model to identify moves that could matter after the real world takes its cut.

A Simple Break-Even Model

Now we can build a rough economic screen.

Assume we are trading one generic asset.

Let:

h=forecast horizonh = \text{forecast horizon}
h=forecast horizonh = \text{forecast horizon}
p=Pr(model predicts direction correctly)p = \operatorname{Pr}(\text{model predicts direction correctly})
p=Pr(model predicts direction correctly)p = \operatorname{Pr}(\text{model predicts direction correctly})
C=estimated round-trip trading costC = \text{estimated round-trip trading cost}
C=estimated round-trip trading costC = \text{estimated round-trip trading cost}

C should include entry fees, exit fees, spread, slippage, and other execution costs.

For example, suppose the total round-trip cost is 1%:

C=0.01C = 0.01
C=0.01C = 0.01

Now define the absolute move over horizon h:

Mt,h=Rt,hM_{t,h} = |R_{t,h}|
Mt,h=Rt,hM_{t,h} = |R_{t,h}|

A very simple expected value approximation is:

EV(h)(2p1)E[Mt,h]C\operatorname{EV}(h) \approx (2p - 1)E[M_{t,h}] - C
EV(h)(2p1)E[Mt,h]C\operatorname{EV}(h) \approx (2p - 1)E[M_{t,h}] - C

This is not a full PnL model. It is a first-pass sanity check.

The term 2p - 1 is the directional edge.

If p = 0.50, then:

2p1=02p - 1 = 0
2p1=02p - 1 = 0

There is no directional edge.

If p = 0.55, then:

2p1=0.102p - 1 = 0.10
2p1=0.102p - 1 = 0.10

The model has a 10% edge over random guessing in this simplified framework.

For the strategy to be attractive under this approximation, we need:

(2p1)E[Mt,h]>C(2p - 1)E[M_{t,h}] > C
(2p1)E[Mt,h]>C(2p - 1)E[M_{t,h}] > C

Solving for the required average move:

E[Mt,h]>C2p1E[M_{t,h}] > \frac{C}{2p - 1}
E[Mt,h]>C2p1E[M_{t,h}] > \frac{C}{2p - 1}

That is the key break-even condition.

It tells you how large the average move needs to be before the horizon is even worth researching under your cost and accuracy assumptions.

Example: 55% Accuracy And 1% Cost

Suppose we assume a future model might be directionally correct 55% of the time.

That is a hypothetical research assumption, not a promise and not a default expectation. In many real markets, 55% directional accuracy on a useful horizon is hard.

Let:

p=0.55p = 0.55
p=0.55p = 0.55
C=0.01C = 0.01
C=0.01C = 0.01

Then:

2p1=2(0.55)1=0.102p - 1 = 2(0.55) - 1 = 0.10
2p1=2(0.55)1=0.102p - 1 = 2(0.55) - 1 = 0.10

The required average move is:

C2p1=0.010.10=0.10\frac{C}{2p - 1} = \frac{0.01}{0.10} = 0.10
C2p1=0.010.10=0.10\frac{C}{2p - 1} = \frac{0.01}{0.10} = 0.10

So under these assumptions, the asset needs to move more than 10% on average over the chosen horizon before the strategy clears this simple break-even screen.

That is a large move.

This is the moment where many beginner strategies die, and it is better that they die here than after weeks of feature engineering.

If you are trying to predict the next five minutes, and the asset usually moves 0.20% over five minutes, a 55%-accurate model is nowhere close under 1% round-trip costs. The horizon is probably too short, the cost is too high, the required accuracy is much higher, or the strategy needs a different execution assumption.

The math is not complicated.

The discipline is.

Finding The Minimum Viable Horizon

For each candidate horizon, compute historical forward returns.

For example:

H={5m,15m,1h,4h,12h,1d,3d,7d,14d,30d}\mathcal{H}=\{5\mathrm{m},15\mathrm{m},1\mathrm{h},4\mathrm{h},12\mathrm{h},1\mathrm{d},3\mathrm{d},7\mathrm{d},14\mathrm{d},30\mathrm{d}\}
H={5m,15m,1h,4h,12h,1d,3d,7d,14d,30d}\mathcal{H}=\{5\mathrm{m},15\mathrm{m},1\mathrm{h},4\mathrm{h},12\mathrm{h},1\mathrm{d},3\mathrm{d},7\mathrm{d},14\mathrm{d},30\mathrm{d}\}

For each h in the candidate horizon set, calculate:

Rt,h=Pt+hPtPtR_{t,h}=\frac{P_{t+h}-P_t}{P_t}
Rt,h=Pt+hPtPtR_{t,h}=\frac{P_{t+h}-P_t}{P_t}

Then calculate the average absolute move:

A(h)=E[Rt,h]A(h)=\mathbb{E}[|R_{t,h}|]
A(h)=E[Rt,h]A(h)=\mathbb{E}[|R_{t,h}|]

Now choose a minimum plausible directional accuracy assumption:

p0=assumed directional accuracyp_0=\text{assumed directional accuracy}
p0=assumed directional accuracyp_0=\text{assumed directional accuracy}

Again, this is not the actual model accuracy. You have not trained the model yet. It is a research assumption used to design the target.

The minimum economically viable horizon is the shortest horizon where the average move is large enough:

hmin=minhH{h:A(h)>C2p01}h_{\min}=\min_{h\in\mathcal{H}}\left\{h:A(h)>\frac{C}{2p_0-1}\right\}
hmin=minhH{h:A(h)>C2p01}h_{\min}=\min_{h\in\mathcal{H}}\left\{h:A(h)>\frac{C}{2p_0-1}\right\}

This does not mean the strategy works.

It means the horizon is not obviously dead on arrival.

That is already valuable.

Do Not Pretend The Exact Horizon Is Sacred

The goal is not to discover that the true horizon is exactly 17 hours, 43 minutes, and 12 seconds.

Markets are noisy. Volatility clusters. Liquidity changes. Fees change. Spreads change. Market regimes change. The horizon that looked best in one sample may not be best in another.

So do not overfit the horizon.

Use the screen to identify a small plausible band:

Hcandidate={12h,24h,48h,72h}\mathcal{H}_{\mathrm{candidate}}=\{12\mathrm{h},24\mathrm{h},48\mathrm{h},72\mathrm{h}\}
Hcandidate={12h,24h,48h,72h}\mathcal{H}_{\mathrm{candidate}}=\{12\mathrm{h},24\mathrm{h},48\mathrm{h},72\mathrm{h}\}

or:

Hcandidate={3d,7d,14d}\mathcal{H}_{\mathrm{candidate}}=\{3\mathrm{d},7\mathrm{d},14\mathrm{d}\}
Hcandidate={3d,7d,14d}\mathcal{H}_{\mathrm{candidate}}=\{3\mathrm{d},7\mathrm{d},14\mathrm{d}\}

That is much better than letting the horizon float freely while you also change features, model classes, hyperparameters, thresholds, and execution rules.

When everything moves at once, you do not know what you learned.

The horizon screen narrows the target-design problem before the modeling work begins.

Average Move Is Not The Whole Story

Average absolute return is a useful starting point, but it can hide important structure.

An asset may usually move very little, then occasionally jump a lot. The average move may look attractive, but most periods may still be untradable.

So also ask:

How often does the asset move enough to matter?

Let theta be the minimum tradable move threshold.

Compute:

Q(h)=Pr(Rt,h>θ)Q(h)=\Pr\left(|R_{t,h}|>\theta\right)
Q(h)=Pr(Rt,h>θ)Q(h)=\Pr\left(|R_{t,h}|>\theta\right)

This tells you how frequently tradable moves occur.

Then compute:

B(h)=E[Rt,hRt,h>θ]B(h)=\mathbb{E}\left[|R_{t,h}|\mid |R_{t,h}|>\theta\right]
B(h)=E[Rt,hRt,h>θ]B(h)=\mathbb{E}\left[|R_{t,h}|\mid |R_{t,h}|>\theta\right]

This tells you how large the tradable moves are when they happen.

Together:

A(h)=E[Rt,h]A(h)=\mathbb{E}[|R_{t,h}|]
A(h)=E[Rt,h]A(h)=\mathbb{E}[|R_{t,h}|]
Q(h)=Pr(Rt,h>θ)Q(h)=\Pr\left(|R_{t,h}|>\theta\right)
Q(h)=Pr(Rt,h>θ)Q(h)=\Pr\left(|R_{t,h}|>\theta\right)
B(h)=E[Rt,hRt,h>θ]B(h)=\mathbb{E}\left[|R_{t,h}|\mid |R_{t,h}|>\theta\right]
B(h)=E[Rt,hRt,h>θ]B(h)=\mathbb{E}\left[|R_{t,h}|\mid |R_{t,h}|>\theta\right]

These give you three useful views:

  • How much the asset moves on average

  • How often it moves enough to matter

  • How large meaningful moves tend to be when they occur

A good candidate horizon should have enough move size, enough frequency, and some plausible reason the moves might be predictable.

Volatility alone is not edge.

Predictable volatility is where the research begins.

The Horizon Is For The Label, Not The Exit Rule

One subtle point matters a lot.

Choosing h does not mean the live strategy must always hold for exactly h.

The horizon defines the target variable for training. It says, "At time t, what happened over the next h?"

In live trading, exits can be dynamic.

If the model flips direction, the strategy can exit or reverse. If risk limits trigger, the strategy can reduce exposure. If a stop, take-profit, or state change fires, the holding period can be shorter than the original forecast horizon.

That is fine.

Do not confuse the label horizon with a mandatory holding period.

The label horizon is part of the research design. The exit rule is part of the strategy design.

They are related, but they are not the same thing.

Be Careful With Overlapping Labels

There is another practical issue that beginners often miss.

If you compute a 24-hour forward return every minute, your labels overlap heavily. The label at 10:00 and the label at 10:01 share almost the entire same future window.

That creates dependence between examples.

If you randomly split those rows into train and test sets, you can leak information across the split without realizing it. The model may appear to generalize because the test labels are highly related to training labels nearby in time.

For time-series trading research, validation needs to respect time.

Use time-based splits. Consider leaving gaps between train and test windows when labels overlap. In more advanced setups, people call this purging or embargoing. The name matters less than the principle:

Do not let the future bleed into the past.

This is another place where a strategy can look much better in a notebook than it will in reality.

The Horizon Screen Is Not A Profitability Test

This first step does not prove that a profitable strategy exists.

It only answers a narrower question:

Are the asset's moves over this horizon large enough that a predictive model could plausibly overcome costs?

That condition is necessary, not sufficient.

Even if the asset moves enough, the moves may not be predictable. A highly volatile asset is not automatically attractive. Volatility creates opportunity only if something about it can be forecasted, harvested, or managed better than the market expects.

So interpret the horizon screen as a feasibility filter.

It rules out horizons where the economics are obviously unfavorable. It helps you avoid spending weeks trying to predict tiny price changes that cannot pay for the cost of trading.

After that, the real modeling work begins.

A Practical Research Pipeline

Here is the process I would use before building features.

First, choose cost assumptions:

C=fees+spread+slippage+funding+market impact+other execution costsC=\text{fees}+\text{spread}+\text{slippage}+\text{funding}+\text{market impact}+\text{other execution costs}
C=fees+spread+slippage+funding+market impact+other execution costsC=\text{fees}+\text{spread}+\text{slippage}+\text{funding}+\text{market impact}+\text{other execution costs}

Second, choose a minimum plausible accuracy assumption:

p0=assumed directional accuracyp_0=\text{assumed directional accuracy}
p0=assumed directional accuracyp_0=\text{assumed directional accuracy}

Third, compute the required average move:

required move=C2p01\text{required move}=\frac{C}{2p_0-1}
required move=C2p01\text{required move}=\frac{C}{2p_0-1}

Fourth, scan candidate horizons and compute forward returns:

Rt,h=Pt+hPtPtR_{t,h}=\frac{P_{t+h}-P_t}{P_t}
Rt,h=Pt+hPtPtR_{t,h}=\frac{P_{t+h}-P_t}{P_t}

Fifth, estimate move size and frequency:

A(h)=E[Rt,h]A(h)=\mathbb{E}[|R_{t,h}|]
A(h)=E[Rt,h]A(h)=\mathbb{E}[|R_{t,h}|]
Q(h)=Pr(Rt,h>θ)iask,Siask,Pibid,Sibid),i=1,,nQ(h)=\Pr\left(|R_{t,h}|>\theta\right) i a s k , S i a s k , P i b i d , S i b i d ) , i = 1 , … , n
Q(h)=Pr(Rt,h>θ)iask,Siask,Pibid,Sibid),i=1,,nQ(h)=\Pr\left(|R_{t,h}|>\theta\right) i a s k , S i a s k , P i b i d , S i b i d ) , i = 1 , … , n
B(h)=E[Rt,hRt,h>θ]B(h)=\mathbb{E}\left[|R_{t,h}|\mid |R_{t,h}|>\theta\right]
B(h)=E[Rt,hRt,h>θ]B(h)=\mathbb{E}\left[|R_{t,h}|\mid |R_{t,h}|>\theta\right]

Sixth, identify the minimum viable horizon:

hmin=minhH{h:A(h)>required move}h_{\min}=\min_{h\in\mathcal{H}}\left\{h:A(h)>\text{required move}\right\}
hmin=minhH{h:A(h)>required move}h_{\min}=\min_{h\in\mathcal{H}}\left\{h:A(h)>\text{required move}\right\}

Seventh, define a small candidate horizon band around that minimum.

Eighth, generate target variables for those horizons:

yt,h={1if Rt,h>θ1if Rt,h<θ0if Rt,hθy_{t,h}= \begin{cases} 1 & \text{if } R_{t,h}>\theta \\ -1 & \text{if } R_{t,h}<-\theta \\ 0 & \text{if } |R_{t,h}|\le \theta \end{cases}
yt,h={1if Rt,h>θ1if Rt,h<θ0if Rt,hθy_{t,h}= \begin{cases} 1 & \text{if } R_{t,h}>\theta \\ -1 & \text{if } R_{t,h}<-\theta \\ 0 & \text{if } |R_{t,h}|\le \theta \end{cases}

Only after that should you move to feature engineering.

Why This Matters

The target variable is the foundation of the entire modeling process.

If the target is bad, everything built on top of it is compromised.

You can spend weeks improving features, tuning models, and running backtests, only to discover that the model is predicting a return horizon that never had enough economic room to work.

That is a painful way to learn.

A cleaner question is:

Can we predict future returns over a horizon where the asset tends to move enough for the prediction to be worth trading?

That question saves time.

It also forces the research to stay connected to trading reality. Not statistical novelty. Not model complexity. Not a beautiful notebook.

Trading reality.

This is the kind of practical research discipline that usually stays inside trading firms. We are sharing it because we want more people to build serious strategies instead of getting trapped in avoidable loops.

If our customers get better at research, everyone wins.

Conclusion

Before building a directional trading model, decide what future return the model should predict.

The forecast horizon defines the target variable. The target variable defines the modeling problem. The horizon should be chosen based on whether the asset tends to move enough over that period to overcome costs, slippage, margin of safety, and the strategy's expected miss rate.

A simple first-pass rule is:

hmin=minhH{h:E[Rt,h]>C2p01}h_{\min}=\min_{h\in\mathcal{H}}\left\{h:\mathbb{E}[|R_{t,h}|]>\frac{C}{2p_0-1}\right\}
hmin=minhH{h:E[Rt,h]>C2p01}h_{\min}=\min_{h\in\mathcal{H}}\left\{h:\mathbb{E}[|R_{t,h}|]>\frac{C}{2p_0-1}\right\}

This gives you the shortest economically viable forecast horizon under your assumptions.

From there, define a small band of candidate horizons, generate target variables, validate carefully, and then begin feature engineering.

That is the next question:

What information could plausibly help us predict this target?

Not Financial Advice

The content above is for general educational and informational purposes only. It is not financial, investment, trading, legal, tax, accounting, or other professional advice, and it is not a recommendation, offer, or solicitation to buy, sell, hold, or use any asset, strategy, protocol, venue, or financial product.

Trading and automated strategies involve substantial risk, including the possible loss of principal. Crypto assets and DeFi markets can be highly volatile, illiquid, technically complex, and subject to execution, smart contract, custody, regulatory, and counterparty risks. Past performance, backtests, simulations, or examples do not guarantee future results.

You are responsible for your own decisions. Do your own research, understand the risks, and consult qualified professional advisers before making financial, legal, tax, or trading decisions. Structure does not provide personalized investment advice and does not guarantee any strategy outcome, return, or level of performance.

Are you willing to trade comfort for growth?