Skip to main content

swap_builder_on_overnight_template

Function swap_builder_on_overnight_template 

pub fn swap_builder_on_overnight_template(
    effective: NaiveDate,
    termination: NaiveDate,
    template: &str,
) -> Result<ProductBuilder, CurveError>
Expand description

A swap builder from a named template, for the markets where an index alone does not determine the swap.

USD EFFR is the case that forces this: USD-EFFR-OIS compounds its daily prints and USD-EFFR-AVERAGED-OIS averages them, over the same index and the same conventions in every other respect. swap_builder_on_index cannot choose between them — nothing about the index says which — so a caller who wants the second one names it.

§Errors

CurveError::UnknownIndex if template is not a registered overnight swap template — a vanilla template is reached through swap_builder_on_index — listing exactly the codes this accepts.