Dukascopy
 
 
Wiki JStore Search Login

Visual backtest now extremely slow (Desktop client 2.22.2)
 Post subject: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Fri 14 Dec, 2012, 03:38 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
Prior to this latest desktop client update (2.22.2) visually back testing a strategy across 1 month of GU data at maximum speed (=x8, slider fully across to the right) used to take 3-4 minutes.

Now visually back testing the same strategy across the same period takes 18-24 HOURS! This around 400-500 times slower.

The speed of a back test without visual ticked appears to be the same as it was previously.


 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Fri 14 Dec, 2012, 09:31 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
We tested it on GBPUSD all ticks of the last month and the VM on. It took a couple of minutes. Most probably it is related to somehting specific that your strategy is doing. Could you please provide the source code or piece of it that would show the problem?


 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Tue 18 Dec, 2012, 03:47 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
I doubt it is the strategy - it was running as normal (fast) speed prior to the last API/ddesktop client update, and then very slowly afterwards, and back test without visual mode on is still as faster as it used to be.


 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Fri 04 Jan, 2013, 04:08 

User rating: 1
Joined: Fri 04 Jan, 2013, 04:01
Posts: 3
Hi,

i'm having the exact same problem. Strategies that used to be fine are now incredibly slow to backtest.

I was able to reproduce it using the following "shell" strategy. From what i see, it seems either of those two lines make the backtest go nuts:
            context.getChart(selectedInstrument).addIndicator(indicators.getIndicator("HT_SINE"));
            context.getChart(selectedInstrument).addIndicator(indicators.getIndicator("HT_TRENDMODE"));


I'm using the following java version:
Java Web Start 10.10.2.18
Using JRE version 1.7.0_10-b18 Java HotSpot(TM) 64-Bit Server VM



If you need additional information, feel free to contact me.

Alex.


Attachments:
SlowBacktest.java [2.25 KiB]
Downloaded 585 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Fri 04 Jan, 2013, 04:11 

User rating: 1
Joined: Fri 04 Jan, 2013, 04:01
Posts: 3
Hi,

i'm having the exact same problem. Strategies that used to be fine are now incredibly slow to backtest.

I was able to reproduce it using the following "shell" strategy. From what i see, it seems either of those two lines make the backtest go nuts:
            context.getChart(selectedInstrument).addIndicator(indicators.getIndicator("HT_SINE"));
            context.getChart(selectedInstrument).addIndicator(indicators.getIndicator("HT_TRENDMODE"));


I'm using the following java version:
Java Web Start 10.10.2.18
Using JRE version 1.7.0_10-b18 Java HotSpot(TM) 64-Bit Server VM



If you need additional information, feel free to contact me.

Alex.


 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 1   New post Posted: Fri 04 Jan, 2013, 04:13 

User rating: 1
Joined: Fri 04 Jan, 2013, 04:01
Posts: 3
Forgot to attach the strategy. Here it is.


Attachments:
SlowBacktest.java [2.25 KiB]
Downloaded 594 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 1   New post Posted: Fri 11 Jan, 2013, 08:32 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
We are investigating this issue.


 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Fri 15 Feb, 2013, 15:44 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
When testing in the visual mode, indicators on chart are calculated on every tick, which is around 5000 times for each Hourly bar.
Hilbert Transform are the "heaviest" TA-Lib indicators with a large lookback.
Testing a strategy in visual mode with these indicators attached takes roughly the same time as calling their calculation on every tick from strategy with visual mode turned off.
The best solution for the moment is: add these indicators on chart while testing only when necessary or use the "recalculate on new candle only" option.


 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Tue 05 Mar, 2013, 04:46 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
Desktop Support wrote:
When testing in the visual mode, indicators on chart are calculated on every tick, which is around 5000 times for each Hourly bar.
Hilbert Transform are the "heaviest" TA-Lib indicators with a large lookback.
Testing a strategy in visual mode with these indicators attached takes roughly the same time as calling their calculation on every tick from strategy with visual mode turned off.
The best solution for the moment is: add these indicators on chart while testing only when necessary or use the "recalculate on new candle only" option.


Yes, but previously this didn't happen - I have quite a few strategies which are indicator intensive, and they have all slowed down by 400 or 500 times during visual backtesting x8 playback as noted above. Some new issue has been introduced.


 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Wed 15 May, 2013, 10:54 
User avatar

User rating: 0
Joined: Tue 16 Apr, 2013, 13:56
Posts: 4
Location: Ukraine, Kremenchug
Platform Support wrote:
... or use the "recalculate on new candle only" option.


Please help, tell me how to do it in the code of the strategy??? indicator is added with the following code...
chart.addIndicator(indicators.getIndicator("SMA"), new Object[] { smaSignalTimePeriod }, new Color[]{new Color(89,144,32)},new DrawingStyle[]{DrawingStyle.LINE}, new int[]{1,2});
chart.addIndicator(indicators.getIndicator("MACD"), new Object[]{fastMACDPeriod, slowMACDPeriod, signalMACDPeriod});


 
 Post subject: Re: Visual backtest now extremely slow (Desktop client 2.22.2) Post rating: 0   New post Posted: Fri 17 May, 2013, 15:11 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
IIndicator macd = indicators.getIndicator("MACD");

macd.getIndicatorInfo().setRecalculateOnNewCandleOnly(true);

chart.addIndicator(macd, new Object[] {fastMACDPeriod, slowMACDPeriod, signalMACDPeriod});


 

Jump to:  

cron
  © 1998-2025 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