public PredictionModelHelperTests()
 {
     sut = new ddm.StockData()
     {
         open   = 200,
         high   = 200,
         low    = 200,
         close  = 200,
         volume = 200
     };
 }
Exemple #2
0
        internal dom.Prediction CreateStockData(Symbol ticker, string username)
        {
            var ph = new PredictionHelper();

            var stockData = new dmt.StockData()
            {
                timestamp = ticker.Date,
                open      = (float)ticker.Open,
                high      = (float)ticker.High,
                low       = (float)ticker.Low,
                close     = (float)ticker.Close,
                volume    = ticker.Volume
            };

            var prediction = PredictionModelHelper.RunAllPredictions(stockData);

            prediction.CompanyName = ticker.CompanyName;
            prediction.Ticker      = ticker.Ticker;

            ph.SetPrediction(prediction, username);

            return(prediction);
        }