private async void analyze() { StatusWindow win2 = new StatusWindow(); win2.Show(); InputParams i = new InputParams(); i.numOfStocks = Int32.Parse(this.numOfStocks.Text); i.daysAgo = Int32.Parse(this.daysAgo.Text); i.clusters = Int32.Parse(this.clusters.Text); i.open = (bool)open.IsChecked; i.close = (bool)close.IsChecked; i.high = (bool)high.IsChecked; i.low = (bool)low.IsChecked; var im = new Managers.InputManager(i); await Task.Run(() => im.GetInputReady()); var fm = new FilesManager(i.clusters); //await Task.Run(() => fm.TestRun()); await Task.Run(() => fm.Start()); win2.Close(); var om = new OutputManager(im.allStocksData); ResultsWindow graphs = new ResultsWindow(om.clusters); graphs.Show(); }
public StockData Normalize(InputParams features, StockData minData, StockData maxData) { var normalizedData = new StockData { Date = Date }; if (features.open) { normalizedData.Open = NormalizeData(Open.Value, minData.Open.Value, maxData.Open.Value); } if (features.close) { normalizedData.Close = NormalizeData(Close.Value, minData.Close.Value, maxData.Close.Value); } if (features.high) { normalizedData.High = NormalizeData(High.Value, minData.High.Value, maxData.High.Value); } if (features.low) { normalizedData.Low = NormalizeData(Low.Value, minData.Low.Value, maxData.Low.Value); } return normalizedData; }
public InputManager(InputParams i) { _inputParams = i; allStocksData = new Dictionary<string, Stock>(); }
public InputManager(InputParams i) { _inputParams = i; allStocksData = new Dictionary <string, Stock>(); }