- ago
Is it possible to backtest two Wealth Data datasets at the same time? For example, if I wanted to backtest the Dow 30 and the Nasdaq 100 with the benefits of survivorship free bias, etc.
0
874
Solved
27 Replies

Reply

Bookmark

Sort
Cone8
 ( 24.10% )
- ago
#1
There's no way to combine multiple DataSets in a single backtest. You can get pretty close by using the strategy twice in a MetaStrategy and allocating capital proportionally, e.g., 10 : 3
1
Best Answer
- ago
#2
So, there's no really good way for us to utilize all of Wealth Data at one time, at least all of the WD supported symbols in a backtest?
0
- ago
#3
Cone's MetaStrategy solution is elegant. Also you could copy the symbols from your multiple W-D DataSets and paste into one big new DataSet.
1
Cone8
 ( 24.10% )
- ago
#4
QUOTE:
paste into one big new DataSet.
You could do that, but you'd lose the historical watchlist feature of Wealth-Data.

@eralbanese
The question is answered. MetaStrategy is the way to go.
0
- ago
#5
You can use the finantic.BestData extension to create a new DataSet which is a combination of several other (existing) data sets.

Then run your backtest on the new DataSet.
0
Cone8
 ( 24.10% )
- ago
#6
@DrKoch,
Great! I didn't know it had that feature.

The question is, "are you sure the historical backtest preserved when the resulting DataSet [name] is not an installed W-D Dataset. It's possible, but I wouldn't count on it unless it were tested.
0
- ago
#7
QUOTE:
the historical backtest preserved

what does this mean?
0
- ago
#8
This means that built-in Wealth-Data DataSets (S&P, Dow, DAX etc) are programmed to historically include and expel symbols at the time they appeared in the index. Question is, does BestData retain this survivorship bias free experience when combining the built-in W-D DataSets?
0
- ago
#9
The meta strategy isn’t ideal as I don’t want to split equity uniformly between datasets. The strategy I run adjusts equity on a per symbol basis and occasionally all symbols come from Nasdaq or sp100 for that day/week. It gets me closer to a solution but not quite.

I also am looking for the ability where I want to keep symbols in the backtest once they have been in an index but I don’t want the symbols included before they were in the index. If I copy WD datasets over to a new custom WD dataset the symbols stay in the backtest after removal from an index but are also included before they were a part of that index (bias).
0
Cone8
 ( 24.10% )
- ago
#10
It's not really a BestData function.

Here's the test. Combine the Wealth-Data Dow 30 and Nasdaq 100. Run this script.

CODE:
namespace WealthScript10 { public class MyStrategy : UserStrategyBase { public override void Initialize(BarHistory bars) { } public override void PreExecute(DateTime dt, List<BarHistory> participants) {          WriteToDebugLog(dt.ToShortDateString() + "\t" + participants.Count); } public override void Execute(BarHistory bars, int idx) { } } }


If you get around 130 symbols counted on each bar (should be less because of shared symbols), then the Historical Backtest is working.
0
Cone8
 ( 24.10% )
- ago
#11
QUOTE:
as I don’t want to split equity uniformly between datasets.
Who said that? The idea was a 10:3 ratio split, based on the number of symbols.

QUOTE:
If I copy WD datasets over to a new custom WD dataset the symbols stay in the backtest after removal from an index but are also included before they were a part of that index (bias).
With some work you could determine the start dates of each of the symbols, save it to a file and use that information in your strategy.

So, there's a way, but this is one of those 1% requests, and it's just not possible to customize Wealth-Lab for everyone's precise use.
0
- ago
#12
Thanks Cone, I dont mind doing the work, how would it be best to implement in strategy code?
0
Cone8
 ( 24.10% )
- ago
#13
The clues to doing what you need to are already in this thread.

We're a small team with a lot on the plate, so we can't continually stop to provide single-user/purpose solutions. It detracts from doing the other 95%.

In our team meeting yesterday, we discussed a starting a consulting service for requests like this. Maybe we'll have something set up in a few weeks.

Although, I wouldn't be happy to work on reverse engineering the start dates - no - I'll respectfully recuse myself from that task. We spent many man-weeks/months creating Wealth-Data, and good part of it was researching those dates, which was a tediously complicated task when dealing with companies that change names, change symbols, symbols that were re-used, delistings, etc.
1
- ago
#14
You can also just create a Wealth Data set with all wealth lab symbols using wealth Data as your provider like I have done. I've done an all WealthLab ETF data set and also done all Wealth Lab stock symbols using the below link.

https://www.wealthsignals.com/symbol-list
0
- ago
#15
@arflouro82 - have you seen Cone's Post #4 above?

@Cone - well said!
0
- ago
#16
I've tried using the meta strategy with just one dataset and 100% portfolio allocation and I do not get the same results as just running the strategy normally. I even ran the RSI2 provided strategy as a test and I get different results with the same parameters. The results are close, but not the same.
0
- ago
#17
Did you use a fixed dollar/shares position sizing?
0
- ago
#18
fixed equity at 10%
0
Cone8
 ( 24.10% )
- ago
#19
Invariably this due to NSF Positions. You must assign Transaction Weight to get consistent results.
0
- ago
#20
Interesting, when I have my personal strategy with weights it comes up with a different value. When I add a weight to RSI2 it has the same value. The weight I utilize is unique and doesnt have any NSF positions. What else could be the issue?
0
- ago
#21
Percent Equity at 10%?
0
- ago
#22
Yes, 10 %.
0
- ago
#23
That's the point. Could you try a fixed dollar/shares position sizing and to assign a Transaction.Weight?
0
Cone8
 ( 24.10% )
- ago
#24
QUOTE:
When I add a weight to RSI2 it has the same value. The weight I utilize is unique and doesnt have any NSF positions. What else could be the issue?
I think this is the issue. The first 2 sentences here do not make sense to me since weights are not applied "to" indicators, nor do they have to be unique.

If you want help with this, you have to give us something more concrete - starting with the data from the Metrics report, and probably the Strategy. Because if the results change from run to run without NSF positions, or if they change with NSFs and properly assigned T.weights, then I would conclude that the variability is coming from the strategy itself.
0
Glitch8
 ( 12.85% )
- ago
#25
You should probably also turn MetaStrategy portfolio rebalance to None to remove that variable.
0
- ago
#26
I added a volume weight to the RSI2 and when I run that in a regular strategy at 10% equity versus the meta strategy with the same parameters, I get the same exact APR and # of trades, as expected.

I just created a quick ultosc strategy that varies (not as much as mine, but there is still a difference between a 100% meta strategy and running it by itself).

Ult Osc Settings:



Meta Settings:




0
Cone8
 ( 24.10% )
- ago
#27
Check the Positions. Where's the difference? Maybe the MetaStrategy StartIndex was automatically set to a greater value.
0

Reply

Bookmark

Sort