How ahgperrin/pycurve works
Project type and purpose
• PyCurve is a Python library (no frontend/backend) providing yield curve tools: core objects (Curve, Simulation), interpolation methods (linear, cubic), parametric yield‐curve models (Nelson‐Siegel, Svensson, Bjork‐Christensen and augmented), and stochastic short‐rate models (Vasicek, Hull–White).
• It is intended to be imported by user scripts to build, analyze, plot, and simulate yield curves.
File structure
• Top-level: setup.py, README.md, LICENSE, MANIFEST.in, example_screenshot/, and two directories:
• src/PyCurve/ – main package modules
• test/ – unit tests for each module
• src/PyCurve/ contains:
• curve.py, simulation.py – core objects
• linear.py, cubic.py – interpolation modules
• nelson_siegel.py, svensson_nelson_siegel.py – parametric NS models
• bjork_christensen.py, bjork_christensen_augmented.py – alternative parametric models
• actuarial_implementation.py – (likely implementation helpers)
• vasicek.py, hull_white.py – stochastic simulation models
README for additional insights
• Dependencies: numpy, scipy.interpolate, scipy.optimize, matplotlib for plotting.
• Examples show the typical flow: create a Curve → pass it to an interpolation or model class → call methods (d_rate, df_t, forward_rate, calibrate, simulate_paths) → use plotting helpers.