Skip to content

Commit

Permalink
adj rate cap to be backward compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbean committed Nov 18, 2023
1 parent 9f85c7b commit 1bea5fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion absbox/deal.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ def mkDeal(x:dict,preCheck=True):
,collection
,liqFacility
,rateSwap
,rateCap
,currencySwap
,trigger
,status
,None
,ledgers
,rateCap
)

errors, warnings = ([], [])
Expand Down
5 changes: 2 additions & 3 deletions absbox/local/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,14 @@ def mkRateSwap(x):
def mkRateCap(x):
match x:
case {"index": index, "strike": strike, "base": base, "start": sd
, "end": ed, "settleDates": dp, "balance": bal, "rate": r, **p}:
, "end": ed, "settleDates": dp, "rate": r, **p}:
return {"rcIndex": index,
"rcStrikeRate": mkTs(strike),
"rcStrikeRate": mkTs("IRateCurve", strike),
"rcNotional": mkRsBase(base),
"rcStartDate": sd,
"rcSettleDates": mkDatePattern(dp),
"rcEndDate": ed,
"rcReceivingRate": r,
"rcRefBalance": bal,
"rcLastStlDate": p.get("lastSettleDate", None),
"rcNetCash": p.get("netcash", 0),
"rcStmt": p.get("stmt", None)
Expand Down
1 change: 1 addition & 0 deletions absbox/local/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def read(resp):
, 'accounts': ('accStmt' , english_acc_flow_fields_d , "account")
, 'liqProvider': ('liqStmt', english_liq_flow_fields_d, "")
, 'rateSwap': ('rsStmt', english_rs_flow_fields_d, "")
, 'rateCap': ('rcStmt', english_rs_flow_fields_d, "")
, 'ledgers': ('ledgStmt', english_ledger_flow_fields_d, "")
}
deal_content = resp[0]['contents']
Expand Down

0 comments on commit 1bea5fc

Please sign in to comment.