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:
2025-05-31 12:09:43 -04:00
parent 15690ef2aa
commit e16034585e
2 changed files with 3 additions and 2 deletions

View File

@@ -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)
{

View File

@@ -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)
{