|
Hi everybody,
I am very new to quantlib and i was playing with the example code for a while.
The library seems to be pretty powerful, though I was not able to run a simple test.
I tried to price a european call option with quote 7, strike 8, mean annual growth rate 5%, annual volatility 10%, a risk free rate of 5% and a duration of 1 year.
#include <ql/quantlib.hpp>
using namespace QuantLib;
int main(int argc, char* argv[])
{
QL_IO_INIT
std::cout << "Value: " << EuropeanOption(Option::Call , 7, 8, 0.05 , 0.05 , 1, 0.1).value() << std::endl;
return 1;
}
that code returns:
Value: 0.0300238
but in fact it should be something like 0.0823, isnt it?
im sure that the pricing engine works fine and i have a mistake in my inputs. could one of you guys point me to the right direction?
thanks alot!
heri
|