Can I run a portfolio backtest using 2700+ symbols
Author: jimcrist
Creation Date: 12/13/2008 5:04 PM
profile picture

jimcrist

#1
I got my WL4 script converted to WL5. It shows entries and exits for a single symbol. I use Fidelity backtest data (WL4) and update 2700+ equity symbols nightly. I run my VB6 backtest program nightly to see if it jives with my VB.Net Automated Trading System (ATS). It takes 15-20 minutes. I don't believe WL4 SimuScripts could handle that size backtest in a timely manner. Plus, it had incredible memory requirements. I've been trying to get my brain around what WL5 can do for me and I have some questions:

1. Is WL5.1.75 the current version? Any idea when 5.2, 5.3, 5.4 might come out?
2. I can't run a backtest for multiple equity symbols until PosSizers is available in WL5.4?
3. Can I migrate my WL4 data into WL5? How?
4. I see some documentation about how to run a strategy using Visual Studio. I have VS2005 Pro. If I get my strategy running in VS2005, does it display charts like it does in WL5? Does it do everything it does under WL5?
profile picture

Eugene

#2
QUOTE:
1. Is WL5.1.75 the current version? Any idea when 5.2, 5.3, 5.4 might come out?

5.1.75 for WL Pro, and 5.1.5.10 for Developer, are the latest versions.
5.2 is Educational.
5.3 might come out early next year.
QUOTE:
2. I can't run a backtest for multiple equity symbols until PosSizers is available in WL5.4?

What is "multiple equity"? You can already run multi-symbol backtest in portfolio simulation mode even in 5.0.
QUOTE:
3. Can I migrate my WL4 data into WL5? How?

WLD4/WLP4 files are read with the bundled WL4 Files provider. Metastock and ASCII data are natively supported too.
QUOTE:
4. I see some documentation about how to run a strategy using Visual Studio. I have VS2005 Pro. If I get my strategy running in VS2005, does it display charts like it does in WL5? Does it do everything it does under WL5?

What you mention is an article about how to debug a strategy in WL using the VS debugger, not run it as a standalone application.
profile picture

jimcrist

#3
QUOTE:
3. Can I migrate my WL4 data into WL5? How?

WLD4/WLP4 files are read with the bundled WL4 Files provider. Metastock and ASCII data are natively supported too.

I didn't find anything labeled WL4 Files provider, but I found Relocate Data on the Fidelity Data tab in the Data Manager.
I copied the symbol list from WL4, created a new DataSet in WL5 and did an update. It completed the update immediately, maybe 'cuz I had already updated it WL4. So, WL5 is using the WL4 data, right? And it'll update tomorrow night properly using WL5?

My next problem is Portfolio Simulation Mode. Using symbol AA, $100,000 in equity and 2 to 1 margin, Fixed Dollar and Fix Shares both work as expected. 1% of equity didn't work at all for a $30 stock 'cuz it rounded to 0 shares. That's OK, but it gave me a misleading message: 6 trades not included due to insufficient simulated capital.

% of risk isn't working as expected. It's skipping 2 trades due to "insufficient simulated capital." I have it set at 3% so it's .03 * 100,000 = $3000. I'm setting the RiskStopLevel in my code before I do the BuyAtClose or ShortAtClose. It's set at about $2 from the entry price. It's about a $30 stock. So, the $3000 is divided by the $2 to get 1500 shares but with the 2 to 1 margin it shows up at 3000 shares. My stops and targets are set properly and using Raw Profit Mode all 6 trades show up and look proper. None of the 6 trades overlap. There's no big losers so the equity doesn't change much. I've used PrintDebug to look at the RiskStopLevel, Target, Stop, etc and every thing looks fine. What the heck is wrong?!?

I just changed the margin back to 1 to 1. Now it skips 3 trades and the other three still show around 3000 shares. What's going on???

By the way, what I really need is BOTH a % of equity and a % of risk used in one calculation for share size. PLEASE put that in the next release!
profile picture

jimcrist

#4
Here's another problem. Something to do the the data. I click on a symbol and get a runtime error: "Cannot convert -858963468 Bars to 15 Minute Bars". (the number and sign vary on each symbol). I click on the chart tab and get "No Data Available". Then I right click and select Reload Chart History. I run the strategy again and it works with no error. Is this 'cuz it's using WL4 data?
profile picture

Eugene

#5
QUOTE:
I didn't find anything labeled WL4 Files provider,

That could be if you unchecked the "WL4 Files" option when installing WLP5.
QUOTE:
So, WL5 is using the WL4 data, right?

Wrong. Create a new DataSet using the built-in "WL4 Files" provider, or reinstall WLP5 with this option checked. (With WLP5.3, you would just download the provider from this site into the Extension Manager but this feature is only coming for WLP customers.) Anyway, the provider is one-way street in WLP5 i.e. read-only. The old files will not be updated.

As it's not possible to reuse the old *.WL files (due to a format change), you will need to recreate the DataSets from the scratch using the Fidelity provider.

QUOTE:
It completed the update immediately

If there were just 2 symbols in your watchlist that had an IPO last year, in this case it would be just OK. But since there are 2700 tickers in your watchlists there's something obviously not quite right with this immediate downloading of history. Here is the key to the problem:

QUOTE:
Here's another problem. Something to do the the data. I click on a symbol and get a runtime error: "Cannot convert -858963468 Bars to 15 Minute Bars". (the number and sign vary on each symbol). I click on the chart tab and get "No Data Available". Then I right click and select Reload Chart History. I run the strategy again and it works with no error. Is this 'cuz it's using WL4 data?

Your problem looks like to be caused by the "Fidelity data relocation" feature. Using relocation without having any Fidelity data on the disk probably made the update "immediate". I guess that before relocating something that doesn't exist yet, the data should be actually created by WLP5 by downloading it from Fidelity.

