Fix the monthly runs when running the month end process on the weekend... was picking the TradeDate as a weekend date.
Now if we run the model over the weekend the TradeDate and AnalysisDate will the the prior business day.
This commit is contained in:
@@ -334,8 +334,9 @@ namespace MarketData.Generator.CMMomentum
|
||||
CMSessionParams sessionParams = null;
|
||||
|
||||
Cycle = 0;
|
||||
if (Utility.IsEpoch(AnalysisDate)) AnalysisDate = dateGenerator.GetPrevBusinessDay(Today());
|
||||
else AnalysisDate = dateGenerator.GetPrevBusinessDay(AnalysisDate);
|
||||
if (AnalysisDate.Date > Today().Date) return backTestResult;
|
||||
if (Utility.IsEpoch(AnalysisDate)) AnalysisDate = Today();
|
||||
TradeDate = dateGenerator.GetCurrentMonthEnd(StartDate);
|
||||
if (TradeDate > AnalysisDate)
|
||||
{
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace MarketData.Generator.Momentum
|
||||
|
||||
Cycle=0;
|
||||
if(AnalysisDate.Date>Today().Date)return backTestResult;
|
||||
if(Utility.IsEpoch(AnalysisDate))AnalysisDate=Today();
|
||||
if(Utility.IsEpoch(AnalysisDate))AnalysisDate=dateGenerator.GetPrevBusinessDay(Today());
|
||||
TradeDate=dateGenerator.GetCurrentMonthEnd(StartDate);
|
||||
if(TradeDate>AnalysisDate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user