If a strategy goes long and short, is it best to optimize separately then together?
Or all together at once?
I would like opinions please.
TIA, Walt
opinions please: optimize long & short strategy separately?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: opinions please: optimize long & short strategy separate
I would personally optimise both sides of the strategy together. Otherwise, you can run into situations where profitable long trades were taken on bar 10, 20, and 30, but that don't show up in the combined strategy because it went short on bar 9, 19, and 29 (in the assumption that your short entries are not the exact opposite of long entries).If a strategy goes long and short, is it best to optimize separately then together?
Or all together at once?
If you're deliberating to trade either the long or short side from this particular strategy, then I personally would optimize them separately and then decide which one is best.
Re: opinions please: optimize long & short strategy separate
Thank you Josh,
I would agree to do them together but then it seems either short or long is dependent on previous trade being on the correct side.( I would think)
I have just completed doing a long opt, then a short opt (each with it's own settings) and then a combined opt.
The combined opt results are less profitable than the results of the two separate opts.
I think this indicates that the two separate strats may "overlap" (i.e. one has not exited before the other starts).
From what I understand, using the "managed" mode of trading will not allow the overlap, as it will exit the current side upon entry to the other side.
Are you aware if it is possible to adjust some settings (or code) to allow for this overlap and thus become more profitable?
I would agree to do them together but then it seems either short or long is dependent on previous trade being on the correct side.( I would think)
I have just completed doing a long opt, then a short opt (each with it's own settings) and then a combined opt.
The combined opt results are less profitable than the results of the two separate opts.
I think this indicates that the two separate strats may "overlap" (i.e. one has not exited before the other starts).
From what I understand, using the "managed" mode of trading will not allow the overlap, as it will exit the current side upon entry to the other side.
Are you aware if it is possible to adjust some settings (or code) to allow for this overlap and thus become more profitable?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: opinions please: optimize long & short strategy separate
With the `StrategyInfo.MarketPosition` property you can check the current position, and only send the order when there is no open position. In that case, managed entry orders will not close an already existing position.From what I understand, using the "managed" mode of trading will not allow the overlap, as it will exit the current side upon entry to the other side.
Are you aware if it is possible to adjust some settings (or code) to allow for this overlap and thus become more profitable?
But allowing overlap would require taking a long and short position simultaneously, which cannot be done in the same account and may not be allowed in separate accounts.
What you could try, however, is to see if you can identify situations where the long position has a higher chance of being profitable (and doing the same for shorts). When you know you have a promising long position (for example, already in a slight uptrend versus a sideways market) the strategy can be programmed to not take short trades at that point. That way the strategy can "favour" the promising trades, although the hard question is of course when do we know it's a promising trade.
Re: opinions please: optimize long & short strategy separate
Thanks for the reply, now if I only could get that crystal ball working.
Right now I'm using the portfolio trader, and adjusting the "BuyBestX" & "SellWorstY" to bias the sides based on the history of the trades and which are currently more profitable. Initial tests seem to show better returns, so I'm going down this path.
Have to say the "portfolio trader " distinguishes MC from other tools which can't handle something like this unless you get into some real heavy-duty coding...
Right now I'm using the portfolio trader, and adjusting the "BuyBestX" & "SellWorstY" to bias the sides based on the history of the trades and which are currently more profitable. Initial tests seem to show better returns, so I'm going down this path.
Have to say the "portfolio trader " distinguishes MC from other tools which can't handle something like this unless you get into some real heavy-duty coding...