sonntagsgesicht/dcf ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python library for discounted cashflows that feels easy to use in finance work.

I want to be able to create business date schedules, build payment plans for loans, and then turn those into cashflow lists I can add together and value. It should handle simple things like fixed cashflows, amortization, outstanding balances, interest based on a fixed rate, and also floating interest from a forward curve. I’d like a clean way to calculate present value from a discount curve, and it should work nicely with date based schedules and quarterly or monthly payments.

Please include a few examples like an annuity loan with principal, redemption, and interest legs, plus a floating rate version. Make it feel like a real small finance toolkit, with good defaults and readable output. If you need to check current docs for related date or curve helpers, look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab