While pricing Interest Rate Swap, I am providing Fixing rate for historical date using "addFixing(date, value)" function. But when I am trying to change value it is not happening and picking up old value only, giving following error:

"RuntimeError: At least one duplicated fixing provided: January 23rd, 2018, 0.017453 while 0.017452 value is already present"

Is there a way to change this fixing rate?


addFixinghas a third parameter forceOverwrite which is false by default. Calling addFixing(date, value, true) will allow the change.

On Python, the third parameter is not exported (you might open an issue on GitHub to fix that). You'll have to go for the nuclear option:


will clear the whole history of fixings and allow you to reload it.

| improve this answer | |
  • $\begingroup$ I tried this but getting error again: index.addFixing(Date(23,1,2018),0.017453, True) TypeError: addFixing() takes 3 positional arguments but 4 were given $\endgroup$ – BHr Apr 24 '18 at 16:24
  • $\begingroup$ So you're on Python? $\endgroup$ – Luigi Ballabio Apr 24 '18 at 16:29
  • $\begingroup$ Yes, on Python... $\endgroup$ – BHr Apr 24 '18 at 16:31
  • $\begingroup$ See the update. $\endgroup$ – Luigi Ballabio Apr 24 '18 at 17:15
  • $\begingroup$ Thanks Luigi...created GitHub issue for same github.com/lballabio/QuantLib-SWIG/issues/110. And using nuclear option as of now. $\endgroup$ – BHr Apr 25 '18 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.