/// <summary> /// Initializes a new instance of the <see cref="CurveBase"/> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="cache">The cache.</param> /// <param name="nameSpace">The nameSpace</param> /// <param name="curveIdentifier">The curveIdentifier.</param> protected RateSpreadCurve(ILogger logger, ICoreCache cache, String nameSpace, PricingStructureIdentifier curveIdentifier) : base(logger, cache, nameSpace, curveIdentifier) { var properties = curveIdentifier.GetProperties(); PricingStructureData = new PricingStructureData(CurveType.Child, AssetClass.Rates, properties); }
/// <summary> /// Initializes a new instance of the <see cref="CurveBase"/> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="cache">The cache.</param> /// <param name="nameSpace">The nameSpace</param> /// <param name="curveIdentifier">The curveIdentifier.</param> protected CommodityCurve(ILogger logger, ICoreCache cache, String nameSpace, PricingStructureIdentifier curveIdentifier) : base(logger, cache, nameSpace, curveIdentifier) { var properties = curveIdentifier.GetProperties(); PricingStructureData = new PricingStructureData(CurveType.Parent, AssetClass.Commodity, properties); Tolerance = PropertyHelper.ExtractDoubleProperty("Tolerance", properties) ?? GetDefaultTolerance(Holder); }
/// <summary> /// Initializes a new instance of the <see cref="CapVolatilityCurve"/> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="cache">The cache.</param> /// <param name="nameSpace">The nameSpace</param> /// <param name="curveIdentifier">The curveIdentifier.</param> protected CapVolatilityCurve(ILogger logger, ICoreCache cache, String nameSpace, PricingStructureIdentifier curveIdentifier) : base(logger, cache, nameSpace, curveIdentifier) { BootstrapperName = "CapFloorBootstrapper"; UnderlyingInterpolatedCurve = "CapVolatilityCurve"; var properties = curveIdentifier.GetProperties(); PricingStructureData = new PricingStructureData(CurveType.Parent, AssetClass.Rates, properties); Tolerance = PropertyHelper.ExtractDoubleProperty("Tolerance", properties) ?? GetDefaultTolerance(Holder); var compoundingFrequency = properties.GetString("CompoundingFrequency", null); CompoundingFrequency = compoundingFrequency != null ? EnumHelper.Parse <CompoundingFrequencyEnum>(compoundingFrequency) : GetDefaultCompounding(Holder); }