From 1c44770d3e6683854a5d06ddace7790f046da0d6 Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 7 May 2025 19:57:56 -0400 Subject: [PATCH] Daily updates. Code cleanup --- MarketData/MarketData/Models/CMT20200817.TXT | 8 +++---- MarketData/MarketData/Models/MGSH20250331.TXT | 21 ++++++++++--------- .../Generator/CMTrend/CMTTrendGenerator.cs | 12 +++++------ .../Generator/Momentum/MomentumGenerator.cs | 10 ++++----- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/MarketData/MarketData/Models/CMT20200817.TXT b/MarketData/MarketData/Models/CMT20200817.TXT index a321a61..966883f 100755 --- a/MarketData/MarketData/Models/CMT20200817.TXT +++ b/MarketData/MarketData/Models/CMT20200817.TXT @@ -1,11 +1,11 @@ CMTSESSIONv1.00 -LastUpdated=5/6/2025 7:51:08 PM -TradeDate=5/6/2025 +LastUpdated=5/7/2025 7:48:32 PM +TradeDate=5/7/2025 StartDate=1/1/0001 -AnalysisDate=5/6/2025 +AnalysisDate=5/7/2025 CashBalance=9375.6 NonTradeableCash=6456.42 -SuspendTrading=False|UsePriceSlopeIndicator=True|UsePriceSlopeIndicatorDays=252|AnalysisDate=5/6/2025|BetaMonths=6|TradeDate=5/6/2025|MarketCapLowerLimit=500000000|SidewaysDetection=False|SidewaysAfterDays=30|PriceTrendDays=20|CheckOutliersInReturnStream=True|DailyReturnLimit=0.25|MaxDailyPositions=3|MaxOpenPositions=3|NoTradeSymbols=CODYY,MARUY,CSTM,CS,NATI,QADA,CRTO,GTBIF,CLCT,PRSC,CMD,STAY,GBTC,YOKU,PNY,RFMD,ASAZY,USMO,VNR,STB,XIV,SYNT,DFP|OnlyTradeSymbols=|MinRSI=70|InitialCash=10000|TotalRiskPercentDecimal=0.05|PositionRiskPercentDecimal=0.12|EquityOnly=False|MinPercentReturnProximityTo52WeekHigh=30|MinPercentReturnOver52WeekLow=80|ProfitMarginCheck=True|EPSCheck=True|MinDaysBetweenReholding=30|LiquidityCheck=True|MinVolume=1000|DMA200Horizon=15|MinDaysBetweenStopAdjustments=30|MinDaysBetweenInitialStopAdjustment=5|MaxPricingExceptions=3|MACDSetup=(12,26,9)|MACDSignalDays=5|MACDRejectStrongSells=True|MACDRejectWeakSells=True|UseMarketIndicator=True|Benchmark=SPY|BenchmarkMovingAverageDays=200|BenchmarkMovingAverageHorizon=5|UseMarketIndicatorVolatility=True|UseMarketIndicatorVolatilityHorizon=60|UseMarketIndicatorVolatilityBenchmark=^VIX|UseStopLimitScaling=True|StopLimitScalingType=AverageTrueRange|StopLimitScalingVolatilityDays=30|SellOnDMABreak=True|DMABreakValues=200|DMABreakForceBreak=False|EntryType=OverExtended,MVP,PriceTrend,VolumeTrend|EntryHorizon=30|CandidateExpiryDays=180|VolumeTrendDays=10|ChannelBreakoutHorizon=40|UseOverExtendedIndicatorDays=45|UseOverExtendedIndicatorViolationThreshhold=1|UseOverExtendedIndicatorMarginPercent=1|MaxBeta=10|UseMaxBeta=False|UseProfitMaximization=True|UseProfitMaximizationExpression=R_THRESSHOLD=4;MAX_ATR=3;MULTIPLIER=MAX_ATR;IF(RMultiple>=R_THRESSHOLD){MULTIPLIER=1.2;}|UseTradeOnlySectors=False|UseTradeOnlySectorsSectors=Healthcare,Technology,Basic Materials,Consumer Defensive,Industrials|EvaluateStopOnUpTrend=False +SuspendTrading=False|UsePriceSlopeIndicator=True|UsePriceSlopeIndicatorDays=252|AnalysisDate=5/7/2025|BetaMonths=6|TradeDate=5/7/2025|MarketCapLowerLimit=500000000|SidewaysDetection=False|SidewaysAfterDays=30|PriceTrendDays=20|CheckOutliersInReturnStream=True|DailyReturnLimit=0.25|MaxDailyPositions=3|MaxOpenPositions=3|NoTradeSymbols=CODYY,MARUY,CSTM,CS,NATI,QADA,CRTO,GTBIF,CLCT,PRSC,CMD,STAY,GBTC,YOKU,PNY,RFMD,ASAZY,USMO,VNR,STB,XIV,SYNT,DFP|OnlyTradeSymbols=|MinRSI=70|InitialCash=10000|TotalRiskPercentDecimal=0.05|PositionRiskPercentDecimal=0.12|EquityOnly=False|MinPercentReturnProximityTo52WeekHigh=30|MinPercentReturnOver52WeekLow=80|ProfitMarginCheck=True|EPSCheck=True|MinDaysBetweenReholding=30|LiquidityCheck=True|MinVolume=1000|DMA200Horizon=15|MinDaysBetweenStopAdjustments=30|MinDaysBetweenInitialStopAdjustment=5|MaxPricingExceptions=3|MACDSetup=(12,26,9)|MACDSignalDays=5|MACDRejectStrongSells=True|MACDRejectWeakSells=True|UseMarketIndicator=True|Benchmark=SPY|BenchmarkMovingAverageDays=200|BenchmarkMovingAverageHorizon=5|UseMarketIndicatorVolatility=True|UseMarketIndicatorVolatilityHorizon=60|UseMarketIndicatorVolatilityBenchmark=^VIX|UseStopLimitScaling=True|StopLimitScalingType=AverageTrueRange|StopLimitScalingVolatilityDays=30|SellOnDMABreak=True|DMABreakValues=200|DMABreakForceBreak=False|EntryType=OverExtended,MVP,PriceTrend,VolumeTrend|EntryHorizon=30|CandidateExpiryDays=180|VolumeTrendDays=10|ChannelBreakoutHorizon=40|UseOverExtendedIndicatorDays=45|UseOverExtendedIndicatorViolationThreshhold=1|UseOverExtendedIndicatorMarginPercent=1|MaxBeta=10|UseMaxBeta=False|UseProfitMaximization=True|UseProfitMaximizationExpression=R_THRESSHOLD=4;MAX_ATR=3;MULTIPLIER=MAX_ATR;IF(RMultiple>=R_THRESSHOLD){MULTIPLIER=1.2;}|UseTradeOnlySectors=False|UseTradeOnlySectorsSectors=Healthcare,Technology,Basic Materials,Consumer Defensive,Industrials|EvaluateStopOnUpTrend=False PricingExceptions=0 TotalActivePositions=0 TotalPositions=124 diff --git a/MarketData/MarketData/Models/MGSH20250331.TXT b/MarketData/MarketData/Models/MGSH20250331.TXT index 66962a3..8abe1b7 100755 --- a/MarketData/MarketData/Models/MGSH20250331.TXT +++ b/MarketData/MarketData/Models/MGSH20250331.TXT @@ -1,23 +1,24 @@ MGSHSESSIONv2.00 -LastUpdated=5/6/2025 7:51:49 PM -TradeDate=5/7/2025 +LastUpdated=5/7/2025 7:53:41 PM +TradeDate=5/8/2025 StartDate=3/31/2025 -AnalysisDate=5/6/2025 +AnalysisDate=5/7/2025 Cycle=2 CashBalance=3485.68 NonTradeableCash=0 HedgeCashBalance=3000 Verbose=True|KeepSlotPositions=True|BenchmarkMode=False|BenchmarkModeSymbol=SPY|HoldingPeriod=3|MaxPositions=3|NoTradeSymbols=IBDRY,GBTC,YOKU,PNY,RFMD,ASAZY|NoTradeFinancialSymbols=U.S. Private Equity,U.S. Financials,U.S. Financial Services,U.S. Banking and Investment Services,Trading-Miscellaneous,Trading--Miscellaneous,Trading--Leveraged Equity,Trading--Leveraged Debt,Trading--Leveraged Commodities,Trading--Inverse Equity,Trading--Inverse Commodities,Tactical Allocation,Specialty Finance,Japan Financials,Savings & Cooperative Banks,Option Writing,Insurance Brokers,Insurance - Specialty,Insurance - Reinsurance,Insurance - Property & Casualty,Insurance - Life,Insurance - Diversified,Global Private Equity,Global Financials,Financial Services,Financial Exchanges,Financial,China Financials,Banks - Regional - US,Banks - Regional - Latin America,Banks - Global,Asset Management,Credit Services|Benchmark=SPY|MarketCapLowerLimit=1000000000|UsePEScreen=False|UseEBITDAScreen=True|UseRevenuePerShareScreen=True|UseLowSlopeBetaCheck=True|LowSlopeBetaDays=15|LowSlopeBetaThreshhold=1|UseMACD=True|MACDSetup=(12,26,9)|MACDSignalDays=12|MACDRejectStrongSellSignals=False|MACDRejectWeakSellSignals=True|UseStochastics=True|StochasticsSignalDays=3|StochasticsRejectStrongSells=True|StochasticsRejectWeakSells=True|UseFallbackCandidate=True|FallbackCandidate=SHV|FallbackCandidateBestOf=SHV,NEAR,BIL,GSY,AGG,ACWX,GSY,SCHF,IXUS,DBEF,IEFA,TLT|UseMaxPEScreen=True|MaxPE=40|StrictMaxPE=False|QualityIndicatorType=IDINDICATOR|IncludeTradeMasterForSymbolsHeld=True|UseStopLimits=True|StopLimitRiskPercentDecimal=0.2|StopLimitScalingVolatilityDays=30|MinDaysBetweenInitialStopAdjustment=30|MinDaysBetweenStopAdjustments=30|StopLimitPriceTrendDays=20|StopLimitATRMultiplier=3|UseHedging=True|HedgeBenchmarkSymbol=SPY|HedgeShortSymbol=SH|HedgeRiskPercentDecimal=0.12|HedgeMinDaysBetweenStopAdjustments=1|HedgeInitialCash=3000|HedgeCloseAboveSMANDays=10|HedgeBandBreakCheckDays=3|HedgeATRMultiplier=1|MaxPricingExceptions=3|UseBetaGenerator=True|UseBetaGeneratorMonths=24 TotalActivePositions=6 -Slot=0|Symbol=MO|PurchaseDate=3/31/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=18|PurchasePrice=59.91|CurrentPrice=60.48|Volume=17335180|Return1D=0|CumReturn252=0|IDIndicator=-15.9362549800797|Score=1.14749269300042|Velocity=0.967136150234742|PE=9|Beta=0.572465642401382|InitialStopLimit=47.93|TrailingStopLimit=47.93|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=12.004|Comment=Price changed on 4/1/2025 from $60.02 to $59.91 -Slot=0|Symbol=EXC|PurchaseDate=3/31/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=24|PurchasePrice=45.76|CurrentPrice=46.29|Volume=14993121|Return1D=0|CumReturn252=0|IDIndicator=-8.76494023904382|Score=0.405636492837393|Velocity=1|PE=18.02|Beta=0.248374476251328|InitialStopLimit=36.61|TrailingStopLimit=42.7107857322693|LastStopAdjustment=4/30/2025 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=9.216|Comment=Price changed on 4/1/2025 from $46.08 to $45.76 -Slot=0|Symbol=SXT|PurchaseDate=3/31/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=14|PurchasePrice=73.98|CurrentPrice=94.72|Volume=362866|Return1D=0|CumReturn252=0|IDIndicator=-7.17131474103586|Score=0.447832358242973|Velocity=0.447678018575852|PE=24.93|Beta=0.640557790575348|InitialStopLimit=59.18|TrailingStopLimit=85.4177850723267|LastStopAdjustment=4/30/2025 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=14.886|Comment=Price changed on 4/1/2025 from $74.43 to $73.98 -Slot=1|Symbol=RGLD|PurchaseDate=4/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=6|PurchasePrice=179.06|CurrentPrice=184.53|Volume=872755|Return1D=0|CumReturn252=0|IDIndicator=-12.3505976095618|Score=0.879340632979787|Velocity=0.8398891966759|PE=36.94|Beta=0.672718546494456|InitialStopLimit=143.25|TrailingStopLimit=143.25|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=36.542|Comment=Price changed on 5/1/2025 from $182.71 to $179.06 -Slot=1|Symbol=PSO|PurchaseDate=4/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=69|PurchasePrice=15.98|CurrentPrice=15.83|Volume=894303|Return1D=0|CumReturn252=0|IDIndicator=-11.9521912350598|Score=1.15269564166514|Velocity=0.737122557726465|PE=19.2|Beta=0.0342052512015139|InitialStopLimit=12.78|TrailingStopLimit=12.78|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=3.25|Comment=Price changed on 5/1/2025 from $16.25 to $15.98 -Slot=1|Symbol=TSCDY|PurchaseDate=4/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=75|PurchasePrice=15|CurrentPrice=15.25|Volume=78408|Return1D=0|CumReturn252=0|IDIndicator=-11.1553784860558|Score=1.03524480157762|Velocity=1|PE=12.79|Beta=0.388852470354317|InitialStopLimit=12|TrailingStopLimit=12|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=2.996|Comment=Price changed on 5/1/2025 from $14.98 to $15.00 +Slot=0|Symbol=MO|PurchaseDate=3/31/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=18|PurchasePrice=59.91|CurrentPrice=60.91|Volume=17335180|Return1D=0|CumReturn252=0|IDIndicator=-15.9362549800797|Score=1.14749269300042|Velocity=0.967136150234742|PE=9|Beta=0.572465642401382|InitialStopLimit=47.93|TrailingStopLimit=56.15650033473968|LastStopAdjustment=5/7/2025 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=12.004|Comment=Price changed on 4/1/2025 from $60.02 to $59.91 +Slot=0|Symbol=EXC|PurchaseDate=3/31/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=24|PurchasePrice=45.76|CurrentPrice=46.34|Volume=14993121|Return1D=0|CumReturn252=0|IDIndicator=-8.76494023904382|Score=0.405636492837393|Velocity=1|PE=18.02|Beta=0.248374476251328|InitialStopLimit=36.61|TrailingStopLimit=42.7107857322693|LastStopAdjustment=4/30/2025 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=9.216|Comment=Price changed on 4/1/2025 from $46.08 to $45.76 +Slot=0|Symbol=SXT|PurchaseDate=3/31/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=14|PurchasePrice=73.98|CurrentPrice=94.32|Volume=362866|Return1D=0|CumReturn252=0|IDIndicator=-7.17131474103586|Score=0.447832358242973|Velocity=0.447678018575852|PE=24.93|Beta=0.640557790575348|InitialStopLimit=59.18|TrailingStopLimit=85.4177850723267|LastStopAdjustment=4/30/2025 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=14.886|Comment=Price changed on 4/1/2025 from $74.43 to $73.98 +Slot=1|Symbol=RGLD|PurchaseDate=4/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=6|PurchasePrice=179.06|CurrentPrice=182.65|Volume=872755|Return1D=0|CumReturn252=0|IDIndicator=-12.3505976095618|Score=0.879340632979787|Velocity=0.8398891966759|PE=36.94|Beta=0.672718546494456|InitialStopLimit=143.25|TrailingStopLimit=143.25|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=36.542|Comment=Price changed on 5/1/2025 from $182.71 to $179.06 +Slot=1|Symbol=PSO|PurchaseDate=4/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=69|PurchasePrice=15.98|CurrentPrice=15.82|Volume=894303|Return1D=0|CumReturn252=0|IDIndicator=-11.9521912350598|Score=1.15269564166514|Velocity=0.737122557726465|PE=19.2|Beta=0.0342052512015139|InitialStopLimit=12.78|TrailingStopLimit=12.78|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=3.25|Comment=Price changed on 5/1/2025 from $16.25 to $15.98 +Slot=1|Symbol=TSCDY|PurchaseDate=4/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=75|PurchasePrice=15|CurrentPrice=15.3|Volume=78408|Return1D=0|CumReturn252=0|IDIndicator=-11.1553784860558|Score=1.03524480157762|Velocity=1|PE=12.79|Beta=0.388852470354317|InitialStopLimit=12|TrailingStopLimit=12|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=2.996|Comment=Price changed on 5/1/2025 from $14.98 to $15.00 TotalPositions=0 -TotalStopLimits=2 +TotalStopLimits=3 Symbol=EXC|AnalysisDate=4/30/2025 12:00:00 AM|PreviousStop=36.61|NewStop=42.7107857322693|CurrentPriceLow=46.11|CurrentPriceClose=46.9|PriceTrendIndicatorSlope=0.0870828032493591|StopLimitId=EXC20250331120000AM Symbol=SXT|AnalysisDate=4/30/2025 12:00:00 AM|PreviousStop=59.18|NewStop=85.4177850723267|CurrentPriceLow=92.4|CurrentPriceClose=93.95|PriceTrendIndicatorSlope=0.931879639625549|StopLimitId=SXT20250331120000AM +Symbol=MO|AnalysisDate=5/7/2025 12:00:00 AM|PreviousStop=47.93|NewStop=56.15650033473968|CurrentPriceLow=60.37|CurrentPriceClose=60.91|PriceTrendIndicatorSlope=0.21730078756809235|StopLimitId=MO20250331120000AM TotalHedgePositions=0 TotalPricingExceptions=0 diff --git a/MarketData/MarketDataLib/Generator/CMTrend/CMTTrendGenerator.cs b/MarketData/MarketDataLib/Generator/CMTrend/CMTTrendGenerator.cs index 72dba87..785b340 100755 --- a/MarketData/MarketDataLib/Generator/CMTrend/CMTTrendGenerator.cs +++ b/MarketData/MarketDataLib/Generator/CMTrend/CMTTrendGenerator.cs @@ -26,34 +26,34 @@ namespace MarketData.Generator.CMTrend Profiler profiler = new Profiler(); Dictionary latestDates = PricingDA.GetLatestDates(symbols); symbols=symbols.Where(x => latestDates.ContainsKey(x) && latestDates[x].Date>=tradeDate.Date).ToList(); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded pricing dates in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded pricing dates in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch a subset of fundamentals where each fundamental.asof is no greater than tradeDate profiler.Reset(); FundamentalsV2 fundamentals = FundamentalDA.GetFundamentalsMaxDateV2(tradeDate); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded fundamentals in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded fundamentals in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch the Company Profiles profiler.Reset(); Dictionary companyProfiles = CompanyProfileDA.GetCompanyProfiles(symbols); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded company profiles in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded company profiles in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch the pricing dates required for 200 day moving average. profiler.Reset(); DateGenerator dateGenerator = new DateGenerator(); DateTime historicalDate=dateGenerator.GenerateHistoricalDate(tradeDate,cmtParams.DMA200Horizon+10); List historicalDates=PricingDA.GetPricingDatesBetween(historicalDate,tradeDate); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded moving average dates in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded moving average dates in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch the EPS time series profiler.Reset(); Dictionary epsTimeSeriesCollectionDictionary = FundamentalDA.GetEPS(symbols,tradeDate,3); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded EPS Time Series in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded EPS Time Series in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch the profit margin time series profiler.Reset(); Dictionary profitMarginTimeSeriesCollectionDictionary = IncomeStatementDA.GetProfitMarginMaxAsOf(symbols,tradeDate,3,IncomeStatement.PeriodType.Quarterly); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Profit Margin Time Series in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Profit Margin Time Series in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); for(int index=0;index latestDates = PricingDA.GetLatestDates(symbols); symbols=symbols.Where(x => latestDates.ContainsKey(x) && latestDates[x].Date>=tradeDate.Date).ToList(); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Pricing Dates in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Pricing Dates in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch a subset of fundamentals where each fundamental.asof is no greater than tradeDate profiler.Reset(); FundamentalsV2 fundamentals = FundamentalDA.GetFundamentalsMaxDateV2(tradeDate); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Fundamentals in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Fundamentals in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch the Company Profiles profiler.Reset(); Dictionary companyProfiles = CompanyProfileDA.GetCompanyProfiles(symbols); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Company Profiles in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Company Profiles in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch the Analyst Ratings profiler.Reset(); Dictionary analystRatingsDictionary = AnalystRatingsDA.GetAnalystRatingsDowngradesMaxDateNoZacks(symbols, tradeDate); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Analyst Ratings in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Analyst Ratings in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); // Prefetch Zacks Ranks profiler.Reset(); Dictionary zacksRanksDictionary = ZacksRankDA.GetZacksRankOnOrBefore(symbols, tradeDate); - MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Zacks Ranks in {Utility.FormatNumber(profiler.End(),2)} (ms)"); + MDTrace.WriteLine(LogLevel.DEBUG,$"Loaded Zacks Ranks in {Utility.FormatNumber(profiler.End(),0,true)} (ms)"); MDTrace.WriteLine(LogLevel.DEBUG,String.Format("Generate momentum.. examining candidates")); // Go through the universe of stocks