Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions financepy/products/bonds/bond.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,8 +1235,7 @@ def yield_to_maturity(
maxiter=50,
)
except RuntimeError:
print(f"Warning: YTM calculation did not converge for price {
dirty_price}")
print(f"Warning: YTM calculation did not converge for price {dirty_price}")
ytm = np.nan

ytms.append(ytm)
Expand Down Expand Up @@ -1546,8 +1545,7 @@ def option_adjusted_spread(

oass.append(oas)
except RuntimeError:
print(f"Warning: OAS calculation did not converge for price {
dirty_price}")
print(f"Warning: OAS calculation did not converge for price {dirty_price}")
oass.append(np.nan)

if len(oass) == 1:
Expand Down