# Fixing Rate in Quantlib

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:

IndexManager.instance().clearHistory(index.name())


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

• 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
– BHr
Apr 24, 2018 at 16:24
• So you're on Python? Apr 24, 2018 at 16:29
• Yes, on Python...
– BHr
Apr 24, 2018 at 16:31
• See the update. Apr 24, 2018 at 17:15
• Thanks Luigi...created GitHub issue for same github.com/lballabio/QuantLib-SWIG/issues/110. And using nuclear option as of now.
– BHr
Apr 25, 2018 at 9:27