I have decide to build a platform that could run a very large number of test in the minimum length of time. As most of our development is on the Stock Market, every time we want to design a new system we have to load thousands of instruments: 3952 for the TSX Market, 8433 on the NYSE.

We usually test for the period from 1997 to this day.

So in most instance one test can take up to 4 minutes. So even if you have a fairly simple test parameter that loop over 6 times, this test will take 24 minutes.

So far our testing effort have been focus on finding range or parameters by subset. Exemple will test best Support / resistance level. Then we will go on testing best Stop Strategy, and so on.

The problem with this is that as you move on with the test subset, the result are biased by the previous choice of parameters that you had optimised.

So my idea is to build a platform that could test all the parameters combinations. As you all know every time you add a parameter to test, you multiply your number of test to run by the number of loop in that parameters.

As an exemple a test with 6 parameters that loop over 6 values, where each test take 4 minutes. Would take your machine for 46656 test or roughly 65 days.

Now as we had already builded a parallell testing platform for your daily CSI download and TB running. We have decided to take that experience and to create a parallell testing platform.

Our goal is to achieve the same result in much less time.

So in the upcoming days as we build this platform, I will document the steps here, talking about the choice of equipment , the software involved, and the results.

The first wich was to acquired a Dell R810 Server, This server have 4 X7560 CPU each with 8 cores. 256 Gigs of RAM and 3.6 Terabytes of Hard Drive Space.

We will be using windows 2008 datacenter and Hyper-V for virtualization.

Tomorrow I will be talking about the building of the algorythm to split the test file (the vts file in simulation suite directory)

The machine came in a couple of days ago. I had to decide how to partition the Disk. The machine have 6 - 600 Gig disk. I read a bit on disk configuration and decided to go with a RAID 10 Configuration. This configuration according to documentation should give us the fastest disk read speed. I would have prefer to have 1 SSD drive to store the CSI Data, but there is no space left in the machine.

I included a picture of the machine.

So far I have installed Windows 2008 R2 Datacenter Edition 64 Bit. We've installed 2008 Datacenter because it come with Hyper-V the Microsoft Virtualization platform. I prefer Hyper-V over VMWare ESX server, because we are use to Microsoft Programming and they have a very good API to interface with the Hyper V Controler. This enable us to start, stop and query the status of the Virtual Machine as the process run.

After installing Windows 2008 and Hyper V, I was left with 247 GIG of RAM. This will allow me to have 30 - 8 Gig of RAM virtual machine running in parallel, and I will be able to allocate 2 Virtual Cores per virtual machine.

Also the program to read the Simulation Suite ".vts" file is finish, I will post the steps it take to read, parse and create the "Child vts" file.

Attachments

Image 64 Cores.png (31.78 KiB) Viewed 9409 times

Dell R810v2.jpg (105.83 KiB) Viewed 9463 times

Last edited by ratio on Wed Jun 15, 2011 10:10 am, edited 1 time in total.

In order to submit the processing jobs to our multiple virtual machine, we had to design a way to split the Simulation Suite into a number of subset files.

If we have 30 virtual machine, and we have 6000 test to do, we want to create 30 VTS files each one with a subset of the test to do. In order to accomplish that we need to use TB and configure our complete test.

This is a section of the VTS that I use for demonstration. Each variable that we need to test the range are presented with a > on the left side of the = sign. Except for the Boolean that are presented as VARIES wich mean we must switch between TRUE and FALSE

If we look in the included sample for the parameter: Ranking Overweight Factor Q-1, this would mean we need to test it from value 1 to 5 and we must step +1 each time.

Once we've read all those variable we construct a matrix of all the combination. We then sort it and we split it by range of row so that we get one range per virtual machine. Ex: if we have 300 test to do, and we have 3 virtual machine, each machine would receive a VTS that split the matrix to do 100 test.

Once the matrix is in memory, it is fairly easy to split it we take the first set of line, and we look for the minimum and maximum values for that variables in those line. This become the Test Range for that variable in the new VTS

We then rewrite a VTS file per Machine. So if the original VTS is called: ORIGINAL.VTS and we have 3 virtual machine the VTS are going to be called ORIGINAL_01.VTS, ORIGINAL_02.VTS and ORIGINAL_03.VTS. And each will have a subset to test.

This process will be included later in a much larger Step Handler, that will execute the complete process automatically upon submiting of a VTS file.

Creating the Virtual Machine Template is an easy step, what you need is an iso file of windows 2008 or the CD in your server.

You simply use Hyper-V manager, Select New Virtual Machine, give it a Name, here we call it TBMASTER. Assign the RAM 8 GIG, and the Virtual Network.

Once this is done the VM will be created, upon booting it, windows 2008 Standard will install from the CD. Just follow the normal installation steps.

Once this is done, we boot the VIrtual Machine, login and use the Run Menu to execute: control userpasswords2

This application allow you to set the default username and password that will be use when this Virtual machine start, this will allow us to use the startup script to automatically launch TB when we boot the virtual machine.

All the file and scripts to automate the process are store on the main server. In this case we have a VBS file called RatioProcessTBQueue.vbs
VBS is Visual Basic Script that we store on the server and is run by each Virtual Machine upon Startup. This VBS file will know (will explain later how) if there is processing to do and will do it.

If one is trading a portfolio of 7.000 stocks and trading varios strategies combined and using 1 PC exlcusively for Trading Blox running 1 version at a time;

What are the most important elements you recommend for choosing a PC with a budget of maximum 1.000 USD?
- Processor; dual, cuadcore?
- Or is the type of procesor not that important but the amount of RAM is?

Now let's say in the future I will start trading on a bigger stockportfolio of 15.000+ stocks and 4 different systems, is it then still the number of cores and procesor speed that matter the most or does RAM get more important then?