Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Historical data can be totally wrong
 Post subject: Historical data can be totally wrong Post rating: 0   New post Posted: Mon 17 Feb, 2014, 15:19 
User avatar

User rating: 1
Joined: Thu 24 Nov, 2011, 09:09
Posts: 36
Location: FranceFrance
Dear Support,

Since years now, I use a lot your backtesting facility through JForex plateform.

However, since a few days (or weeks?) the backtest data depend on the computer I use!
Yes, it is incredible.

Below please find a list of ask values on bar close and a couple of ma for the begining of 2008 printed on 2 of my computers.

Computer 1, OS: MacOSX 10.6.8, Java SE6 1.6.0_65-b14-462 :

2014.02.17 13:32:02, (onStart): 1min start time, ask10s, ask1m, lastAsk, ma1m4, ma1m20:
2014.02.17 13:32:06, 2008-01-01 01:00:00 1.460100, 1.459300, 1.460100, 1.458700, 1.458530
2014.02.17 13:32:06, 2008-01-01 01:01:00 1.460100, 1.459300, 1.460100, 1.458900, 1.458570
2014.02.17 13:32:06, 2008-01-01 01:02:00 1.460100, 1.459300, 1.460100, 1.459100, 1.458615
2014.02.17 13:32:06, 2008-01-01 01:03:00 1.460100, 1.459300, 1.460100, 1.459300, 1.458650

Computer 2, the same OS and the same Java :

2014.02.17 13:39:02, (onStart): 1min start time, ask10s, ask1m, lastAsk, ma1m4, ma1m20:
2014.02.17 13:39:03, 2008-01-01 01:00:00 1.458520, 1.458520, 1.458520, 1.458610, 1.458595
2014.02.17 13:39:03, 2008-01-01 01:01:00 1.458480, 1.458480, 1.458480, 1.458580, 1.458589
2014.02.17 13:39:03, 2008-01-01 01:02:00 1.458120, 1.458120, 1.458120, 1.458440, 1.458569
2014.02.17 13:39:03, 2008-01-01 01:03:00 1.458060, 1.458060, 1.458060, 1.458295, 1.458535

Obviously, the 2d computer got wrong data (quotation varies while this is a New Year holiday and the market is closed).

I checked the OS and Java versions, they are the same.
The only difference is the name of the directory for cash, but that can not bring any trouble. Can it ?
What else can I do ?

Thanks for your reply.

almc
----------------------------------------------------------
The printing snippet is simple:



public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
if (!instrument.equals(Instrument.EURUSD)) return;

if (period.equals(Period.ONE_MIN)) {
double ask10s = history.getBar(instrument, Period.TEN_SECS, OfferSide.ASK, 0).getClose();
double ask1m = askBar.getClose();
double lastAsk = history.getLastTick(instrument).getAsk();
double ma1m4 = indicators.sma(instrumentG, Period.ONE_MIN, OfferSide.ASK, IIndicators.AppliedPrice.CLOSE, 4, 1);
double ma1m20 = indicators.sma(instrumentG, Period.ONE_MIN, OfferSide.ASK, IIndicators.AppliedPrice.CLOSE, 20, 1);

String msg = String.format(" %s %10.6f, %10.6f, %10.6f, %10.6f, %10.6f %n",
dateSDF.format(askBar.getTime()), ask10s, ask1m, lastAsk, ma1m4, ma1m20);
print(msg);
}

}

public void print (String message) {
console.getOut( ).println(message);
}


 
 Post subject: Re: Historical data can be totally wrong Post rating: 0   New post Posted: Tue 18 Feb, 2014, 10:29 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Does the problem persist after cleaning cache on both of your computers?


 
 Post subject: Re: Historical data can be totally wrong Post rating: 0   New post Posted: Tue 18 Feb, 2014, 11:05 
User avatar

User rating: 1
Joined: Thu 24 Nov, 2011, 09:09
Posts: 36
Location: FranceFrance
Computer 1 shows no problem at all. All backtests results are as they were months before. The price on 2008-01-01 does not vary as this must be.

Computer 2: Unfortunately, yes, the problem persists.
/temp/.cashe cleaned, JForex API restarted => same price variations as reported in the first post;
cashe location moved to ../JForex/cashe/, API restared => same problem, price varies :

2014.02.18 09:53:52, (onStart): 1min start time, ask10s, ask1m, lastAsk, ma1m4, ma1m20:
2014.02.18 09:54:05, 2008-01-01 01:00:00 1.458520, 1.458520, 1.458520, 1.458610, 1.458595
2014.02.18 09:54:05, 2008-01-01 01:01:00 1.458480, 1.458480, 1.458480, 1.458580, 1.458589
2014.02.18 09:54:05, 2008-01-01 01:02:00 1.458120, 1.458120, 1.458120, 1.458440, 1.458569
2014.02.18 09:54:06, 2008-01-01 01:03:00 1.458060, 1.458060, 1.458060, 1.458295, 1.458535
2014.02.18 09:54:06, 2008-01-01 01:04:00 1.458020, 1.458020, 1.458020, 1.458170, 1.458504
2014.02.18 09:54:06, 2008-01-01 01:05:00 1.458110, 1.458110, 1.458110, 1.458078, 1.458480

API settings identical on both computers, backtesting mode : "Ticks", "Process every tick".

almc


 
 Post subject: Re: Historical data can be totally wrong Post rating: 0   New post Posted: Wed 19 Feb, 2014, 09:10 
User avatar

User rating: 1
Joined: Thu 24 Nov, 2011, 09:09
Posts: 36
Location: FranceFrance
It worthened. By unknown reason, Computer 1 downloaded 2008.01.01 EURUSD data, erasing the old record on the disk. The data show price variations on the New Year night as in the above given listings for Computer 2.

Thus, the problem seems to be localized. Apparently, sinice a few weeks, the 2008.01.01. EURUSD downloaded data are wrong.

A.


 
 Post subject: Re: Historical data can be totally wrong Post rating: 0   New post Posted: Thu 20 Feb, 2014, 15:15 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Do the JForex-API and platform versions match?


 
 Post subject: Re: Historical data can be totally wrong Post rating: 0   New post Posted: Thu 20 Feb, 2014, 15:56 
User avatar

User rating: 1
Joined: Thu 24 Nov, 2011, 09:09
Posts: 36
Location: FranceFrance
They are of the same version on both computers:
JForex plateform 1.0(1.0)
JForex API 2.9.6.1

Downloaded latest version of jForex.jnlp;
Cleaned cashe;
Restared JForex plateform;
Result for 2008.01.01 is the same.
Verified that the ceration time of the data loaded for 2008.01.01 is today;

What else?
For 2011.01.01 data look ok: price is constant.
Further 2011 data look also ok producing the same tracks as months ago;

I see nothing special on the Java Console reports.

Thanks in advance,

almc


 
 Post subject: Re: Historical data can be totally wrong Post rating: 0   New post Posted: Wed 26 Mar, 2014, 18:01 
User avatar

User rating: 1
Joined: Wed 18 May, 2011, 16:43
Posts: 10
Location: Czech Republic, Brno
Please read also this topic, it is another description of Historical data bug:

viewtopic.php?f=16&t=50746


 

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