Skip to main content

A simple curve bootstraping tool based on ORE/QuantLib

Project description

CurveEngine

A simple curve bootstrapping tool. It uses ORE as backend and parses configuration files (see example below) and transform them into QL/ORE objects.

Documentation

Documentation is available at https://jmelo11.github.io/curveenginedocs/

Build

For building the project, you need to have cmake installed. Then, run the following commands:

python -m build

Example

For a more detail example, visit the example folder.

{
    "refDate": "2023-02-14",
    "curves": [
        {
            "curveName": "SOFR",
            "curveConfig": {
                "curveType": "Piecewise",
                "dayCounter": "Actual360",
                "enableExtrapolation": true,
                "rateHelpers": [
                    {
                        "helperType": "Deposit",
                        "helperConfig": {
                            "dayCounter": "Actual360",
                            "tenor": "1D",
                            "calendar": "NullCalendar",
                            "settlementDays": 0,
                            "endOfMonth": false,
                            "convention": "Unadjusted"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.0455,
                                "ticker": "SOFRRATE CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "1W",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.045555000000000005,
                                "ticker": "USOSFR1Z CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "2W",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.045568,
                                "ticker": "USOSFR2Z CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "1M",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.04564,
                                "ticker": "USOSFRA CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "3M",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.047723,
                                "ticker": "USOSFRC CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "6M",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.050135,
                                "ticker": "USOSFRF CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "12M",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.051856,
                                "ticker": "USOSFR1 CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "3Y",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.042443,
                                "ticker": "USOSFR3 CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "5Y",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.037866,
                                "ticker": "USOSFR5 CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "7Y",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.035910000000000004,
                                "ticker": "USOSFR7 CURNCY"
                            }
                        }
                    },
                    {
                        "helperType": "OIS",
                        "helperConfig": {
                            "tenor": "10Y",
                            "dayCounter": "Actual360",
                            "calendar": "NullCalendar",
                            "convention": "Following",
                            "endOfMonth": true,
                            "frequency": "Annual",
                            "settlementDays": 2,
                            "paymentLag": 2,
                            "telescopicValueDates": true,
                            "index": "SOFR",
                            "fixedLegFrequency": "Semiannual",
                            "fwdStart": "0D"
                        },
                        "marketConfig": {
                            "rate": {
                                "value": 0.03464,
                                "ticker": "USOSFR10 CURNCY"
                            }
                        }
                    }
                ]
            },
            "curveIndex": {
                "indexType": "OvernightIndex",
                "tenor": "1D",
                "dayCounter": "Actual360",
                "currency": "USD",
                "fixingDays": 0,
                "calendar": "NullCalendar",
                "endOfMonth": false,
                "convention": "Unadjusted"
            }
        }
    ]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

curveengine-1.1.6.tar.gz (19.5 kB view hashes)

Uploaded Source

Built Distribution

curveengine-1.1.6-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page