Skip to main content

eiopa-rfr

Solvency II risk-free interest rate term structures with EIOPA's new constant-forward method, from swap rates or government bond zero rates: bootstrapping up to the first smoothing point, then extrapolation of forward rates from the last liquid forward rate (LLFR) to the ultimate forward rate (UFR). It also calculates the undertaking-specific volatility adjustment (VA) and the term structures after the upward and downward interest rate shocks, without and with VA.

  • Reproduces EIOPA's demonstration workbook RFR extrapolation and VA calculation (19 May 2026) exactly, following the RFR Technical Documentation EIOPA-BoS-26/198 (May 2026).
  • Pure Python, standard library only, fully typed.
  • The same code is kept as plain, readable scripts in the repository, which also explains the method step by step.

Disclaimer. This is not an EIOPA product and is not endorsed by EIOPA. It is provided for educational purposes, without warranty. EIOPA publishes the official risk-free rate term structures; check any result against EIOPA's publications before relying on it.

Install

pip install eiopa-rfr

Requires Python 3.10 or later.

Command line

eiopa-rfr --input Input --output Output

The input folder holds:

File Content
curve.csv columns Maturity, DLT, LLFR Weight, Input Rate (par swap rates or annually compounded zero rates)
parameters.csv Instrument (SWP or GVT), Coupon Frequency, UFR, Convergence, CRA (bp), Max Maturity
va_parameters.csv optional: the VA inputs; without it, no VA is calculated
irr_parameters.csv optional: the shock parameters per maturity; without it, no shocks are calculated

The command prints a summary and writes the curves and parameters to the output folder as swaps_*.csv or government_bonds_*.csv. Before a run it deletes only the result files of an earlier run from the output folder; other files are kept. python -m eiopa_rfr does the same. The columns of every file are described under Inputs and outputs.

Python

from eiopa_rfr import calculate_sheet, validate_inputs

rates = {1: 0.02176, 2: 0.022621, 3: 0.023795, 4: 0.0248, 5: 0.02569, 6: 0.02651,
         7: 0.02732, 8: 0.028, 9: 0.028631, 10: 0.02927, 11: 0.02979, 12: 0.03027,
         13: 0.030779, 15: 0.03143, 20: 0.03233, 25: 0.0325, 30: 0.032431,
         40: 0.03206, 50: 0.03131}

inputs = {
    "Instrument": "SWP",               # swaps; "GVT" for government bonds
    "CouponFreq": 1,                   # annual coupons; None for government bonds
    "CRA": 10,                         # basis points
    "UFR": 0.033,
    "alpha": 0.11,
    "dlt": {t: 1 for t in rates},      # DLT flags; other maturities count as 0
    "LLFRweightsIn": {20: 0.33, 25: 0.12, 30: 0.48, 40: 0.04, 50: 0.03},
    "Rate": rates,                     # par swap rates, or zero rates for government bonds
    "MAX_MATURITY": 150,
}
validate_inputs(inputs)                # raises ValueError listing every problem
res = calculate_sheet(**inputs)

print(res["FSP"], res["LLFR"])         # 20 0.03224887127830391
print(res["BASIC_RFR"][60])            # 0.03266  (annually compounded, rounded to 5 decimals)

The volatility adjustment and the interest rate shocks build on inputs and res:

from eiopa_rfr import VAInputs, calculate_cssr_sheet, calculate_va_sheet, validate_va_inputs

va = VAInputs(RCS_CU=0.01, RCS_CO=None, DTTA=None, MACROVA_SELECTED=False, USA=None,
              MVFI=500000, MVFI_NOTIONAL=490000, BEL=870000, BEL_NOTIONAL=850000)
validate_va_inputs(va)
cssr = calculate_cssr_sheet(inputs, res, va)
va_res = calculate_va_sheet(inputs, res, va, cssr["CSSR"])
print(cssr["CSSR"], va_res["TOTAL_VA"])   # 0.5 0.0043
print(va_res["VA_CURVE"][20])             # 0.03653

calculate_irr_up_sheet and calculate_irr_down_sheet give the shocked curves, and read_inputs, read_va_inputs and read_irr_inputs read the input files of a folder. Pass the folder explicitly: the defaults are the repository's Input and Output folders. Using the algorithm in your own code describes every input and output.

Documentation

License

MIT. To cite the package, see CITATION.cff.

Metadata

Release files for eiopa-rfr 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eiopa-rfr 0.1.0
File Size Uploaded Provenance Actions
eiopa_rfr-0.1.0.tar.gz 42.5 kB Without provenance Details for eiopa_rfr-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eiopa-rfr 0.1.0
File Interpreter ABI Platform Actions
eiopa_rfr-0.1.0-py3-none-any.whl Python 3 none any Details for eiopa_rfr-0.1.0-py3-none-any.whl

Total release size: 81.0 kB

Release files / eiopa_rfr-0.1.0.tar.gz

Download URL eiopa_rfr-0.1.0.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e42bd7fb4c0b332ea262e6fc44ac0202a19a5a50fb38886460aba2be231eb778
BLAKE2b-256 checksum
How to use checksums
975e7f18fdf8f36b52373926f145de5f7b57ef18a304f66be6f934fc0c19c0e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / eiopa_rfr-0.1.0-py3-none-any.whl

Download URL eiopa_rfr-0.1.0-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79bd080f243f2212a173ad2d1c0280dfde7d816e2f71b0528c699f2bcde37f32
BLAKE2b-256 checksum
How to use checksums
c645cb2d2215954832d2341c698bef3477611fbdc981750f50cb4eea490b7571
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for eiopa-rfr 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page