|
From: Trent M. <tr...@ma...> - 2023-10-19 03:41:50
|
I'm not totally sure why the objects from the DataFrame aren't expanding correctly, but I get the same result. My advice is just skip the DataFrame. The below should work just fine. import QuantLib as ql quote = ql.SimpleQuote(0.0004) helper = ql.DepositRateHelper( ql.QuoteHandle(quote), ql.Period(1, ql.Days), 0, ql.TARGET(), ql.Following, False, ql.Actual360(),) Sent with [Proton Mail](https://proton.me/) secure email. ------- Original Message ------- On Wednesday, October 18th, 2023 at 20:26, Trent Maetzold <tr...@ma...> wrote: > Check the python docs here: > > https://quantlib-python-docs.readthedocs.io/en/latest/thelpers.html#depositratehelper > > Sent from [Proton Mail](https://proton.me/mail/home) for iOS > > On Wed, Oct 18, 2023 at 17:15, Christofer Bogaso <[bog...@gm...](mailto:On Wed, Oct 18, 2023 at 17:15, Christofer Bogaso <<a href=)> wrote: > >> Hi, >> >> I have below code >> >> import QuantLib as ql >> import pandas as pd >> >> DepoQuotes = pd.DataFrame({'Quote' : [ql.SimpleQuote(0.0004)], >> 'Settlement_D' : [0]}) >> >> ql.DepositRateHelper(ql.QuoteHandle(DepoQuotes.loc[0, 'Quote']), >> ql.Period(1,ql.Days), DepoQuotes.loc[0, 'Settlement_D'], ql.TARGET(), >> ql.Following, False, ql.Actual360()) >> >> Above code generates below error >> >> Traceback (most recent call last): >> >> File "<stdin>", line 1, in <module> >> >> File "/usr/local/lib/python3.11/site-packages/QuantLib/QuantLib.py", >> line 26529, in __init__ >> >> _QuantLib.DepositRateHelper_swiginit(self, >> _QuantLib.new_DepositRateHelper(*args)) >> >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> TypeError: Wrong number or type of arguments for overloaded function >> 'new_DepositRateHelper'. >> >> Possible C/C++ prototypes are: >> >> DepositRateHelper::DepositRateHelper(Handle< Quote > const >> &,Period const &,Natural,Calendar const >> &,BusinessDayConvention,bool,DayCounter const &) >> >> DepositRateHelper::DepositRateHelper(Rate,Period const >> &,Natural,Calendar const &,BusinessDayConvention,bool,DayCounter const >> &) >> >> DepositRateHelper::DepositRateHelper(Handle< Quote > const >> &,ext::shared_ptr< IborIndex > const &) >> >> DepositRateHelper::DepositRateHelper(Rate,ext::shared_ptr< >> IborIndex > const &) >> >> Could you please to resolve above error? >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users |