# 7josh7/quantlib-irc-lab architecture

> Architecture diagram of the GitHub repository 7josh7/quantlib-irc-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/7josh7/quantlib-irc-lab
- Repository: https://github.com/7josh7/quantlib-irc-lab
- Video tour (about a minute): https://gitdiagram.com/7josh7/quantlib-irc-lab/video

## Overview

This is a learning-oriented C++ fixed-income analytics engine, not a production risk system. Its main workflow reads pinned SOFR quotes and fixings, bootstraps a discount curve, and uses that curve for swap pricing and quote DV01; curve output and QuantLib comparisons are documented capabilities. The graph also includes the mini-pricer and numerical building blocks. Source excerpts establish several internal calls; README statements support the documented executable workflow. Other connections are omitted where the available excerpts do not establish them.

Main entry points: [`src/curves/sofr_bootstrapper.cpp`](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/sofr_bootstrapper.cpp) (SOFR Bootstrapper), [`examples/02_sofr_curve_bootstrap.cpp`](https://github.com/7josh7/quantlib-irc-lab/blob/main/examples/02_sofr_curve_bootstrap.cpp) (Hand-Rolled Runner), [`src/curves/piecewise_log_linear_curve.cpp`](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/piecewise_log_linear_curve.cpp) (Log-Linear Curve), [`src/rates/vanilla_swap.cpp`](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/vanilla_swap.cpp) (Vanilla Swap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Market Inputs"]
  node_handrun["Hand-Rolled Runner"]
  node_quotes["SOFR Quotes"]
  node_fixings["SOFR Fixings"]
  node_marketio["Market Data Parser<br/>[market_data_io.cpp]"]
  node_instruments["Curve Instruments"]
end

subgraph group_curve["Curve Construction"]
  node_bootstrap["SOFR Bootstrapper"]
  node_curve["Log-Linear Curve"]
  node_curveio["Curve CSV Output<br/>[curve_io.cpp]"]
end

subgraph group_pricing["Swap Pricing"]
  node_periods["Coupon Periods<br/>[coupon_period.cpp]"]
  node_accrual["Rate Accrual<br/>[rate_accrual.cpp]"]
  node_fixed["Fixed Leg<br/>[fixed_leg.cpp]"]
  node_floating["Floating Leg<br/>[floating_leg.cpp]"]
  node_swap["Vanilla Swap<br/>[vanilla_swap.cpp]"]
end

subgraph group_risk["Risk Analytics"]
  node_dv01["Direct Quote DV01<br/>[dv01.cpp]"]
  node_jacobian["Calibration Jacobian<br/>[dv01.cpp]"]
end

subgraph group_foundation["Numerical Core"]
  node_solver["Bracketed Solver"]
  node_interpolator["Flat Interpolator"]
  node_flatcurve["Flat Discount Curve<br/>[flat_curve.cpp]"]
  node_yield["Yield Curve Interface<br/>[yield_curve.hpp]"]
end

node_user(("Analyst"))

node_user -->|"runs"| node_handrun
node_quotes -->|"supplies quotes"| node_handrun
node_fixings -->|"supplies fixings"| node_handrun
node_handrun -.->|"parses inputs"| node_marketio
node_marketio -->|"constructs data"| node_instruments
node_bootstrap -->|"solves roots"| node_solver
node_bootstrap -->|"builds periods"| node_periods
node_bootstrap -->|"uses accrual"| node_accrual
node_bootstrap -->|"reprices OIS"| node_swap
node_bootstrap -->|"builds curve"| node_curve
node_curve -->|"interpolates"| node_interpolator
node_curve -->|"implements"| node_yield
node_flatcurve -->|"implements"| node_yield
node_fixed -->|"prices periods"| node_periods
node_floating -->|"prices periods"| node_periods
node_floating -->|"computes forwards"| node_accrual
node_swap -->|"uses leg"| node_fixed
node_swap -->|"uses leg"| node_floating
node_dv01 -->|"rebootstraps bumps"| node_bootstrap
node_jacobian -->|"samples quotes"| node_bootstrap
node_jacobian -->|"bumps nodes"| node_curve
node_handrun -.->|"writes curve"| node_curveio

click node_handrun "https://github.com/7josh7/quantlib-irc-lab/blob/main/examples/02_sofr_curve_bootstrap.cpp"
click node_quotes "https://github.com/7josh7/quantlib-irc-lab/blob/main/data/market/sofr_quotes_2026-01-15.csv"
click node_fixings "https://github.com/7josh7/quantlib-irc-lab/blob/main/data/market/sofr_fixings_2025-12-17_2026-01-14.csv"
click node_marketio "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/market_data_io.cpp"
click node_instruments "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/curve_instruments.cpp"
click node_bootstrap "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/sofr_bootstrapper.cpp"
click node_solver "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/core/bracketed_bisection.hpp"
click node_curve "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/piecewise_log_linear_curve.cpp"
click node_interpolator "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/core/linear_interpolator.cpp"
click node_curveio "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/curve_io.cpp"
click node_periods "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/coupon_period.cpp"
click node_accrual "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/rate_accrual.cpp"
click node_fixed "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/fixed_leg.cpp"
click node_floating "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/floating_leg.cpp"
click node_swap "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/vanilla_swap.cpp"
click node_flatcurve "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/core/flat_curve.cpp"
click node_yield "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/core/yield_curve.hpp"
click node_dv01 "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/risk/dv01.cpp"
click node_jacobian "https://github.com/7josh7/quantlib-irc-lab/blob/main/src/risk/dv01.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_handrun,node_quotes,node_fixings,node_marketio,node_instruments toneBlue
class node_bootstrap,node_curve,node_curveio toneAmber
class node_periods,node_accrual,node_fixed,node_floating,node_swap toneMint
class node_dv01,node_jacobian toneRose
class node_solver,node_interpolator,node_flatcurve,node_yield,node_user toneIndigo
```

## Components

### Market Inputs

- [Hand-Rolled Runner](https://github.com/7josh7/quantlib-irc-lab/blob/main/examples/02_sofr_curve_bootstrap.cpp): `examples/02_sofr_curve_bootstrap.cpp`
- [SOFR Quotes](https://github.com/7josh7/quantlib-irc-lab/blob/main/data/market/sofr_quotes_2026-01-15.csv): `data/market/sofr_quotes_2026-01-15.csv`
- [SOFR Fixings](https://github.com/7josh7/quantlib-irc-lab/blob/main/data/market/sofr_fixings_2025-12-17_2026-01-14.csv): `data/market/sofr_fixings_2025-12-17_2026-01-14.csv`
- [Market Data Parser](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/market_data_io.cpp): `src/curves/market_data_io.cpp`
- [Curve Instruments](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/curve_instruments.cpp): `src/curves/curve_instruments.cpp`

### Curve Construction

- [SOFR Bootstrapper](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/sofr_bootstrapper.cpp): `src/curves/sofr_bootstrapper.cpp`
- [Log-Linear Curve](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/piecewise_log_linear_curve.cpp): `src/curves/piecewise_log_linear_curve.cpp`
- [Curve CSV Output](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/curves/curve_io.cpp): `src/curves/curve_io.cpp`

### Swap Pricing

- [Coupon Periods](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/coupon_period.cpp): `src/rates/coupon_period.cpp`
- [Rate Accrual](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/rate_accrual.cpp): `src/rates/rate_accrual.cpp`
- [Fixed Leg](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/fixed_leg.cpp): `src/rates/fixed_leg.cpp`
- [Floating Leg](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/floating_leg.cpp): `src/rates/floating_leg.cpp`
- [Vanilla Swap](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/rates/vanilla_swap.cpp): `src/rates/vanilla_swap.cpp`

### Risk Analytics

- [Direct Quote DV01](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/risk/dv01.cpp): `src/risk/dv01.cpp`
- [Calibration Jacobian](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/risk/dv01.cpp): `src/risk/dv01.cpp`

### Numerical Core

- [Bracketed Solver](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/core/bracketed_bisection.hpp): `src/core/bracketed_bisection.hpp`
- [Flat Interpolator](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/core/linear_interpolator.cpp): `src/core/linear_interpolator.cpp`
- [Flat Discount Curve](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/core/flat_curve.cpp): `src/core/flat_curve.cpp`
- [Yield Curve Interface](https://github.com/7josh7/quantlib-irc-lab/blob/main/src/core/yield_curve.hpp): `src/core/yield_curve.hpp`

### Other components

- **Analyst**

## Connections

- Analyst → Hand-Rolled Runner: runs (evidence: `README.md`)
- SOFR Quotes → Hand-Rolled Runner: supplies quotes (evidence: `README.md`)
- SOFR Fixings → Hand-Rolled Runner: supplies fixings (evidence: `README.md`)
- Hand-Rolled Runner → Market Data Parser: parses inputs
- Market Data Parser → Curve Instruments: constructs data
- SOFR Bootstrapper → Bracketed Solver: solves roots (evidence: `src/curves/sofr_bootstrapper.cpp`)
- SOFR Bootstrapper → Coupon Periods: builds periods (evidence: `src/curves/sofr_bootstrapper.cpp`)
- SOFR Bootstrapper → Rate Accrual: uses accrual (evidence: `src/curves/sofr_bootstrapper.cpp`)
- SOFR Bootstrapper → Vanilla Swap: reprices OIS (evidence: `src/curves/sofr_bootstrapper.cpp`)
- SOFR Bootstrapper → Log-Linear Curve: builds curve (evidence: `src/curves/sofr_bootstrapper.cpp`)
- Log-Linear Curve → Flat Interpolator: interpolates
- Log-Linear Curve → Yield Curve Interface: implements
- Flat Discount Curve → Yield Curve Interface: implements
- Fixed Leg → Coupon Periods: prices periods
- Floating Leg → Coupon Periods: prices periods
- Floating Leg → Rate Accrual: computes forwards
- Vanilla Swap → Fixed Leg: uses leg
- Vanilla Swap → Floating Leg: uses leg
- Direct Quote DV01 → SOFR Bootstrapper: rebootstraps bumps (evidence: `src/risk/dv01.cpp`)
- Calibration Jacobian → SOFR Bootstrapper: samples quotes (evidence: `src/risk/dv01.cpp`)
- Calibration Jacobian → Log-Linear Curve: bumps nodes (evidence: `src/risk/dv01.cpp`)
- Hand-Rolled Runner → Curve CSV Output: writes curve
