diff --git a/MarketDataLib/Utility/DateGenerator.cs b/MarketDataLib/Utility/DateGenerator.cs index 75f99f4..b5b6d10 100644 --- a/MarketDataLib/Utility/DateGenerator.cs +++ b/MarketDataLib/Utility/DateGenerator.cs @@ -342,6 +342,30 @@ namespace MarketData.Utils } return histDates; } + /// + /// Generates dates into the future respecting weekens and market holidays + /// + /// + /// + /// + public List GenerateFutureDates(DateTime startDate, int dayCount) + { + List futureDates=new List(); + DateTime futureDate; + TimeSpan singleDay; + + startDate = startDate.Date; + futureDate=startDate; + if(dayCount<0)singleDay=new TimeSpan(1,0,0,0); + else singleDay=new TimeSpan(1,0,0,0); + dayCount=dayCount<0?-dayCount:dayCount; + while(futureDates.Count