-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Hey,
I'm trying get the NPV for a CAD swap. The CORRA default specs ('cad_irs', 'cad_irs_le_1y') aren't available as default keys in the code. They are written in the documentation though.
Code (similar to Bloomberg example given in cookbook):
`ref_args = dict(effective=dt(2024, 7, 31), spec = 'cad_irs', curves = 'corra'
ref = Curve(
id = "corra",
convention = "ActAct",
calendar = "tro",
modifiers = "MF",
interpolation = 'log_linear',
nodes = {
**{dt(2024, 7, 29):1.0},
**{_:1.0 for _ in data["Termination"]},
}
)
solver = Solver(
curves = [ref],
instruments = IRS(termination = _, **ref_args) for _in data['Termination']],
....`
Error:
The traceback leads to error in the instrument argument which is caused due to the ref_args having the cad_irs spec. The error raised is:
ValueError: Given 'spec', 'cad_irs', cannot be found in defaults.