Dukascopy
 
 
Wiki JStore Search Login

Simulation slows down after large number of ticks
 Post subject: Simulation slows down after large number of ticks Post rating: 0   New post Posted: Tue 01 May, 2012, 08:25 
User avatar

User rating: 0
Joined: Tue 29 Nov, 2011, 02:17
Posts: 25
Location: Australia,
Does anybody else find that their simulations slow down after a large number of ticks have been processed?

e.g.

At the start of a simulation I might get half an hour of ticks processed in about 1 second:
2012-05-01 17:06:19.381 INFO Main - Running, Wed 2008.01.02 07:00 Eq: 979,050.44 UoL: 5.24%
2012-05-01 17:06:20.933 INFO Main - Running, Wed 2008.01.02 07:30 Eq: 981,139.26 UoL: 5.19%
2012-05-01 17:06:22.496 INFO Main - Running, Wed 2008.01.02 08:00 Eq: 983,228.61 UoL: 5.17%
2012-05-01 17:06:24.021 INFO Main - Running, Wed 2008.01.02 08:30 Eq: 979,051.67 UoL: 4.97%
2012-05-01 17:06:25.751 INFO Main - Running, Wed 2008.01.02 09:00 Eq: 980,385.07 UoL: 4.97%
2012-05-01 17:06:27.346 INFO Main - Running, Wed 2008.01.02 09:30 Eq: 982,612.99 UoL: 4.16%
2012-05-01 17:06:28.896 INFO Main - Running, Wed 2008.01.02 10:00 Eq: 982,473.16 UoL: 4.16%
2012-05-01 17:06:30.439 INFO Main - Running, Wed 2008.01.02 10:30 Eq: 978,997.93 UoL: 4.84%
2012-05-01 17:06:31.979 INFO Main - Running, Wed 2008.01.02 11:00 Eq: 974,460.16 UoL: 4.86%
2012-05-01 17:06:33.581 INFO Main - Running, Wed 2008.01.02 11:30 Eq: 971,138.52 UoL: 5.00%
2012-05-01 17:06:35.132 INFO Main - Running, Wed 2008.01.02 12:00 Eq: 971,968.94 UoL: 5.00%
2012-05-01 17:06:36.988 INFO Main - Running, Wed 2008.01.02 12:30 Eq: 969,739.38 UoL: 4.62%

But after 11 months of simulation this drops to about 1 minute for half an hour...
2012-05-01 16:55:55.207 INFO Main - Running, Thu 2008.11.12 18:30 Eq: 1,391,261.51 UoL: 1.56%
2012-05-01 16:57:33.497 INFO Main - Running, Thu 2008.11.12 19:00 Eq: 1,390,832.02 UoL: 1.56%
2012-05-01 16:58:48.680 INFO Main - Running, Thu 2008.11.12 19:30 Eq: 1,396,178.58 UoL: 1.70%
2012-05-01 16:59:56.867 INFO Main - Running, Thu 2008.11.12 20:00 Eq: 1,397,782.46 UoL: 1.70%
2012-05-01 17:00:56.326 INFO Main - Running, Thu 2008.11.12 20:30 Eq: 1,398,247.88 UoL: 1.69%
2012-05-01 17:02:11.617 INFO Main - Running, Thu 2008.11.12 21:00 Eq: 1,403,404.37 UoL: 1.68%
2012-05-01 17:02:51.857 INFO Main - Running, Thu 2008.11.12 21:30 Eq: 1,397,592.96 UoL: 1.79%

I would like to simulate 2008 to 2012 but have to do each year separately due to the slow down.


 
 Post subject: Re: Simulation slows down after large number of ticks Post rating: 0   New post Posted: Wed 02 May, 2012, 10:08 

User rating: 5
Joined: Thu 29 Mar, 2012, 15:00
Posts: 19
Are you sure it's not downloading the data for the latter ones? Can you recreate it going that slow for the same period? Or if you leave it going and let it get up to the current date does it run slowly on subsequent runs?


 
 Post subject: Re: Simulation slows down after large number of ticks Post rating: 0   New post Posted: Thu 03 May, 2012, 02:07 
User avatar

User rating: 0
Joined: Tue 29 Nov, 2011, 02:17
Posts: 25
Location: Australia,
Hi,

I have downloaded all of the data into the cache previously and am sure that there is no data downloading occurring. In any event, I think that JForex downloads all of the data first and then begins the simulation. It does not run the simulation whilst it is downloading the data (at least that is how it works the way I have got it set up).

I think that the JForex code is making references to objects in a dictionary or something and doing lookups, and the collection object is just getting bigger and bigger. Possibly related to the way that it does the post analysis after the simulation has ended. E.g. it might be keeping a list of IOrder objects for every transaction even if the transaction has finished? How else would it do the sums at the end?

Does this happen to anybody else when they run a simulation over tick data for at least 1 year of data?


 

Jump to:  

  © 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