Esempio n. 1
0
 public static LoanFloatingRate CreateLoanFloatingRate([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 reference index on which the floating flows are based.")] FloatingIndex floatingIndex,
                                                       [ExcelArgument(Description = "The spread that will be added to the floating index.")] double floatingSpread)
 {
     return(LoanFloatingRate.CreateSimple(balanceDates, balanceAmounts, floatingIndex, floatingSpread, currency));
 }
Esempio n. 2
0
 public static object _CreateLoanFloatingRate(string objectName,
                                              object[,] currency,
                                              object[,] balanceDates,
                                              object[,] balanceAmounts,
                                              object[,] floatingIndex,
                                              object[,] floatingSpread)
 {
     try
     {
         Currency         _currency       = XU.GetCurrency0D(currency, "currency");
         Date[]           _balanceDates   = XU.GetDate1D(balanceDates, "balanceDates");
         Double[]         _balanceAmounts = XU.GetDouble1D(balanceAmounts, "balanceAmounts");
         FloatingIndex    _floatingIndex  = XU.GetFloatingIndex0D(floatingIndex, "floatingIndex");
         Double           _floatingSpread = XU.GetDouble0D(floatingSpread, "floatingSpread");
         LoanFloatingRate _result         = XLRates.CreateLoanFloatingRate(_currency, _balanceDates, _balanceAmounts, _floatingIndex, _floatingSpread);
         return(XU.AddObject(objectName, _result));
     }
     catch (Exception e)
     {
         return(XU.Error0D(e));
     }
 }