public static object _CreateCDS(string objectName, object[,] refEntity, object[,] ccy, object[,] paymentDates, object[,] notionals, object[,] rates, object[,] accrualFractions, object[,] boughtProtection) { try { ReferenceEntity _refEntity = XU.GetReferenceEntity0D(refEntity, "refEntity"); Currency _ccy = XU.GetCurrency0D(ccy, "ccy"); Date[] _paymentDates = XU.GetDate1D(paymentDates, "paymentDates"); Double[] _notionals = XU.GetDouble1D(notionals, "notionals"); Double[] _rates = XU.GetDouble1D(rates, "rates"); Double[] _accrualFractions = XU.GetDouble1D(accrualFractions, "accrualFractions"); Boolean _boughtProtection = XU.GetBoolean0D(boughtProtection, "boughtProtection"); CDS _result = XLCredit.CreateCDS(_refEntity, _ccy, _paymentDates, _notionals, _rates, _accrualFractions, _boughtProtection); return(XU.AddObject(objectName, _result)); } catch (Exception e) { return(XU.Error0D(e)); } }
public static object _CreateHazardCurve(string objectName, object[,] referenceEntity, object[,] anchorDate, object[,] dates, object[,] hazardRates) { try { ReferenceEntity _referenceEntity = XU.GetReferenceEntity0D(referenceEntity, "referenceEntity"); Date _anchorDate = XU.GetDate0D(anchorDate, "anchorDate"); Date[] _dates = XU.GetDate1D(dates, "dates"); Double[] _hazardRates = XU.GetDouble1D(hazardRates, "hazardRates"); HazardCurve _result = XLCredit.CreateHazardCurve(_referenceEntity, _anchorDate, _dates, _hazardRates); return(XU.AddObject(objectName, _result)); } catch (Exception e) { return(XU.Error0D(e)); } }