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

Additional functionality tests for SmithWilson curves #49

Open
alecloudenback opened this issue Oct 30, 2021 · 2 comments
Open

Additional functionality tests for SmithWilson curves #49

alecloudenback opened this issue Oct 30, 2021 · 2 comments

Comments

@alecloudenback
Copy link
Member

alecloudenback commented Oct 30, 2021

To test/extend API:

Q: Are the curves composable (is + defined), like in the quickstart in README
A: Yes, e.g.:

julia> discount(sw_swq,1)
1.0208956877292932

julia> discount(sw_swq+ Yields.Constant(0.05),1)
0.9713151170101941

Q: How are the yields in the quote instruments defined? Unsure if they are coninuous/periodic compounded.

  • Either way, need to document default assumption
  • Allow for alternate construction, e.g. with Periodic(0.03,2) (ie bond equivalent yields)
@alecloudenback
Copy link
Member Author

cc @kasperrisager

@kasperrisager
Copy link
Contributor

Q1: I'd say Smith-Wilson curves are composable, and I think they would currently just fall back to AbstractYield behaviour. But the current definition of +/- take place in Periodic(1) rate convention, and that's not very natural for Smith-Wilson, Continuous() would be more natural. Like it would if you add a discounting function and a survival probability function. So I'm really not sure what the best way to do +/- for SW is... Maybe it should be illegal to add two AbstractYields, and instead you have to do AbstractYield + AbstractSpread where the AbstractSpread defines which convention to do the addition in? (That's not a real suggestion, haven't thought it through).

Q2: I implicitly thought that the rate and interest arguments would be Periodic(frequency). That convention is implicit in cashflows. I tend to think this is the only natural choice (so we should just document). Would there be a meaningful quoting convention where this is not the case, like biannual payments quoted in annual compounding?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants