9
$\begingroup$

Let's say we have an equity liquidity-providing model that was fitted on 1 minute bar periods. The model forecasts the 1-min next period return given the activity of the previous bars. Now, when we move to trading strategy implementation the forecasted returns can be calculated at any time, say once every second. This is what I call the continuous forecast.

Order entry seems fairly trivial: the strategy will calculate trading signals every second and possibly enter a new long or short order for each forecast, up to some maximum open orders number and/or position net exposure parameters. Open orders that were not immediately filled will have to be re-evaluated at most after, say, 30 seconds, because the forecast window expires at the 60th second after the original forecast time.

The question, or confusion, I have is about positions. How do we manage positions when we have overlapping signals? For example, let's say at $t_1$ we are filled long 100 shares, then at $t_5$ we forecast a short signal. Because we have a conflicting signal in the same window, we might decide to close the long position by entering a sell order at $t_5$. This would also match our order entry logic. But in theory the asset price could go up until $t_{60}$, that is the end of the first signal window, and then collapse from there to $t_{65}$.

In other words, we covered $t_1,...,t_5$ in virtue of the first order and $t_5,...,t_{60}$ by offsetting the initial long position with a short position, while $t_{60},...,t_{65}$ does not have any short position to match the $t_5$ signal.

The forecast has 3 main levels: hold, sell (or short) and long. The signal in the example is calculated every second to simplify, but it could be produced anytime based on trading activity.

$\endgroup$
4
  • 1
    $\begingroup$ Is the frequency of the continuous forecast always one second? Does the forecast have two states (long / short), or three states (long / short / neutral)? Does the forecast produce an expected return target or simply a long / short signal? Finally, do you know if the signals are independent (i.e. the expected returns and moments for each signal are similar regardless of the sequence of signals)? $\endgroup$ Jun 15, 2012 at 14:37
  • $\begingroup$ @QuantGuy Added extra information at the end of the question. $\endgroup$ Jun 15, 2012 at 14:43
  • $\begingroup$ Do you know if you can treat the signals as independent, or does the signals return/risk performance depend on the direction (long/short/neutral) of the prior signal? $\endgroup$ Jun 15, 2012 at 14:49
  • $\begingroup$ @QuantGuy Each signal is independent. It does not depend on prior signals. $\endgroup$ Jun 15, 2012 at 15:21

4 Answers 4

2
$\begingroup$

If you designed the model to predict direction only, I would just use the current signal. You could test whether this is correct by calculating the signals and their 5-second lags, then regress 1-minute forward returns (or 55-second fwd returns) on them both, and see if the coeff on the 5-second lagged signal is significant. If it's not significant, just trade on the current signal. If it is significant, you might want to adjust your model so the current signal takes this dependence explicitly into account.

$\endgroup$
2
  • 1
    $\begingroup$ This is a good suggestion. In fact, the general approach one should take would be to estimate the half-life of the signal and construct a properly weighted composite signal that will slowly decay towards 0 if no new signal comes. $\endgroup$ Jun 21, 2012 at 18:09
  • $\begingroup$ A paper on inventory management: arxiv.org/abs/1206.4810 $\endgroup$ Jun 22, 2012 at 16:58
2
$\begingroup$

The answer depends on the reasoning behind your forecast. Is this a mean-reversion signal? If so, perhaps the presence of a short signal shortly after a long signal indicates that the long signal was very profitable, and you should take profits immediately. Is it a momentum signal? If so, then perhaps the momentum of this stock is very choppy at the moment, and one should stay out altogether (flat position).

Also, if this is a very volatile signal, you could consider aggregating all signals over a short time frame and trading in bulk less frequently, such as every 15 or 30 seconds.

Ultimately, though, your question is an empirical question, and the only way to answer it is to backtest all possibilities.

$\endgroup$
1
  • $\begingroup$ Ideally I would like each signal to be independent, because that's how the model was developed. Also I think it makes sense to continuously aggregate positions for a liquidity providing strategy: by entering long and short orders every second the net position should revolve around flat. How about maintaining two separate long and short position targets with a time expiration? $t_{60},...t_{65}$ would have a short position target 100 as a result of the second short signal and a long position target 0. $\endgroup$ Jun 15, 2012 at 17:09
