Code Monkey home page Code Monkey logo

Comments (6)

jonfreedman avatar jonfreedman commented on August 24, 2024

You may want to take a look at the Strata library from OpenGamma as they have pretty good curve fitting support. It's written in Java so you can probably follow it given your Python style.

You'll need to offer curve calibration using outright OIS & IBOR tenor swaps, OIS meeting date swaps, basis swaps of either IBOR/IBOR, IBOR/OIS or OIS/OIS, OIS and IBOR futures, IBOR FRAs (I include ESTR and SOFR in the OIS category). You should also allow for multiple overnight rates per currency (SOFR+FF & ESTR+EONIA).

The most interesting case to cover is probably AUD where you need full multi-curve support as the 3m and 6m curves are co-dependent on each other.

from financepy.

domokane avatar domokane commented on August 24, 2024

from financepy.

domokane avatar domokane commented on August 24, 2024

Jon - I have implemented

  • calibration to OIS swaps with fixed tenors and also meeting dates
  • calibration to IBOR tenor swaps using OIS discounting and pricing of IBOR contracts with 2 curves

It works fine. The code may need some refactoring when it's all done. I am also exploring best interpolation schemes.

Right now I would love to find numerical examples e.g. from Bloomberg I can tie out to. Do you have access to any ?

I will now turn to including IBOR basis swaps and OIS-IBOR swaps. The joint coupling of the curves makes this a more complex problem to solve but should be do-able.

Let me have any comments you might have.

from financepy.

jonfreedman avatar jonfreedman commented on August 24, 2024

I found a few random datasources from Google you could use:

It's not really that important how close to the market they are as long as they're consistent with each other

from financepy.

domokane avatar domokane commented on August 24, 2024

Thanks. Those are good data sources that I will bookmark.

What I was looking for is a full worked example of building an OIS curve, then a Euribor curve and then using that to value an off-market swap. This paper (https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2219548
) by Ametrano and Bianchetti is very good but does not quite get there. In any case my curves do build and reprice the market and the swap valuation works so I am pretty sure it's fine but I would have liked an independent check. The good news is that I have found this QL example and I am checking I can tie out.

https://blog.deriscope.com/index.php/en/excel-usd-interest-rate-swap-pnl

from financepy.

jonfreedman avatar jonfreedman commented on August 24, 2024

Yeah finding test cases will be tricky without streaming market data, I'd use the sebgroup data to fit a curve with 5y, 7y, 10y and check the 6y, 8y, 9y projected rates.

On the topic of interpolation schemes ideally you should support using multiple schemes, e.g. flat between meeting dates at the short end and then something smooth and cubic after the first x meetings. Both the OIS/RFR curves which use meeting dates and inflation curves which use fixing swaps exhibit this behaviour, e.g. you have a market rate at t[x] and t[x+1] and there is no market expectation of any change between those two dates.

from financepy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.