So please turn off relocation (there is nothing yet to relocate except for the empty directories) and perform an update of all your DataSets.

QUOTE:
And it'll update tomorrow night properly using WL5?

Assuming that WLP5 is running, the timer is set to the appropriate time, and it's all right with your connection, then yes.

QUOTE:
PLEASE put that in the next release!

Please realize the fact that we - MS123 LLC - are not Fidelity. "Putting" something is easily said than done with an application that consists of tens and hundreds thousand lines of code. If you have a suggestion like that, please ask the developers (Fidelity) directly. "The next" release (5.3) is almost carved in stone, coming probably in the beginning of 2009, so Fidelity could change anything (of course, if they find it acceptable), in 5.4.
profile picture

jimcrist

#6
Thanks much! Got it figured out.

QUOTE:
Anyway, the provider is one-way street in WLP5 i.e. read-only. The old files will not be updated. As it's not possible to reuse the old *.WL files (due to a format change), you will need to recreate the DataSets from the scratch using the Fidelity provider.


This is distressing news. Old symbols and old trades are very important! We need a conversion utility!
profile picture

Eugene

#7
QUOTE:
This is distressing news. Old symbols and old trades are very important! We need a conversion utility!


Fidelity's efforts are concentrated on the Version 5 development, there is still much to do. So far, you are the only one who expressed this opinion about a conversion utility. And may I ask what it will convert to/from? You may continue to update the old data in WLP/WLD 4 without overloading the new application with, frankly, questionable features.

If for whatever reason should I need the V5 data in V4, I would export them to WLD4 native binary files and read them back with the Sample static adapter:

Data | Exporting data out of WL5 to ASCII and WL4 native binary files
profile picture

jimcrist

#8
You may have misunderstood me. I want to migrate the old obsolete tickers from WLP4 to WLP5, so I can have all my tickers (obsolete and current) maintained with WLP5. I guess I can keep WLP4 around forever just to maintain all my symbols and do all my updating with WLP4. I guess the other alternative is to export the WLP4 obsolete symbols to ASCII, and then go ASCII to WLP5 format using the WLP5 program. But there are dozens of them and it'll take some time...
profile picture

Eugene

#9
Since the obsolete symbols are not updated any more, so there's no need to export the data to ASCII. Just read the native WL files with the WL4 Files provider (see my reply from 12/15/2008 3:20 AM).

I really don't see the problem with the current symbols here. Wouldn't copying and pasting the symbol list(s) do the job? If I'm overlooking something, please correct me. It will pay off to update a significant universe of symbols (like 2700) in WL5 vs. WL4: the multi-threaded data updater makes it faster.

profile picture

jimcrist

#10
Sorry 'bout the confusion. Following what you said, I keep say 300 obsolete tickers in WLP4 format in one dataset. The 2400 current tickers in WLP5 format in another dataset. How do I run one backtest with both datasets?
profile picture

Eugene

#11
By using Aronow Software WatchList provider (free); more details and download link in the WL5 Wiki FAQ:
"Is there a support for WatchLists in Wealth-Lab 5?"
profile picture

jimcrist

#12
I copied the Update Log to an Excel spreadsheet, sorted it and separated the 418 obsolete symbols. Unfortunately, when you create a WL4 dataset it doesn't ask if you want to create it with a list of symbols. I downloaded the Aronow Watchlist provider and I can't paste my symbols into that either. Anyway I can avoid picking thru 2744 symbols selecting the 418 symbols that I want???
profile picture

Eugene

#13
You said:

QUOTE:
Following what you said, I keep say 300 obsolete tickers in WLP4 format in one dataset. The 2400 current tickers in WLP5 format in another dataset. How do I run one backtest with both datasets?


So my answer was: To run one backtest with both datasets, you'll need the WatchList provider.
profile picture

jimcrist

#14
Yes, I know. And I have the list of 418 symbols that I want to separate out. But I can't just paste the list into the WatchList provider. And I can't paste the list into the WL4 file provider. I have to go thru the entire list of 2744 symbols and individually mark the 418 symbols I want included in my WatchList. I'm complaining about the user interface. I should be able to just cut & paste the list of symbols I want to separate out.
profile picture

Cone

#15
Assuming that you have some criteria for the 418 symbols, about about writing a simple script to collect the names, then copy them to make another DataSet? It's really simple, so I'll get you started -

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

jimcrist

#16
I got all my old symbols and current symbols organized, created watchlists with Aronow's utility and ran a backtest. It collected data for symbols A thru ECLP and then threw a memory exception. WLP5 is using 1.3G of my 2G of memory. Total memory used, including XP, etc is 1.84G. What's the problem? Thanks...
profile picture

Eugene

#17
The increased memory requirements is the price to pay for double precision.

See Out of memory problems section in the WL5 Wiki FAQ for solutions.
profile picture

jimcrist

#18
I'd rather have single precision and actually be able to use the product. For my needs WL5 is just as worthless as WL4 was...

According to the calculation, I need 7.2G of RAM...
profile picture

Cone

#19
There's just no way to please everyone. Wealth-Lab users have been very vocal over the last 6 or 7 years about the need for better precision. We argued all along that more precision meant greater memory requirements. Before 64-bit was available it simply wasn't practical to move to double precision. However, now that 64-bit is here and will be supported by Version 5 (*see note), the most-demanding users can just buy some RAM and get the best of both worlds.

*While WLP Version 5.3 will support 64-bit installations, it still won't run in 64-bit mode due to the legacy Fidelity [COM] Server written in C++. It's unclear to me whether or not the work-around with CorFlags.exe works with Wealth-Lab Pro.
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).