|
From: Luigi B. <lui...@gm...> - 2020-11-12 08:37:02
|
Hello Jian,
you can open a new issue at
https://github.com/lballabio/QuantLib-SWIG/issues asking for the class to
be exported. It's likely that someone will pick it up for next release.
Luigi
On Thu, Nov 12, 2020 at 2:44 AM jian Xu <jia...@gm...> wrote:
> Thank you so much for the detailed explanation, Jack. I don't have
> the development environment set up. So let me think about which way
> to go. But generally, I do think this is a useful class to have in
> Python.
>
> On Wed, Nov 11, 2020 at 6:27 PM Jack G <jac...@gm...> wrote:
> >
> > Hi Jian,
> >
> > QuantLib relies on another project, which auto-generates interface code,
> to export functionality to python and other languages -
> https://github.com/lballabio/QuantLib-SWIG. The reason you can't see
> fixed/floating risky bond in the python wrap is because an interface for it
> hasn't been included in this file:
> https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/bonds.i
> >
> > If you want to have a go at adding it yourself (it's an instructive
> process), you will need to:
> > - fork the QuantLib-SWIG repo, and locally add the code to the file I
> mentioned above, following the other examples in the file
> > - test your changes, which requires a few sub-steps (the first time,
> this process will take several hours to set up and run):
> > a) build QuantLib v1.20 locally from source as described here:
> https://www.quantlib.org/install.shtml (if you're using Windows you can
> try Visual Studio, but personally I find it easiest to do it using Windows
> Docker Desktop inside a Docker container in a linux environment)
> > b) build QuantLib-SWIG v1.20 with your modifications
> > c) test the code changes locally using Python
> > - when the wrapper is working, make a pull request with your changes
> into the QuantLib-SWIG repo, and Luigi will merge your changes after the
> automated tests pass
> > - optionally, you might consider adding documentation for the new python
> classes to the repo that generates the online documentation shown here:
> https://quantlib-python-docs.readthedocs.io/en/latest/
> >
> > If this sounds too ambitious for you, let me know and I can make the
> changes to expose the class for you, as it looks like a useful class to
> have available.
> >
> > Best,
> > Jack
> >
> > On Thu, Nov 12, 2020 at 5:31 AM jian Xu <jia...@gm...> wrote:
> >>
> >> Hi,
> >>
> >> There is a RiskyBond class under experimental/credit in the C++ repo.
> >> However, when I'm using the Python interface, it seems that it's not
> >> there. My question is, how to get the RiskyBond in Python? Or is
> >> there a reason that it's not exposed?
> >>
> >> More generally, I am trying to calibrate a survival probability curve
> >> of a fixed rate bond. And I think RiskyBond is the correct one to
> >> use. If it's not in Python, what's the proper object for this task?
> >> Thanks.
> >>
> >> Jian
> >>
> >>
> >> _______________________________________________
> >> 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
>
|