FinancePy icon indicating copy to clipboard operation
FinancePy copied to clipboard

PV01 of the interest rate swap does not match the results of the financial terminal.

Open piper0124 opened this issue 8 months ago • 1 comments

I recalculated the values of IRS and compared the results with those from a financial terminal. The swap value and the swap rate were nearly identical to the terminal's outputs, but the PV01 was 100 times smaller. Subsequently, I calculated the DV01, and the result closely matched the terminal's data. I think that PV01 and DV01 should be of the same magnitude(?), it appears there may be an inconsistency in the calculation or interpretation of PV01? THANKS.

General Information: OBJECT TYPE: SwapFixedLeg START DATE: 12-MAY-2025 TERMINATION DATE: 12-MAY-2028 MATURITY DATE: 12-MAY-2028 NOTIONAL: 1000000 PRINCIPAL: 0.0 LEG TYPE: SwapTypes.PAY COUPON: 0.05 FREQUENCY: FrequencyTypes.QUARTERLY DAY COUNT: DayCountTypes.ACT_365F CALENDAR: CalendarTypes.TARGET BUS DAY ADJUST: BusDayAdjustTypes.FOLLOWING DATE GEN TYPE: DateGenRuleTypes.BACKWARD

OBJECT TYPE: SwapFloatLeg START DATE: 12-MAY-2025 TERMINATION DATE: 12-MAY-2028 MATURITY DATE: 12-MAY-2028 NOTIONAL: 1000000 SWAP TYPE: SwapTypes.RECEIVE SPREAD (BPS): 0.0 FREQUENCY: FrequencyTypes.QUARTERLY DAY COUNT: DayCountTypes.ACT_365F CALENDAR: CalendarTypes.TARGET BUS DAY ADJUST: BusDayAdjustTypes.FOLLOWING DATE GEN TYPE: DateGenRuleTypes.BACKWARD

RESULTS Terminal financepy swap.value -105,001.3000 -105,026.4100 swap_rate 1.4208 1.4191 pv01 -293.3700 2.9328 DV01 310.2800 310.3058

20250520update: I have compared the calculations for the same interest rate swap in financepy, Finance Terminal, and a book (Bond Math The Theory Behind the Formulas by Donald J. Smith), and would like to add a duration, DV01, to the interest rate swap in financepy, and further check PV01's calculations (I want to revise PV01 as well if they are as described above), is that ok?

By the way, did you write the book ‘Modelling Single-name and Multi-name Credit Derivatives’? MY greatest respect:)

piper0124 avatar May 13 '25 06:05 piper0124

Hi - I will be back on this in a 3-4 weeks. If you need it sooner, consider implementing it yourself with a pull request. Thanks

PS Yes that was me :-)

domokane avatar May 22 '25 17:05 domokane

Hi - I have always viewed pv01 as the value of $1 paid as an annuity on the swap fixed leg. So for a 5 year swap it is about 4.5. My definition is not the same as yours. When you say "terminal" do you mean Bloomberg ?

domokane avatar Aug 11 '25 14:08 domokane

If you can provide me with a screenshot of the terminal then I will reopen this.

domokane avatar Aug 31 '25 10:08 domokane