2
$\begingroup$

You could try net positions: where you continuously buy and sell depending on the signals generated. Net positions may lead to unnecessary commissions/spread nickel-and-diming your profits away. Once you have picked a direction and already have trade entry, your system should instead continue looking for new signals in the BACKGROUND. New signals while in the middle of an existing trade(cycle) are discarded until the existing tradecycle completes. This gives you much greater clarity to judge in real time whether a strategy is valid or needs to be refined.

If you switch directions constantly in a non-swing trading method or any category method; you either have a very good scalper or you have incredible foresight as to how each signal will play out. Or try reversing your trades (sell when your signal says buy, buy when your signal says sell).

Rather than backtest all possibilities, which consumes too much time with over-optimization, why not instead backtest (on tick data if possible) only to verify the validity of the trading logic, and then FORWARD test your strategy to verify it works. If you can do "walk-forward" testing, such as market replay of clean tick data, that would be even better from a visual standpoint because you get to actually see your strategy play out on a chart (or you could do it from a spreadsheet with just raw tick data).

If you do the reversing trades technique, try to incorporate cost averaging, to spread out your risk over the direction you pick. Combined this with a tiered equity take-profit approach (smaller total positions, smaller TP; larger total position, larger TP). In forex, there is an equity monitoring tool that takes profit based on total equity increases called ProfitKeeper. It's for the metatrader 4 platform, but I'm sure you could develop something similar for stocks or whatever platform you are using.

$\endgroup$
2
  • $\begingroup$ If the strategy provides liquidity and doesn't cross the spread too often, then it shouldn't incur too much cost, even when trading continuously. By waiting the end of the period, the strategy is bypassing all the opportunities that might rise during the previous signal window. $\endgroup$ Jun 17, 2012 at 15:50
  • $\begingroup$ @RobertKubrick. I found that trading a 'reverse' strategy (buying when the market is falling, selling when the market is rising) results in overall positive slippage in live trading. This is using market orders, although limit orders would accomplish the same thing. Not sure what you are referring to by bypassing opportunities; a grid needs to focus on one direction at a time in a particular instrument until profit or stop loss is reached; you cannot offer liquidity indefinetly. $\endgroup$
    – Jon Grah
    Jul 15, 2014 at 18:40
1
$\begingroup$

One solution I have been considering is to add a target position parameter with a time decay. For example, given the $t_1$ buy and $t_2$ short signals described in the question and assuming a 5 seconds signal window to simplify, we would have the following time-based target positions:

╔════════════════╦═══════╦═══════╦═══════╦═══════╦═══════╦═══════╦════╗
║      Time      ║  t1   ║  t2   ║  t3   ║  t4   ║  t5   ║  t6   ║ t7 ║
╠════════════════╬═══════╬═══════╬═══════╬═══════╬═══════╬═══════╬════╣
║ Long Pos       ║ 100   ║ 100   ║ 100   ║ 100   ║ 100   ║ 0     ║ 0  ║
║ Long Avg Price ║ 32.45 ║ 32.45 ║ 32.45 ║ 32.45 ║ 32.45 ║ NA    ║ NA ║
║ Short Pos      ║ 0     ║ 100   ║ 100   ║ 100   ║ 100   ║ 100   ║ 0  ║
║ Short Avg Pos  ║ NA    ║ 33.11 ║ 33.11 ║ 33.11 ║ 33.11 ║ 33.11 ║ NA ║
║                ║       ║       ║       ║       ║       ║       ║    ║
║ Net Target Pos ║ 100   ║ 0     ║ 0     ║ 0     ║ 0     ║ -100  ║ 0  ║
╚════════════════╩═══════╩═══════╩═══════╩═══════╩═══════╩═══════╩════╝

The strategy would then have a "view" over the next 5 seconds target position and could adjust the size of each order accordingly. At $t_2$ the strategy would enter an order to sell 100 shares to match the target position. Then at $t_6$ it would enter a new order to short 100 shares at $33.11, knowing that the forecast window will only last for 1 second though.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.