Dukascopy
 
 
Wiki JStore Search Login

Historical Tester unnaturally slow?
 Post subject: Historical Tester unnaturally slow? Post rating: 0   New post Posted: Mon 24 Aug, 2015, 15:10 
User avatar

User rating: 1
Joined: Tue 12 May, 2015, 18:13
Posts: 34
Location: United Kingdom, Headington
I ran a test with 180 tests over a year. From other platforms in the futures I thought this would be a small enough test. After trying it on low end computers: I am running it on a super computer normally used for multiple genome analysis with 12 CPU's and 38 gigs of memory.

yet it is taking it several hours to complete, and I worry it will freeze near 50% like all the others. I notice the timer is still climbing. Is this a limitation of the java platform? I noticed it isn't using more than 17% of CPU and half a gig of memory. Can I up this anyway?


 
 Post subject: Re: Historical Tester unnaturally slow? Post rating: 0   New post Posted: Thu 10 Sep, 2015, 07:52 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
You can increase the max heap size used by JVM only.
For this, modify this line in the .jnlp you use to start platform:

<java version="1.7+" java-vm-args="-Xmx512m -Xms32m"/>

set to 4 GB, for example
<java version="1.7+" java-vm-args="-Xmx4096m -Xms32m"/>


 
 Post subject: Re: Historical Tester unnaturally slow? Post rating: 0   New post Posted: Fri 11 Dec, 2015, 18:45 

User rating: 2
Joined: Thu 07 Nov, 2013, 12:15
Posts: 121
In my experience the tester is useful for simulation but pretty much useless for real backtesting.

The choice is between backtesting in another platform then porting your rules into JForex, or rolling your own backtester.

What I'm doing is compiling my trading rules as external java classes and implementing my indicators outside JForex using TA-LIB. This is the same library used by JForex so results are identical.

Then I download the data as a CSV file using the excellent Historic Data Manager.

Finally I've written a wrapper that streams the file data through the rules and logs the trades. I print some basic stats into the console, and do any deeper analysis in Excel.

For portfolio testing I simply concatenate the different price files and sort them by date-time before running the test. This means that events occur in the correct order.

You can add brute-force optimisation fairly easily too.

It's all quite low tech but was easy to write and gets the job done, and it's FAST. In fact, on my system it runs 6000 times faster than the JForex tester!

They are working on a proper backtester, but I've been advised not to expect it any time soon...


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com