|
From: Ashish B. <ash...@gm...> - 2022-12-02 09:41:59
|
Hi Elric, If you want a basic code for barrier then I wrote 1 in this thread: https://sourceforge.net/p/quantlib/mailman/message/37670218/ can also refer to the examples of barrier options in this test suite if you are comfortable with C++: https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp Thanks Ashish On Wed, 30 Nov 2022 at 18:21, Jonathan Sweemer <sw...@gm...> wrote: > Hi Kiann, > > I'm surprised that the error you're seeing isn't related to the arguments > you pass to BlackScholesProcess. You should be passing term structure > objects instead of numerical values. > > See these links for more information: > > 1. > https://quantlib-python-docs.readthedocs.io/en/latest/stochastic_processes.html#blackscholesprocess > 2. > https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/stochasticprocess.i#L116-L121 > 3. > https://stackoverflow.com/questions/4891490/calculating-europeanoptionimpliedvolatility-in-quantlib-python > > > > On Wed, Nov 30, 2022 at 8:13 PM Elric StormBringer < > elr...@gm...> wrote: > >> Hi there, a noob using/investigationg QuantLib library via python. >> >> Great job there guys! >> >> I've been browsing the online documentation, but still having problem >> trying to find the 'arguments' and 'fields' inside each. >> For example, after I've defined the trade details/market-data/engine for >> : ql.BarrierOption.impliedVolatility >> -> I am trying to use .ImpliedVolatility. >> -> However, I am getting errors from my input fields >> : option_.impliedVolatility(0.01, ql.BlackScholesProcess(1.0, 0.0, 0.3)) >> >> Can I check, what are the syntax of the data-fields to be used? The error >> message is : impliedVolatility() missing 2 required positional >> arguments: 'targetValue' and 'process' >> >> Kind regards >> Kiann >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |