"Reduce quantity based on volume" increases number of trades
Author: tomphm
Creation Date: 2/11/2016 10:17 PM
profile picture

tomphm

#1
Hi Eugene,

I am running a back-test in Raw Profit mode and when using the option to reduce a position quantity based on bar volume, the number of trades generated from the back-test is increased compare to when the option is not enable. Would you have an idea what might going on? Thanks
profile picture

Eugene

#2
Hi Tom,

Pay attention to the number of trades not included due to insufficient capital. Looks like your position sizing is too big and system skips many trades. Yes, that may affect Raw Profit too: When I run a strategy in a Raw Profit mode, a warning message tells me that some trades were dropped because of insufficient funds.

Should you have any further questions, tell us the complete story (the strategy's code, its data loading and position sizing settings, symbols traded, Wealth-Lab's Preferences that may apply etc.)
profile picture

tomphm

#3
Thanks Eugene.
profile picture

jgimene1

#4
Hello,

I am using Reduce quantity based on volume on a backtest on a basket of stocks including HPQ (huge volume) set at 1.5% with a potential trade on 5/27/2021. Volume bar that day is 24,460,000 so 1.5% would be 367,035 but the system bought 27,178 shares vs 36,166 without using Reduce quantity based on volume. All trades were taken during the backtest so it does not seem to be a lack of funds.

What am I doing wrong?
profile picture

Eugene

#5
Hello,

According to the User Guide,
QUOTE:
When using this option, the trade quantity in backtests will be the lesser of a) the "expected" position size, and, b) the specified percentage of the trade's bar volume.

While the option would reduce the size, it doesn't imply that the size would otherwise be bumped up to 1.5% of the bar's volume. So it looks like your expected position size is at play here.
profile picture

jgimene1

#6
So if the lesser of (a) the "expected" position size, and, b) the specified percentage of the trade's bar volume, should it not be the lesser (a) 36,166 shares as (b) would be 367,035 and impossible due to the size of the trading capital? Attached is a screenshot of the position size.

What do you need to help me resolve this?

Thanks.
profile picture

Cone

#7
Re: 27,178 shares vs 36,166
You're performing a Portfolio Simulation and apparently not using Position.Priority. Priority is random if you don't assign it. Therefore, I suspect the trades are changing with every one of your runs, which changes the equity and therefore the sizing.

Assign Position.Priority to get a consistent result. See the QuickRef (F11), search for Priority.
profile picture

jgimene1

#8
The trades are not changing with every run and the same dates/settings. I did check this many times before. I read quickref but it does not explain how to assign position priority.. However, since all trades are taken (none missing due to lack of capital) and all runs at the same, based on what you wrote about assign position does not seem to be the issue.
profile picture

Eugene

#9
What is the portfolio equity value on the day preceding the trade?
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).