/// <summary> /// Get the zero rate for a given period on a given curve. /// </summary> /// <param name="mktName">The name of the market.</param> /// <param name="curveName">The name of the yield curve.</param> /// <param name="startDate">The start date of the calculation period, i.e. 2017-01-03.</param> /// <param name="endDate">The end date of the calculation period, i.e. 2017-01-13.</param> /// <returns></returns> public static double GetZeroRate(string mktName, string curveName, string startDate, string endDate) { //var qdpMarket = XlManager.GetXlMarket(mktName).QdpMarket; //var yieldcurve = qdpMarket.GetData<CurveData>(curveName).YieldCurve; var yieldcurve = XlManager.GetPrebuildQdpMarket(mktName).YieldCurves[curveName]; return(yieldcurve.ZeroRate(startDate.ToDate(), endDate.ToDate())); }