sonntagsgesicht/yieldcurves ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python library for financial yield curves.

I want to be able to create a curve from time points and rates, interpolate between them, and then ask for things like zero rates and discount factors. It should also work with actual dates, not just numbers, so I can create a curve from a start date and use normal date objects to get rates and discount factors between dates. If it makes sense, support convenient schedule building for banking style date flows too, and use business day aware dates when available.

Please keep the public API simple and readable, with a few clear classes or helpers that match how someone in finance would actually use it. Add enough examples and tests so I can see it working right away. If you need current package or date handling docs, look them up online and use sensible modern Python patterns.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab