|
From: <da...@el...> - 2021-10-12 12:11:43
|
Hi again, In the cold light of morning, I tracked down Quote.value() to get the clean price from the BondHelper, so I am unblocked (for now). Best wishes, David From: da...@el... <da...@el...> Sent: Monday, 11 October 2021 22:19 To: qua...@li... Subject: [Quantlib-users] Getting yield from a BondHelper in Python Hi everyone, This may seem like a simple question, but it's late and my brain seems to have stopped. In Python, I have a list of FixedRateBondHelpers which store everything I need about a bond, including its price as the first parameter ql.QuoteHandle(ql.SimpleQuote(px)). I am passing these between sections of code. I am just trying to get the yield of the bond, for a given day count, compounding and frequency. The Helper has everything needed to calculate the yield, but the function call is proving elusive. Do I need to separately extract the original price from the Helper? If so, how? I've tried FixedRateBondHelper.quote() but I get an equally impenetrable quote handle object back. Thanks David Sansom |