# In quantlib (python), is there a way to specify settlementdays for a swapratehelper without having to also give discountCurve?

Using the following Python code I am setting USD LIBOR Swap quotes. I found that by default settlementdays uses whatever is associated with the Index (in C++: if (settlementDays_==Null<Natural>()) settlementDays_ = iborIndex->fixingDays();). If I wanted to explicitly set settlementDays = 0, how can I do that? I tried just use settlementDays = 0, but the code does not seem to like named argument here. How would I go about setting that without having to also specify discountCurve?

I do not want to use a different curve, and don't quite understand how I can reference a curve that does not yet exist. Thank you in advance!

s_helpers = [ SwapRateHelper(rate/100.0,
tenor, l_calendar,
Semiannual, l_pmt_conv,
Thirty360(),
USDLibor(Period(3, Months)))

for tenor, rate in [(Period(1,Years), 2.395),
(Period(2,Years), 2.575),
(Period(3,Years), 2.651),
(Period(5,Years), 2.704),
(Period(7,Years), 2.734),
(Period(10,Years), 2.779),
(Period(30,Years), 2.822)] ]


So one cannot omit arguments in these Python functions, since they aren't exposed as keyword arguments. Instead I ended up created my own custom LIBOR index with 0 settlement days and used that in swap rate helper:

s_helpers_0_sd = [ SwapRateHelper(rate/100.0, tenor, calendar, Semiannual, pmt_conv, Thirty360(), Libor("USDLibor", Period(3, Months),0,USDCurrency(),NullCalendar(), Actual360())) for tenor, rate in [(Period(1,Years), 2.395), (Period(2,Years), 2.575), (Period(3,Years), 2.651), (Period(5,Years), 2.704), (Period(7,Years), 2.734), (Period(10,Years), 2.779), (Period(30,Years), 2.822)] ]

I would still like to know what if it ever makes sense to specify the discountCurve parameter outside of cases where I would actually have different discount and forecast curves?

As in the source code, the default discount curve parameter is just a dummy YieldTermStructure handle so i believe this should work for you:

SwapRateHelper(rate/100.0,
tenor, l_calendar,
Semiannual, l_pmt_conv,
Thirty360(),
USDLibor(Period(3, Months)),
QuoteHandle(), Period(0, Days),
YieldTermStructureHandle(), 0
)