Add CNNPredictionTest
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using MarketData;
|
||||
using MarketData.DataAccess;
|
||||
using MarketData.DataAccess;
|
||||
using MarketData.Generator.CMMomentum;
|
||||
using MarketData.Helper;
|
||||
using MarketData.MarketDataModel;
|
||||
using MarketData.Utils;
|
||||
@@ -14,6 +14,24 @@ namespace MarketDataUnitTests
|
||||
[TestClass]
|
||||
public class MarketDataFeedTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void CNNPredictionTest()
|
||||
{
|
||||
CMCandidate cmCandidate = new CMCandidate();
|
||||
CMParams cmParams = new CMParams();
|
||||
|
||||
cmParams.UseCNN=true;
|
||||
cmParams.UseCNNHost="http://127.0.0.1:5000";
|
||||
cmParams.UseCNNDayCount=270;
|
||||
cmParams.UseCNNRewardPercentDecimal=0.25;
|
||||
|
||||
cmCandidate.Symbol="MIDD";
|
||||
cmCandidate.TradeDate=DateTime.Parse("07-01-2024");
|
||||
|
||||
bool result = CMMomentumGenerator.PredictCandidate(cmCandidate, cmParams);
|
||||
|
||||
Assert.IsTrue(result);
|
||||
}
|
||||
|
||||
// This test is for the TOR Feed
|
||||
[TestMethod]
|
||||
@@ -61,7 +79,7 @@ namespace MarketDataUnitTests
|
||||
[TestMethod]
|
||||
public void LatestPriceYahooRetrieval()
|
||||
{
|
||||
String symbol="AAPL";
|
||||
String symbol="JFNNX";
|
||||
Price price=MarketDataHelper.GetLatestPriceYahoo(symbol);
|
||||
Assert.IsTrue(null!=price,"No Price from Yahoo");
|
||||
Assert.IsTrue(price.IsValid,"Invalid Price");
|
||||
|
||||
Reference in New Issue
Block a user