Discussion:
[Quantlib-users] python quantlib swig to access member function blackFormulaImpliedStdDev
castle
2017-05-04 08:34:18 UTC
Permalink
Hi,

I am trying to get the implied volatility by Black-76 model,when I checked the documentation of quantlib I found there is a member function named blackFormulaImpliedStdDev in there. But I could not find in the module imported in python (it seems swig only can import class?)

Real QuantLib::blackFormulaImpliedStdDev ( const boost::shared_ptr<

PlainVanillaPayoff > & payoff,

Real forward,

Real blackPrice,

Real discount = 1.0,

Real displacement = 0.0,

Real guess = Null< Real >(),

Real accuracy = 1.0e-6,

Natural maxIterations = 100

)

May I know how use this member function in python?






I actually first posted this on stackoverflow http://stackoverflow.com/questions/43739593/python-quantlib-swig-to-access-member-function-blackformulaimpliedstddev
castle
2017-05-08 00:58:10 UTC
Permalink
Hi,

I am trying to get the implied volatility by Black-76 model,when I checked the documentation of quantlib I found there is a member function named blackFormulaImpliedStdDev in there. But I could not find in the module imported in python (it seems swig only can import class?)

Real QuantLib::blackFormulaImpliedStdDev ( const boost::shared_ptr<

PlainVanillaPayoff > & payoff,

Real forward,

Real blackPrice,

Real discount = 1.0,

Real displacement = 0.0,

Real guess = Null< Real >(),

Real accuracy = 1.0e-6,

Natural maxIterations = 100

)

May I know how use this member function in python?






I actually first posted this on stackoverflow http://stackoverflow.com/questions/43739593/python-quantlib-swig-to-access-member-function-blackformulaimpliedstddev
CK TUNG
2017-05-08 05:42:42 UTC
Permalink
I think you have to add it to the SWIG interface file and wrap and build quantlib for python again

http://www.smileofthales.com/build-quantlib-for-python/

Additional note to build.

(1) you have to include the swigwin-3.0.12 directory in %PATH%
(2) SET VS90COMNTOOLS=%VS140COMNTOOLS%
(3) install needs elevated Command Prompt
Post by castle
Hi,
I am trying to get the implied volatility by Black-76 model,when I checked the documentation of quantlib I found there is a member function named blackFormulaImpliedStdDev in there. But I could not find in the module imported in python (it seems swig only can import class?)
Real QuantLib::blackFormulaImpliedStdDev ( const boost::shared_ptr<
PlainVanillaPayoff > & payoff,
Real forward,
Real blackPrice,
Real discount = 1.0,
Real displacement = 0.0,
Real guess = Null< Real >(),
Real accuracy = 1.0e-6,
Natural maxIterations = 100
)
May I know how use this member function in python?
I actually first posted this on stackoverflow http://stackoverflow.com/questions/43739593/python-quantlib-swig-to-access-member-function-blackformulaimpliedstddev
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
j***@yahoo.com
2017-05-08 04:42:30 UTC
Permalink
I think you have to add it to the SWIG interface file and wrap and build quantlib for python again

http://www.smileofthales.com/build-quantlib-for-python/
Post by castle
Hi,
I am trying to get the implied volatility by Black-76 model,when I checked the documentation of quantlib I found there is a member function named blackFormulaImpliedStdDev in there. But I could not find in the module imported in python (it seems swig only can import class?)
Real QuantLib::blackFormulaImpliedStdDev ( const boost::shared_ptr<
PlainVanillaPayoff > & payoff,
Real forward,
Real blackPrice,
Real discount = 1.0,
Real displacement = 0.0,
Real guess = Null< Real >(),
Real accuracy = 1.0e-6,
Natural maxIterations = 100
)
May I know how use this member function in python?
I actually first posted this on stackoverflow http://stackoverflow.com/questions/43739593/python-quantlib-swig-to-access-member-function-blackformulaimpliedstddev
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Loading...