From 4f9571cd32d63228805b60b6d552d4d381a1bf04 Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 4 Jun 2025 21:53:27 -0400 Subject: [PATCH] Fix FormatCurrency, Cleanup Code, Daily Run. --- MarketData/MarketData/Models/CMT20200817.TXT | 17 ++++++++-------- MarketData/MarketData/Models/MGSH20250331.TXT | 20 +++++++++---------- MarketData/MarketData/Services/MainService.cs | 12 ----------- MarketData/MarketDataLib/Utility/Utility.cs | 1 + 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/MarketData/MarketData/Models/CMT20200817.TXT b/MarketData/MarketData/Models/CMT20200817.TXT index c7d8d8d..0f3b127 100755 --- a/MarketData/MarketData/Models/CMT20200817.TXT +++ b/MarketData/MarketData/Models/CMT20200817.TXT @@ -1,16 +1,16 @@ CMTSESSIONv1.00 -LastUpdated=6/3/2025 9:03:15 PM -TradeDate=6/3/2025 +LastUpdated=6/4/2025 9:33:42 PM +TradeDate=6/4/2025 StartDate=1/1/0001 -AnalysisDate=6/3/2025 +AnalysisDate=6/4/2025 CashBalance=2394.85 NonTradeableCash=6456.42 -SuspendTrading=False|UsePriceSlopeIndicator=True|UsePriceSlopeIndicatorDays=252|AnalysisDate=6/3/2025|BetaMonths=6|TradeDate=6/3/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=6/4/2025|BetaMonths=6|TradeDate=6/4/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=3 -Symbol=SPOT|PurchaseDate=5/16/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=5|PurchasePrice=649|CurrentPrice=671.07|Exposure=3245|MarketValue=3355.3500000000004|GainLoss=110.35000000000036|GainLossPcnt=0.034006163328197336|PositionRiskDecimal=0.12|R=78.756|C=468.78|P=5.952308395550815|InitialStopLimit=571.12|TrailingStopLimit=578.5980075836181|TotalRiskExposure=393.78|RMultiple=0.28R|Volatility=40.1615791320801|Volume=0|LastStopAdjustment=6/3/2025 12:00:00 AM|Comment=Price changed on 5/19/2025 from $656.30 to $649.00 -Symbol=GWRE|PurchaseDate=5/16/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=11|PurchasePrice=215.25|CurrentPrice=218.18|Exposure=2367.75|MarketValue=2399.98|GainLoss=32.23000000000002|GainLossPcnt=0.013612078977932644|PositionRiskDecimal=0.12|R=26.0436|C=304.705|P=11.699803406595093|InitialStopLimit=189.42|TrailingStopLimit=189.42|TotalRiskExposure=286.4796|RMultiple=0.11R|Volatility=9.23863506317139|Volume=0|LastStopAdjustment=1/1/0001 12:00:00 AM|Comment=Price changed on 5/19/2025 from $217.03 to $215.25 -Symbol=CRS|PurchaseDate=5/16/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=6|PurchasePrice=228|CurrentPrice=246.3|Exposure=1368|MarketValue=1477.8000000000002|GainLoss=109.80000000000018|GainLossPcnt=0.08026315789473698|PositionRiskDecimal=0.12|R=27.8256|C=185.3385|P=6.660718906330861|InitialStopLimit=200.64|TrailingStopLimit=204.89071464538574|TotalRiskExposure=166.9536|RMultiple=0.66R|Volatility=11.2141494750977|Volume=0|LastStopAdjustment=5/28/2025 12:00:00 AM|Comment=Price changed on 5/19/2025 from $231.88 to $228.00 +Symbol=SPOT|PurchaseDate=5/16/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=5|PurchasePrice=649|CurrentPrice=701.08|Exposure=3245|MarketValue=3505.4|GainLoss=260.4000000000001|GainLossPcnt=0.08024653312788908|PositionRiskDecimal=0.12|R=78.756|C=468.78|P=5.952308395550815|InitialStopLimit=571.12|TrailingStopLimit=578.5980075836181|TotalRiskExposure=393.78|RMultiple=0.66R|Volatility=40.1615791320801|Volume=0|LastStopAdjustment=6/3/2025 12:00:00 AM|Comment=Price changed on 5/19/2025 from $656.30 to $649.00 +Symbol=GWRE|PurchaseDate=5/16/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=11|PurchasePrice=215.25|CurrentPrice=253.98|Exposure=2367.75|MarketValue=2793.7799999999997|GainLoss=426.02999999999975|GainLossPcnt=0.17993031358885006|PositionRiskDecimal=0.12|R=26.0436|C=304.705|P=11.699803406595093|InitialStopLimit=189.42|TrailingStopLimit=221.25771627426147|TotalRiskExposure=286.4796|RMultiple=1.49R|Volatility=9.23863506317139|Volume=0|LastStopAdjustment=6/4/2025 12:00:00 AM|Comment=Price changed on 5/19/2025 from $217.03 to $215.25 +Symbol=CRS|PurchaseDate=5/16/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=6|PurchasePrice=228|CurrentPrice=246.6|Exposure=1368|MarketValue=1479.6|GainLoss=111.59999999999991|GainLossPcnt=0.08157894736842099|PositionRiskDecimal=0.12|R=27.8256|C=185.3385|P=6.660718906330861|InitialStopLimit=200.64|TrailingStopLimit=204.89071464538574|TotalRiskExposure=166.9536|RMultiple=0.67R|Volatility=11.2141494750977|Volume=0|LastStopAdjustment=5/28/2025 12:00:00 AM|Comment=Price changed on 5/19/2025 from $231.88 to $228.00 TotalPositions=124 Symbol=CDNS|PurchaseDate=8/25/2020 12:00:00 AM|SellDate=9/3/2020 12:00:00 AM|Shares=16|PurchasePrice=111.82|CurrentPrice=109.57|Exposure=1789.12|MarketValue=1753.12|GainLoss=-36|GainLossPcnt=-0.020121624038633518|PositionRiskDecimal=0.12|R=13.3512|C=225.6365|P=16.900091377554077|InitialStopLimit=97.9088|TrailingStopLimit=109.599856939316|TotalRiskExposure=213.6192|RMultiple=-0.17R|Volatility=2.3209912776947|Volume=1767980|LastStopAdjustment=9/2/2020 12:00:00 AM|Comment=Manual close. Symbol=LULU|PurchaseDate=8/28/2020 12:00:00 AM|SellDate=9/4/2020 12:00:00 AM|Shares=3|PurchasePrice=377.5|CurrentPrice=370.23|Exposure=1132.5|MarketValue=1110.69|GainLoss=-21.809999999999945|GainLossPcnt=-0.019258278145695317|PositionRiskDecimal=0.12|R=45.2976|C=136.6285|P=3.016241478577231|InitialStopLimit=332.1824|TrailingStopLimit=372.562428512573|TotalRiskExposure=135.89280000000002|RMultiple=-0.16R|Volatility=25.858959197998|Volume=2871665|LastStopAdjustment=9/2/2020 12:00:00 AM|Comment=Manual close. @@ -176,7 +176,7 @@ Symbol=TME|AnalysisDate=5/23/2025 12:00:00 AM|EPSSlope=0.1600000262260437|Prof Symbol=PM|AnalysisDate=5/27/2025 12:00:00 AM|EPSSlope=0.17499995231628418|ProfitMarginSlope=0.6388053894042969|PriceSlope=0.002014840474477233|Volatility=4.831937313079834|Volume=0|Violation=False|Slope=0.002014840474477233|Score=1.4560043761899937|AnnualizedReturn=1.6615315534402515|SharpeRatio=0.10344572495550634|RSquared=0.8763025734752328|BetaMonths=6|Beta=0.029464903016831367 Symbol=IDCC|AnalysisDate=5/30/2025 12:00:00 AM|EPSSlope=0.2849998474121094|ProfitMarginSlope=6.474006652832031|PriceSlope=0.0028473926354175144|Volatility=3.0055503845214844|Volume=0|Violation=False|Slope=0.0028473926354175144|Score=1.8068784804395575|AnnualizedReturn=2.0493915498118724|SharpeRatio=0.24338493691871216|RSquared=0.8816658195967594|BetaMonths=6|Beta=1.1297787586769141 Symbol=CVAC|AnalysisDate=6/3/2025 12:00:00 AM|EPSSlope=0.12999999523162842|ProfitMarginSlope=126.2906494140625|PriceSlope=3.203420157017471E-05|Volatility=0.46150025725364685|Volume=0|Violation=False|Slope=3.203420157017471E-05|Score=0.00027993922476205136|AnnualizedReturn=1.0081052902383305|SharpeRatio=-0.1436333308256|RSquared=0.00027768847904356274|BetaMonths=6|Beta=0.8322250313126187 -TotalStopLimits=196 +TotalStopLimits=197 Symbol=CDNS|AnalysisDate=9/2/2020 12:00:00 AM|PreviousStop=97.9088|NewStop=109.599856939316|CurrentPriceLow=113.59|CurrentPriceClose=117.09|PriceTrendIndicatorSlope=0.310654103755951|StopLimitId= Symbol=LULU|AnalysisDate=9/2/2020 12:00:00 AM|PreviousStop=332.1824|NewStop=372.562428512573|CurrentPriceLow=387.08|CurrentPriceClose=398.29|PriceTrendIndicatorSlope=2.77707505226135|StopLimitId= Symbol=MASI|AnalysisDate=10/23/2020 12:00:00 AM|PreviousStop=213.34|NewStop=223.030285377502|CurrentPriceLow=240.68|CurrentPriceClose=244.77|PriceTrendIndicatorSlope=0.191601455211639|StopLimitId= @@ -373,3 +373,4 @@ Symbol=EXEL|AnalysisDate=3/10/2025 12:00:00 AM|PreviousStop=33.56|NewStop=34.6 Symbol=IDCC|AnalysisDate=3/17/2025 12:00:00 AM|PreviousStop=188.276784000397|NewStop=195.563070678711|CurrentPriceLow=218.15|CurrentPriceClose=219.63|PriceTrendIndicatorSlope=NaN|StopLimitId= Symbol=CRS|AnalysisDate=5/28/2025 12:00:00 AM|PreviousStop=200.64|NewStop=204.89071464538574|CurrentPriceLow=235.75|CurrentPriceClose=236.16|PriceTrendIndicatorSlope=1.963541865348816|StopLimitId= Symbol=SPOT|AnalysisDate=6/3/2025 12:00:00 AM|PreviousStop=571.12|NewStop=578.5980075836181|CurrentPriceLow=665.9|CurrentPriceClose=671.07|PriceTrendIndicatorSlope=1.4739558696746826|StopLimitId= +Symbol=GWRE|AnalysisDate=6/4/2025 12:00:00 AM|PreviousStop=189.42|NewStop=221.25771627426147|CurrentPriceLow=238.6|CurrentPriceClose=253.98|PriceTrendIndicatorSlope=0.2657894194126129|StopLimitId= diff --git a/MarketData/MarketData/Models/MGSH20250331.TXT b/MarketData/MarketData/Models/MGSH20250331.TXT index 1b54df4..494716c 100644 --- a/MarketData/MarketData/Models/MGSH20250331.TXT +++ b/MarketData/MarketData/Models/MGSH20250331.TXT @@ -1,21 +1,21 @@ MGSHSESSIONv2.00 -LastUpdated=6/4/2025 9:27:27 AM -TradeDate=6/4/2025 +LastUpdated=6/4/2025 9:33:21 PM +TradeDate=6/5/2025 StartDate=3/31/2025 -AnalysisDate=6/3/2025 +AnalysisDate=6/4/2025 Cycle=3 CashBalance=105.94000000000005 NonTradeableCash=0 HedgeCashBalance=3000 Verbose=True|KeepSlotPositions=True|BenchmarkMode=False|BenchmarkModeSymbol=SPY|HoldingPeriod=3|MaxPositions=3|NoTradeSymbols=OSB,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=7 -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=93.87|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=185.37|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=162.60321449279786|LastStopAdjustment=6/2/2025 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=14.86|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.98|Volume=78408|Return1D=0|CumReturn252=0|IDIndicator=-11.1553784860558|Score=1.03524480157762|Velocity=1|PE=12.79|Beta=0.388852470354317|InitialStopLimit=12|TrailingStopLimit=14.58|LastStopAdjustment=5/30/2025 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=2.996|Comment=Price changed on 5/1/2025 from $14.98 to $15.00 -Slot=2|Symbol=DBX|PurchaseDate=5/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=61|PurchasePrice=28.81|CurrentPrice=29.53|Volume=3236382|Return1D=0|CumReturn252=0|IDIndicator=-11.952191235059757|Score=0.8554367778634994|Velocity=0.6487138263665596|PE=19.45|Beta=0.5485758772503743|InitialStopLimit=23.05|TrailingStopLimit=23.05|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=5.772|Comment=Price changed on 6/2/2025 from $28.86 to $28.81 -Slot=2|Symbol=NRG|PurchaseDate=5/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=11|PurchasePrice=156.54|CurrentPrice=161.04|Volume=3799318|Return1D=0|CumReturn252=0|IDIndicator=-5.5776892430278835|Score=1.1152297855435784|Velocity=0.9311485909479076|PE=24.22|Beta=1.1133261039922626|InitialStopLimit=125.23|TrailingStopLimit=125.23|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=31.180000000000003|Comment=Price changed on 6/2/2025 from $155.90 to $156.54 -Slot=2|Symbol=OPRA|PurchaseDate=5/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=97|PurchasePrice=18.31|CurrentPrice=18.18|Volume=415071|Return1D=0|CumReturn252=0|IDIndicator=-4.382470119521905|Score=0.8751364490743774|Velocity=0.6148705096073518|PE=25.43|Beta=2.3432255715230057|InitialStopLimit=14.65|TrailingStopLimit=14.65|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=3.6700000000000004|Comment=Price changed on 6/2/2025 from $18.35 to $18.31 +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=95.59|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=183.94|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=162.60321449279786|LastStopAdjustment=6/2/2025 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|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.99|Volume=78408|Return1D=0|CumReturn252=0|IDIndicator=-11.1553784860558|Score=1.03524480157762|Velocity=1|PE=12.79|Beta=0.388852470354317|InitialStopLimit=12|TrailingStopLimit=14.58|LastStopAdjustment=5/30/2025 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=2.996|Comment=Price changed on 5/1/2025 from $14.98 to $15.00 +Slot=2|Symbol=DBX|PurchaseDate=5/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=61|PurchasePrice=28.81|CurrentPrice=29.2|Volume=3236382|Return1D=0|CumReturn252=0|IDIndicator=-11.952191235059757|Score=0.8554367778634994|Velocity=0.6487138263665596|PE=19.45|Beta=0.5485758772503743|InitialStopLimit=23.05|TrailingStopLimit=23.05|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=5.772|Comment=Price changed on 6/2/2025 from $28.86 to $28.81 +Slot=2|Symbol=NRG|PurchaseDate=5/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=11|PurchasePrice=156.54|CurrentPrice=156.97|Volume=3799318|Return1D=0|CumReturn252=0|IDIndicator=-5.5776892430278835|Score=1.1152297855435784|Velocity=0.9311485909479076|PE=24.22|Beta=1.1133261039922626|InitialStopLimit=125.23|TrailingStopLimit=125.23|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=31.180000000000003|Comment=Price changed on 6/2/2025 from $155.90 to $156.54 +Slot=2|Symbol=OPRA|PurchaseDate=5/30/2025 12:00:00 AM|SellDate=1/1/0001 12:00:00 AM|Shares=97|PurchasePrice=18.31|CurrentPrice=18.63|Volume=415071|Return1D=0|CumReturn252=0|IDIndicator=-4.382470119521905|Score=0.8751364490743774|Velocity=0.6148705096073518|PE=25.43|Beta=2.3432255715230057|InitialStopLimit=14.65|TrailingStopLimit=14.65|LastStopAdjustment=1/1/0001 12:00:00 AM|PositionRiskPercentDecimal=0.2|R=3.6700000000000004|Comment=Price changed on 6/2/2025 from $18.35 to $18.31 TotalPositions=2 Symbol=MO|PurchaseDate=3/31/2025 12:00:00 AM|SellDate=5/14/2025 12:00:00 AM|Shares=18|PurchasePrice=59.91|CurrentPrice=56.15|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=Closed due to trailing stop. Symbol=EXC|PurchaseDate=3/31/2025 12:00:00 AM|SellDate=5/14/2025 12:00:00 AM|Shares=24|PurchasePrice=45.76|CurrentPrice=42.6|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=Closed due to trailing stop. diff --git a/MarketData/MarketData/Services/MainService.cs b/MarketData/MarketData/Services/MainService.cs index 30aaab3..a7e649c 100755 --- a/MarketData/MarketData/Services/MainService.cs +++ b/MarketData/MarketData/Services/MainService.cs @@ -103,23 +103,11 @@ namespace MarketData.Services tasks.Add("ECHO",TaskEcho); GlobalConfig.Instance.Configuration = configuration; // This call sets up configuration stuff so it needs to be first. - String pathSourceFile = "/home/pi/ARM64/MarketData/MarketData/Models/CM20191031.TXT"; - String pathDstFile = "/home/pi/Boneyard/MG20180131.TXT"; - MomentumBacktest backtest = new MomentumBacktest(); - backtest.EditPosition("PSO", DateTime.Parse("4/30/2025"), 1.00, pathDstFile); - - // CMMomentumBacktest backtest = new CMMomentumBacktest(); - // backtest.EditPosition("IEFA", DateTime.Parse("4/30/2025"), 1.00, pathDstFile); - // MGSessionParams sessionParams = MGSessionManager.RestoreSession(pathSourceFile); - // MGSessionManager.SaveSession(sessionParams, pathDstFile); - - if (args.Length < 1 || String.IsNullOrEmpty(args[0])) { DisplayUsage(); return; } - string arg = args[0].ToUpper(); // log files are now of the form market_data+task.log. Also log files will expire when > 1 days old diff --git a/MarketData/MarketDataLib/Utility/Utility.cs b/MarketData/MarketDataLib/Utility/Utility.cs index d0f06af..17ce051 100755 --- a/MarketData/MarketDataLib/Utility/Utility.cs +++ b/MarketData/MarketDataLib/Utility/Utility.cs @@ -544,6 +544,7 @@ namespace MarketData.Utils if (String.IsNullOrEmpty(str)) return str; if (number < 0.00 && !str.StartsWith("(")) { + str = str.Replace("-", null); return "(" + str + ")"; } return str;