Problem setting the evaluation date on AIX for 64 bit application

Posted by Rohit Rai on
URL: http://quantlib.414.s1.nabble.com/Problem-setting-the-evaluation-date-on-AIX-for-64-bit-application-tp18.html

Hi
 
I am using Quantlib 0.9.7 for my Application.
 
And i set the evaluation date to 31 December 2008 for Fixed Rate Bond.
When i print the settlement date , for Window the Settlement Date is fine ..which is January 1st, 2009
But for AIX 64 bit application, the Settlement Date is bit weird...which comes out to be January 24th, 2011.
I guess , its pointing to the current date rather than taking the date which i have set to i.e. 31-December-2008.
 
Attaching the log file for both the Platforms.
 
Please guide me regarding this issue. Its having a huge impact on my application.
 
 
 
 
The code is given below:
 
cout<<" Fic Mis Date in Initialize Method: "<<this->mMisdate<<endl;
Settings::instance().evaluationDate() = this->mMisdate;
try
{
 Handle<YieldTermStructure> discountCurve(boost::shared_ptr<YieldTermStructure>(
  new ZeroCurve(instrumentInfoObj.vTermstructureDates,instrumentInfoObj.vTermstructureRates,instrumentInfoObj.dayCounter)));
 boost::shared_ptr<PricingEngine> bondEngine(new DiscountingBondEngine(discountCurve));
 Date effectiveDate = instrumentInfoObj.issueDate+instrumentInfoObj.settlementDays;
 cout<<" Effective Date "<<effectiveDate<<endl;
   cout<<" Issue Date "<<instrumentInfoObj.issueDate<<endl;
   cout<<" Settlement Days "<<instrumentInfoObj.settlementDays<<endl;
 cout<<" Maturity Date "<<instrumentInfoObj.maturityDate<<endl;
 Schedule schedule(effectiveDate,
  instrumentInfoObj.maturityDate,
  (QuantLib::Period)instrumentInfoObj.couponFrequency,
  instrumentInfoObj.calendar,
  QuantLib::Following,
  QuantLib::Following,
  DateGeneration::Forward,
  false);
  cout<<"Account Skey -------> "<<instrumentInfoObj.acctSkey<<"    COUPON RATE-------->"<<instrumentInfoObj.couponRate<<endl;

 this->mptrFixedRateBond = new FixedRateBond (instrumentInfoObj.settlementDays,
  100,
  schedule,
  vector<double> (1,instrumentInfoObj.couponRate),
  instrumentInfoObj.dayCounter,
  QuantLib::Following,
  100,
  instrumentInfoObj.issueDate);
 this->mptrFixedRateBond->setPricingEngine(bondEngine);
 cout.precision(10);
   cout<<"NPV "<<this->mptrFixedRateBond->NPV()<<endl;
   cout<<"Settlement Date:"<<this->mptrFixedRateBond->settlementDate()<<endl;
   cout<<"Issue Date:"<<this->mptrFixedRateBond->issueDate()<<endl;
 cout<<"Maturity Date:"<<this->mptrFixedRateBond->maturityDate()<<endl;
 return ClsUConstants::TASK_SUCCESS;
 
 
 
Regards
Rohit


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

WindowLog2.txt (2K) Download Attachment
AIXLog1.txt (2K) Download Attachment