Esempio n. 1
0
        private void SetFraDates(ICoreCache cache, string nameSpace, RateCurve initialCurve, IEnumerable <int> instrumentIndicies)

        {
            FraStartDates = new List <DateTime>();
            FraEndDates   = new List <DateTime>();
            foreach (int i in instrumentIndicies)
            {
                CheckDepositInstrument(i);
                var      rateAssetController = (PriceableDeposit)initialCurve.PriceableRateAssets[i];
                DateTime startDate           = CalculateFraStartTime(rateAssetController);
                FraStartDates.Add(startDate);
                var deposit = rateAssetController;
                //BusinessDayConventionEnum adjustment = deposit.BusinessDayAdjustments.businessDayConvention;
                BusinessCenters bs       = deposit.SpotDateOffset.businessCenters;
                var             calendar = BusinessCenterHelper.ToBusinessCalendar(cache, bs, nameSpace);
                DateTime        endDate  = CalculateFraEndTime(calendar, rateAssetController);
                FraEndDates.Add(endDate);
            }
        }
Esempio n. 2
0
 internal static string BusinessCentersAsString(BusinessCenters businessCenters)
 {
     return(string.Join("-", businessCenters.businessCenter.Select(bc => bc.Value).ToArray()));
 }