Skip to content

Commit

Permalink
loose loop num
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbean committed Jul 11, 2023
1 parent 825ee3a commit 73c6c7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Liability.hs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ weightAverageBalance sd ed b@(Bond _ _ _ _ currentBalance _ _ _ _ _ _ stmt)
calcZspread :: (Rational,Date) -> Int -> (Float, (Rational,Rational),Rational) -> Bond -> Ts -> Spread
calcZspread _ _ _ b@Bond{bndStmt = Nothing} _ = error "No Cashflow for bond"
calcZspread (tradePrice,priceDay) count (level ,(lastSpd,lastSpd2),spd) b@Bond{bndStmt = Just (S.Statement txns), bndOriginInfo = bInfo} riskFreeCurve
| count >= 10000 = fromRational spd -- error "Failed to find Z spread with 10000 times try"
| count >= 10 = fromRational spd -- error "Failed to find Z spread with 10000 times try"
| otherwise =
let
(_,futureTxns) = splitByDate txns priceDay EqToRight
Expand Down

0 comments on commit 73c6c7b

Please sign in to comment.