- ago
I am developing an advanced futures trading strategy where position reversals are common (e.g., flipping from a short position of -5 contracts to a long position of +4 contracts).

In my live trading execution via the API, I handle this efficiently by sending a single netting order to the broker (e.g., a single BUY 9 order). This is the industry-standard method as it minimizes slippage and legging risk.

However, in the WealthLab 8 backtesting environment, I have found that I must simulate this reversal as two separate Transaction objects:

A Cover transaction for 5 contracts to flatten the short position.

A Buy transaction for 4 contracts to open the new long position.

While this works for P&L accounting, it does not accurately model the superior execution of a single netting order. It incorrectly doubles the simulated commission charges (if using a per-ticket fee) and doesn't reflect the true fill dynamics.

My question is:

Is there a feature or a recommended "best practice" in WealthLab 8 to simulate a position reversal using a single, net-delta Transaction object, similar to how it would be executed by a live broker?

For example, is there a way to tell the backtest engine, "I am currently short 5 contracts; execute a single BUY order for 9 contracts," and have it correctly interpret this as a cover of 5 and a new buy of 4?

This functionality would be a significant enhancement for creating more realistic simulations of professional futures execution logic.

Thank you for your time and guidance.

0
102
0 Replies

Reply

Bookmark

Sort
Currently there are no replies yet. Please check back later.