Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: curve failure out of bounds? #134

Open
attack68 opened this issue Mar 22, 2024 · 0 comments
Open

BUG: curve failure out of bounds? #134

attack68 opened this issue Mar 22, 2024 · 0 comments
Labels

Comments

@attack68
Copy link
Owner

dates = [
     dt(2000, 1, 3),
     dt(2001, 1, 3),
     dt(2002, 1, 3),
     dt(2003, 1, 3),
     dt(2004, 1, 3),
     dt(2005, 1, 3),
     dt(2006, 1, 3),
     dt(2007, 1, 3),
     dt(2008, 1, 3),
     dt(2009, 1, 3),
     dt(2010, 1, 3),
     dt(2012, 1, 3),
     dt(2015, 1, 3),
     dt(2020, 1, 3),
     dt(2025, 1, 3),
     dt(2030, 1, 3),
     dt(2035, 1, 3),
     dt(2040, 1, 3),
     dt(2050, 1, 3),
]
curve = Curve(
    nodes={_: 1.0 for _ in dates},
    t=[dt(2000, 1, 3)] * 3 + dates[:-1] + [dt(2050, 1, 11)] * 4
)
solver = Solver(
    curves=[curve],
    instruments=[
        IRS(dt(2000, 1, 3), _, spec="gbp_irs", curves=curve) for _ in dates[1:]
    ],
    s=[1.0 + _ / 25 for _ in range(18)]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant