public static LoanFixedRate CreateLoanFixedRate([ExcelArgument(Description = "The currency of the cashflows.")] Currency currency, [ExcelArgument(Description = "The dates on which the loan balances are known. All dates other than the first one will be assumed to also be cashflow dates.")] Date[] balanceDates, [ExcelArgument(Description = "The notionals on which the payments are based.")] double[] balanceAmounts, [ExcelArgument(Description = "The simple rates that are paid at each payment date.")] double fixedRate) { return(LoanFixedRate.CreateSimple(balanceDates, balanceAmounts, fixedRate, currency)); }
public static object _CreateLoanFixedRate(string objectName, object[,] currency, object[,] balanceDates, object[,] balanceAmounts, object[,] fixedRate) { try { Currency _currency = XU.GetCurrency0D(currency, "currency"); Date[] _balanceDates = XU.GetDate1D(balanceDates, "balanceDates"); Double[] _balanceAmounts = XU.GetDouble1D(balanceAmounts, "balanceAmounts"); Double _fixedRate = XU.GetDouble0D(fixedRate, "fixedRate"); LoanFixedRate _result = XLRates.CreateLoanFixedRate(_currency, _balanceDates, _balanceAmounts, _fixedRate); return(XU.AddObject(objectName, _result)); } catch (Exception e) { return(XU.Error0D(e)); } }