Login  Register

Newbie problem with pricing an asian option

Posted by Simon Kronlund on Jan 31, 2008; 4:57pm
URL: http://quantlib.414.s1.nabble.com/Newbie-problem-with-pricing-an-asian-option-tp5440.html

Hi All,
 
I'am a newbie to C++ and QuantLib.
 
I'am trying to calculate a price for an asian option. I have used some code from the test-suite project, and have made some changes.
 
When I try to compile my project I receive the following errors:
 
Error 29 error LNK2019: unresolved external symbol "class boost::shared_ptr<class QuantLib::BlackVolTermStructure> __cdecl QuantLib::flatVol(class QuantLib::Date const &,class boost::shared_ptr<class QuantLib::Quote> const &,class QuantLib::DayCounter const &)" ([hidden email]) referenced in function "public: static void __cdecl SKAsianOption::SKMCDiscreteArithmeticAveragePrice(void)" ([hidden email]) asianpricer.obj 
 
Error 30 error LNK2019: unresolved external symbol "class boost::shared_ptr<class QuantLib::YieldTermStructure> __cdecl QuantLib::flatRate(class QuantLib::Date const &,class boost::shared_ptr<class QuantLib::Quote> const &,class QuantLib::DayCounter const &)" ([hidden email]) referenced in function "public: static void __cdecl SKAsianOption::SKMCDiscreteArithmeticAveragePrice(void)" ([hidden email]) asianpricer.obj 

 
 
I have located the error to the following lines:

boost::shared_ptr<YieldTermStructure> qTS = flatRate(today, qRate, dc);

boost::shared_ptr<BlackVolTermStructure> volTS = flatVol(today, vol, dc);

 

I have attached my project.

I deeply appreciate any help,

Best regards,

Simon Kronlund


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

asianpricer.cpp (7K) Download Attachment
asianpricer.hpp (242 bytes) Download Attachment