Trades Rejected when using 100% equity
Author: jreality
Creation Date: 10/31/2010 1:16 PM
profile picture

jreality

#1
In my backtesting, I'm finding that often trades are rejected for no valid reason.

Using the code below, if I test this very simple strategy on SPY with a Monthly timeframe, with Position Size set to 100% equity, with 1 to 1 margin, it rejects the 2nd trade (entry date of 11/30/98), which is 3 months after the first trade was exited at a profit, and rejects 3 other trades after that. I don't see any valid reason why any of the trades should be rejected.

I'm NOT using a "round lots" setting, and NOT enabling "slippage".

I believe there is a bug in WealthLab itself, where it sometimes tries to set the number of shares for a trade to an amount that would result in a greater amount of capital than in the account.

I've seen situations happen before, where I would set my Position size to 50% of equity, and no trades would be rejected, but I would notice that WealthLab would set the number of shares for a trade to an amount that results in slightly greater than half the initial capital being taken on the 1st trade rather than slightly less than half the capital. In that case, even the 1st trade would be rejected by WealthLab when using 100% equity setting. (and "round lots" and "Slippage" were NOT enabled).

I'm not using PosSizer. I'm simply using 100% Equity with a 1 to 1 margin. Starting Capital is $200,000.

Please fix this bug in WealthLab. I'm running version 6.0.55.0

Thanks,

J.

CODE:
Please log in to see this code.
profile picture

Eugene

#2
No valid reason? Using 100% equity is a perfectly valid reason, documented in the User Guide, Strategy Window > Backtesting Strategies > 100% of Equity Sizing.

Among the workarounds is using this PosSizer: Position Options > "Skipped trade solution"

P.S. Use the CODE tags when posting code, please. It's as easy as selecting the code just pasted and clicking the "CODE" button:

profile picture

jreality

#3
Thanks for the reply. I read that section, and I think that WealthLab is being too strict by dropping a trade altogether, rather than just reducing the number of shares being bought. However, I appreciate that there is the PosSizer solution that you just brought to my attention.

Thanks,

J.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).