Only quantity 1 for every trade in combination strategy
Author: llhk
Creation Date: 4/18/2012 5:33 AM
profile picture

llhk

#1
I wonder if there is any problem with the combination strategy feature, as I have two strategies they both run without any problem but when putting them together into the combination strategy, the entry and exit price of the trades are same as the individual strategy does but the quantity all becomes "1", that distorts the results as the trading cost made almost all trade lost.

But not all strategies work abnormally in combination mode. I just guess if my code has priority set or enter the trade at limit but not at market, however, all tries are no help.
profile picture

Eugene

#2
Known issues are listed here, and none of them sounds like yours:

Open Issues > Combination Strategies

So, how is your Combo Strategy is configured? If you give us the details, we might be able to reproduce and explain.
profile picture

llhk

#3
My settings are following:
Strategy 1: 50% Equity, Daily, Position Size: 3% equity, using dataset S&P 500, Priority = 1
Strategy 2: 50% Equity, Daily, Position Size: Position Options (5% equity, max position: 40, max daily position: 12, reject alerts less than 3), using dataset S&P 1000, Priority = 2
initial capital $1000000


profile picture

Eugene

#4
As there's two different settings, the usual "Starting Capital" (which has no effect in Combo Strategies) and "Starting Equity", I wonder if it's left at $100,000 by default? Please double check, as there's no such input as "initial capital". So, the first system can hold as much as 33 positions; the other one is capped at 40 - that allows up to 70+ simultaneously held positions. Anyway, with the equity being $100,000 (rather than $1,000,000) it still leaves a sufficient portion of capital for taking a round lot in many trades. So that's hardly the reason.

As I'm having trouble finding the culrpit, we need more information - like a screenshot from the Trades tab and as much other relevant details you can collect.
profile picture

llhk

#5
Thank for your information, the amount I changed is the starting equity.

What you have mentioned giving me some ideas, and I have using the problem strategy alone in combination strategy with the same settings of trades' position as this strategy does in the normal strategy testing. However, once running this strategy in the combination mode (I set 100% of starting equity as this is the only one strategy), it will give all trades quantity 1, but it doesn't in normal strategy testing.

I found one strategy got similar behaviour as mine, you can try "Active Trader 2009-01 | Double-RePo system" in Chart Patterns category, it also generate 1-share size trades in combination instead of normal mode in the dataset S&P 1000, from 2011/1/1 till 2012/4/13.

I wonder if there is any incomplete price data in the dataset which made this error in combination mode, but the normal one will bypass it and act on another symbols.
profile picture

Eugene

#6
Thanks for the extra information, yet I'm still unable to reproduce what you're experiencing using the Double-RePo system in WLD 6.3.

An error in the data would expose itself in regular Strategy mode. Try running this Combo strategy on different DataSets of different providers - any effect from switching? Also, would disabling all possible trading costs/slippage options make a difference?

A picture is worth a thousand words they say. How about uploading some screenshot/s/ of the Trades tab? Finally, is the size reducing to 1 at some point (when? which trade[s]?) or is 1 right off the bat?
profile picture

llhk

#7
Here are some screen captures for the testing i ran.

Pic 1: Normal testing (performance result) - "Active Trader 2009-01 | Double-RePo system"


Pic 2: Normal testing (trade details) - "Active Trader 2009-01 | Double-RePo system"


Pic 3: Combination mode - Using "Active Trader 2009-01 | Double-RePo system" alone, with same settings as it has in normal testing


Pic 4: Combination mode (performance result) - "Active Trader 2009-01 | Double-RePo system"


Pic 5: Combination mode (trade details) - "Active Trader 2009-01 | Double-RePo system"
You can see most of them are in 1 share only


Pic 6: Combination mode - "Active Trader 2009-01 | Double-RePo system" + "TASC 2008-07 | Leader Of The MACD Divergence (Siligardos)"



Pic 7: Combination mode (trade details) - "Active Trader 2009-01 | Double-RePo system" + "TASC 2008-07 | Leader Of The MACD Divergence (Siligardos)"
You can see only "Active Trader 2009-01 | Double-RePo system" are in 1 share, but it is normal for "MACD Divergence"
profile picture

Eugene

#8
Thank you for the all-out report.

Please open the "AT 2009-01..." Strategy and copy/paste its code into a blank Strategy window. Save under a new name. Create a new Combo Strategy and add the new Strategy along with "TASC 2008-07..." Did it make any difference?
profile picture

llhk

#9
Exactly the same as the results I previously got.
profile picture

Eugene

#10
Before creating a support ticket, I suggest you try as much other data providers as possible (e.g. Yahoo) to collect more evidence.
profile picture

llhk

#11
First, thanks for your help, Eugene!

I have eliminated the symbols from the dataset one by one and finally found that once the symbol get error like the following (shown below) while it run in a standalone strategy, this symbol will make all the combination strategy failed to get a correct quantity.


Runtime error: Index was out of range. Must be non-negative and less than the size of the collection.
at WealthLab.Strategies.MyStrategy.Execute()
at WealthLab.DataSeries.get_Item(Int32 i)


By excluding those problem symbols I got the correct combination results as I wish to have.

May I ask if there is any checking to prevent or check the individual data from its being out of range, or if the combination strategy can by pass those problem data just like the one in standalone mode?
profile picture

Eugene

#12
Nice!

I should've suggested to run a data check using the Data Tool and then exclude it or reload its data. For me, an erroneous symbol in a Combo strategy would just show up in the Debug window with a message like the above. But I haven't seen anything like that. Could you please create a support ticket and attach the .WL file of that symbol from the Daily bar scale? I'll try to find out what went wrong.
profile picture

Cone

#13
Which symbols are they? I can try to duplicate this with the Fidelity Provider data.
profile picture

llhk

#14
Eugeue:
Thank for reminding me, but don't really know how to use the Data Tool to do so, will try to learn it now.

I haven't seen anything in the Debug window in combination mode as you said and similar error in the standalone one. That's why it spent me time to find out this problem.

Sure, will create a support ticket soon~

Cone:
AOL and TNC (From Fidelity Provider)
profile picture

Eugene

#15
Thanks for submitting the files, I have a handle on the problem.
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).