#467 closed defect (fixed)
Ois.Store data loss
Reported by: | apuente | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | SetAlgebra | Version: | head |
Severity: | critical | Keywords: | |
Cc: |
Description
Sometimes, when writing monthly-dated time series to an OIS file, last value of the series are lost, and all dates are delayed one time unit.
Test code sample:
BDT FILE:
Mensual ; Factura606028978 ;
y2004m01d01 ; 35.482 ;
y2004m02d01 ; 9.175 ;
y2004m03d01 ; 9.057 ;
y2004m04d01 ; 43.194 ;
y2004m05d01 ; 36.222 ;
y2004m06d01 ; 0.0 ;
y2004m07d01 ; 15.092 ;
y2004m08d01 ; 19.652 ;
y2004m09d01 ; 8.621 ;
y2004m10d01 ; 7.309 ;
y2004m11d01 ; 5.622 ;
y2004m12d01 ; 6.859 ;
y2005m01d01 ; 6.072 ;
y2005m02d01 ; 8.563 ;
y2005m03d01 ; 8.604 ;
y2005m04d01 ; 10.561 ;
y2005m05d01 ; 3.483 ;
y2005m06d01 ; 4.25 ;
y2005m07d01 ; 9.149 ;
y2005m08d01 ; 6.397 ;
y2005m09d01 ; 2.457 ;
y2005m10d01 ; 3.715 ;
y2005m11d01 ; 16.121 ;
y2005m12d01 ; 23.931 ;
y2006m01d01 ; 10.976 ;
y2006m02d01 ; 15.001 ;
y2006m03d01 ; 40.565 ;
y2006m04d01 ; 28.645 ;
y2006m05d01 ; 17.241 ;
y2006m06d01 ; 29.391 ;
y2006m07d01 ; 22.892 ;
y2006m08d01 ; 12.157 ;
y2006m09d01 ; 5.822 ;
y2006m10d01 ; 18.285 ;
y2006m11d01 ; 2.401 ;
Test code:
Set aaa=IncludeBDT("c:\serieError.bdt");
Real Ois.Store(aaa,"c:\oisError.oza");
Set bbb=Ois.Load("c:\oisError.oza");
Change History (5)
comment:1 Changed 18 years ago by
Owner: | changed from danirus to Víctor de Buen Remiro |
---|
comment:2 Changed 18 years ago by
Status: | new → assigned |
---|
comment:3 Changed 18 years ago by
I think it's related to TOL - default dates.
You can avoid this error with this simple code:
Date PutDefaultDates(y2004m01d01, y2008m01d01);
Set aaa=IncludeBDT("c:\serieError.bdt");
Real Ois.Store(aaa,"c:\oisError.oza");
Set bbb=Ois.Load("c:\oisError.oza");
(In reply to comment #0)
Sometimes, when writing monthly-dated time series to an OIS file, last value of
the series are lost, and all dates are delayed one time unit.
Test code sample:
BDT FILE:
Mensual ; Factura606028978 ;
y2004m01d01 ; 35.482 ;
y2004m02d01 ; 9.175 ;
y2004m03d01 ; 9.057 ;
y2004m04d01 ; 43.194 ;
y2004m05d01 ; 36.222 ;
y2004m06d01 ; 0.0 ;
y2004m07d01 ; 15.092 ;
y2004m08d01 ; 19.652 ;
y2004m09d01 ; 8.621 ;
y2004m10d01 ; 7.309 ;
y2004m11d01 ; 5.622 ;
y2004m12d01 ; 6.859 ;
y2005m01d01 ; 6.072 ;
y2005m02d01 ; 8.563 ;
y2005m03d01 ; 8.604 ;
y2005m04d01 ; 10.561 ;
y2005m05d01 ; 3.483 ;
y2005m06d01 ; 4.25 ;
y2005m07d01 ; 9.149 ;
y2005m08d01 ; 6.397 ;
y2005m09d01 ; 2.457 ;
y2005m10d01 ; 3.715 ;
y2005m11d01 ; 16.121 ;
y2005m12d01 ; 23.931 ;
y2006m01d01 ; 10.976 ;
y2006m02d01 ; 15.001 ;
y2006m03d01 ; 40.565 ;
y2006m04d01 ; 28.645 ;
y2006m05d01 ; 17.241 ;
y2006m06d01 ; 29.391 ;
y2006m07d01 ; 22.892 ;
y2006m08d01 ; 12.157 ;
y2006m09d01 ; 5.822 ;
y2006m10d01 ; 18.285 ;
y2006m11d01 ; 2.401 ;
Test code:
Set aaa=IncludeBDT("c:\serieError.bdt");
Real Ois.Store(aaa,"c:\oisError.oza");
Set bbb=Ois.Load("c:\oisError.oza");
comment:4 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000467 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Problem has been solved in CVS.
There was two related problems, one in TimeSet and another one in OIS, both about the dates of calculation and cache.
So, you could avoid this problem by establishing default dates starting at first date of serie, because then cache and calculation dates were coincident.
A test has been created in order to check this bug in future releases
http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000467
comment:5 Changed 18 years ago by
Note that, when you want to load a full OIS image, you can simply write
Set bbb=Include ("c:\oisError.oza");
instead of
Set bbb=Ois.Load("c:\oisError.oza");
Function Ois.Load offers a more complex API with a lot of optional arguments and returns an embedded set that could cause some interpretation mistakes.
Thanks to report it