Quantcast

python quantlib swig to access member function blackFormulaImpliedStdDev

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

python quantlib swig to access member function blackFormulaImpliedStdDev

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

python quantlib swig to access member function blackFormulaImpliedStdDev

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: python quantlib swig to access member function blackFormulaImpliedStdDev

javacomhk@yahoo.com
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/


castle <[hidden email]> 於 2017年5月8日 上午8:58 寫道:

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: python quantlib swig to access member function blackFormulaImpliedStdDev

CK TUNG
In reply to this post by castle
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

castle <[hidden email]> 於 2017年5月8日 上午8:58 寫道:

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Loading...