public void TestCoordinatorAllData() { // Make the swap double rate = 0.07; bool payFixed = true; double notional = 1000000; Date startDate = new Date(2016, 9, 17); Tenor tenor = Tenor.Years(5); IRSwap swap = IRSwap.CreateZARSwap(rate, payFixed, notional, startDate, tenor); // Set up the model Date valueDate = new Date(2016, 9, 17); double a = 0.05; double vol = 0.01; double flatCurveRate = 0.07; HullWhite1F hullWiteSim = new HullWhite1F(Currency.ZAR, a, vol, flatCurveRate, flatCurveRate, valueDate); hullWiteSim.AddForecast(FloatingIndex.JIBAR3M); Coordinator coordinator = new Coordinator(hullWiteSim, new List <Simulator>(), 5000); Date date = valueDate; Date endDate = valueDate.AddTenor(tenor); List <Date> fwdValueDates = new List <Date>(); while (date < endDate) { fwdValueDates.Add(date); date = date.AddTenor(Tenor.Days(10)); } ResultStore allDetails = coordinator.GetValuePaths(new Product[] { swap }, valueDate, fwdValueDates.ToArray()); allDetails.GetNames(); }
public static object[,] GetAvailableResults( [ExcelArgument(Description = "The results object as returned by call to another QuantSA function")] ResultStore resultStore) { var temp = resultStore.GetNames(); var column = new object[temp.Length, 1]; for (var i = 0; i < temp.Length; i++) { column[i, 0] = temp[i]; } return(column); }