Updating training October 2024
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MarketData.Generator.CMMomentum
|
namespace MarketData.Generator.CMMomentum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ using MarketData.Utils;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MarketData.Generator.CMMomentum
|
namespace MarketData.Generator.CMMomentum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -129,13 +129,13 @@ namespace MarketData.Generator.CMMomentum
|
|||||||
dataProcessor.Height=128;
|
dataProcessor.Height=128;
|
||||||
dataProcessor.PenWidth=1;
|
dataProcessor.PenWidth=1;
|
||||||
TestCase testCase=new TestCase(cmCandidate.Symbol,cmCandidate.TradeDate,cmParams.UseCNNDayCount,TestCase.CaseType.Test,TestCase.GenerateType.BollingerBand,TestCase.OutputType.OutputStream);
|
TestCase testCase=new TestCase(cmCandidate.Symbol,cmCandidate.TradeDate,cmParams.UseCNNDayCount,TestCase.CaseType.Test,TestCase.GenerateType.BollingerBand,TestCase.OutputType.OutputStream);
|
||||||
dataProcessor.ProcessData(testCase);
|
dataProcessor.ProcessData(testCase);
|
||||||
String prediction = cnnClient.Predict(CNNClient.Model.resnet50,testCase.LastStream);
|
// String prediction = cnnClient.Predict(CNNClient.Model.resnet50,testCase.LastStream);
|
||||||
|
String prediction = cnnClient.Predict(CNNClient.Model.resnet50_20241024_270,testCase.LastStream);
|
||||||
prediction=prediction.Substring(prediction.IndexOf("-->"));
|
prediction=prediction.Substring(prediction.IndexOf("-->"));
|
||||||
int result=int.Parse(Utility.BetweenString(prediction,"[[","]"));
|
int result=int.Parse(Utility.BetweenString(prediction,"[[","]"));
|
||||||
if(1==result)
|
if(1==result)
|
||||||
{
|
{
|
||||||
// MDTrace.WriteLine(LogLevel.DEBUG,String.Format("PredictCandidate: Found positive convolutional model match for {0} on {1}. Score {2} -> {3}",cmCandidate.Symbol,cmCandidate.TradeDate.ToShortDateString(),cmCandidate.Score,cmCandidate.Score*(1.00+cmParams.UseCNNRewardPercentDecimal)));
|
|
||||||
cmCandidate.Score*=(1.00+cmParams.UseCNNRewardPercentDecimal); // increase the score by the percentage indicated in the params settings
|
cmCandidate.Score*=(1.00+cmParams.UseCNNRewardPercentDecimal); // increase the score by the percentage indicated in the params settings
|
||||||
cmCandidate.CNNPrediction=true;
|
cmCandidate.CNNPrediction=true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user