Login  Register

matching EUR OIS to bloomberg with python

Posted by vinnieb on Aug 02, 2016; 7:57am
URL: http://quantlib.414.s1.nabble.com/matching-EUR-OIS-to-bloomberg-with-python-tp17631.html

Hi,

Apologies if I've made a basic error somewhere, but I've been banging my head against this problem for a while now!

I'd been trying to match curves from a different system with no joy, so instead gone back to Bloomberg, taken market rates for a given day and based on the EONIA bootstrapping example in the ql python cookbook, substituted in values and dates, largely using all the code as is there - just the deposit rate helper has a single 1day value, then the OISRateHelper populated out with 1wk, 2wk, onwards as per the Bloomberg screen.

Discount rates seem to match up to about the 4th or 5th decimal place, but I can't get accurately close to the zero rates. Is something wrong here (this is about the closest I can bring the zero rate to the bbg zero rate)

    for d in curve.dates():
            yrs = ql.Thirty360(ql.Thirty360.European).yearFraction(todaysDate, d)
            compounding = ql.Compounded
            freq = ql.Quarterly
            zero_rate = curve.zeroRate(yrs, compounding, freq)
            print(d, zero_rate.rate()*100, curve.discount(d))

Thanks a lot!