//------------------------------------------------------------------------- public virtual void test_builder_notEnoughData() { assertThrowsIllegalArg(() => IborIborSwapTemplate.builder().tenor(TENOR_2Y).build()); }
/// <summary> /// Obtains a template based on the specified period, tenor and convention. /// <para> /// The period from the spot date to the start date is specified. /// The tenor from the start date to the end date is also specified. /// /// </para> /// </summary> /// <param name="periodToStart"> the period between the spot date and the start date </param> /// <param name="tenor"> the tenor of the swap </param> /// <param name="convention"> the market convention </param> /// <returns> the template </returns> public static IborIborSwapTemplate of(Period periodToStart, Tenor tenor, IborIborSwapConvention convention) { return(IborIborSwapTemplate.builder().periodToStart(periodToStart).tenor(tenor).convention(convention).build()); }