private void UpdateDiv(object sender, RoutedEventArgs e)
        {
            IDataAnalyzer dataAnalyzer = new DataAnalyzer.DataAnalyzer();

            viewModel.display = "";
            var basicData0050 = Core.basicDailyDataManager.getBasicDailyData("0050");
            int count = 0, all = Core.stockListManager.getStockList().Count();

            foreach (var stock in Core.stockListManager.getStockList())
            {
                string ID = stock.ID, type = stock.type;
                string output = $"[UpdateDiv ID = {ID}]({type}) ({++count}/{all})\r\n";
                dataAnalyzer.setStockType(type);
                if (ID != "0050")
                {
                    dataAnalyzer.set0050BasicData(basicData0050);
                }
                dataAnalyzer.setBasicDailyData(Core.basicDailyDataManager.getBasicDailyData(ID));
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));

                dataAnalyzer.standarizeAnalyzeData();
                output           += dataAnalyzer.getDisplay();
                viewModel.display = output + "\r\n" + viewModel.display;

                Core.analyzedDataManager.saveAnalyzedData(ID, dataAnalyzer.getAnalyzedData());

                refreshText();
            }
        }
        private void AppendParameterFuturePriceTable(object sender, RoutedEventArgs e)
        {
            IDataAnalyzer dataAnalyzer = new DataAnalyzer.DataAnalyzer();

            viewModel.display = "";
            foreach (string parameterName in AnalyzedDataInformation.parameterIndexForScore.Keys)
            {
                Core.parameterFuturePriceTableManager.resetParameterFuturePriceTable(parameterName);
            }
            int count = 0, all = Core.stockListManager.getStockList().Select(x => x.ID).Count();

            foreach (var ID in Core.stockListManager.getStockList().Select(x => x.ID))
            {
                string output = $"[Append Parameter Future Price, ID = {ID}]   ({++count}/{all})\r\n";
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));
                dataAnalyzer.setFuturePriceData(Core.futurePriceDataManager.getFuturePriceData(ID));

                var allDataToAppend = new Dictionary <string, List <ParameterFuturePriceTableInformation> >();
                dataAnalyzer.getParameterFuturePriceTableDataToAppend(allDataToAppend);

                foreach (var dataPair in allDataToAppend)
                {
                    string parameterName = dataPair.Key;
                    List <ParameterFuturePriceTableInformation> dataToAppend = dataPair.Value;
                    Core.parameterFuturePriceTableManager.appendParameterFuturePrice(parameterName, dataToAppend);
                }

                output           += dataAnalyzer.getDisplay();
                viewModel.display = output + "\r\n" + viewModel.display;
                refreshText();
            }
        }
        private void GetStockScore(object sender, RoutedEventArgs e)
        {
            IDataAnalyzer dataAnalyzer = new DataAnalyzer.DataAnalyzer();

            viewModel.display = "";
            dataAnalyzer.resetParameterFuturePriceDictionary();
            foreach (string parameterName in AnalyzedDataInformation.parameterIndexForScore.Keys)
            {
                dataAnalyzer.appendParameterFuturePriceDictionary(parameterName, Core.finalParameterFuturePriceTableManager.getParameterFuturePriceTable(parameterName));
            }

            int count = 0, all = Core.stockListManager.getStockList().Select(x => x.ID).Count();

            foreach (var ID in Core.stockListManager.getStockList().Select(x => x.ID))
            {
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));
                dataAnalyzer.setScoreData(Core.scoreDataManager.getScoreData(ID));

                dataAnalyzer.calculateScoreData();

                Core.scoreDataManager.saveScoreData(ID, dataAnalyzer.getScoreData());

                viewModel.display = $"get stock score{ID}  ({++count}/{all})\r\n" + dataAnalyzer.getDisplay() + "\r\n" + viewModel.display;
                refreshText();
            }
        }
        private void GetFulturePrice(object sender, RoutedEventArgs e)
        {
            IDataAnalyzer dataAnalyzer = new DataAnalyzer.DataAnalyzer();

            viewModel.display = "";
            var basicData0050 = Core.basicDailyDataManager.getBasicDailyData("0050");
            int count = 0, all = Core.stockListManager.getStockList().Select(x => x.ID).Count();

            foreach (var ID in Core.stockListManager.getStockList().Select(x => x.ID))
            {
                if (ID != "0050")
                {
                    dataAnalyzer.set0050BasicData(basicData0050);
                }
                string output = $"[GetFulturePrice ID = {ID}]  ({++count}/{all})\r\n";
                dataAnalyzer.setBasicDailyData(Core.basicDailyDataManager.getBasicDailyData(ID));
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));
                dataAnalyzer.setFuturePriceData(Core.futurePriceDataManager.getFuturePriceData(ID));

                dataAnalyzer.calculateFuturePriceData();
                output += dataAnalyzer.getDisplay();

                Core.futurePriceDataManager.saveFuturePriceData(ID, dataAnalyzer.getFuturePriceData());
                viewModel.display = output + "\r\n" + viewModel.display;
                refreshText();
            }
        }
        private void CalculateParameter(object sender, RoutedEventArgs e)
        {
            IDataAnalyzer dataAnalyzer = new DataAnalyzer.DataAnalyzer();

            viewModel.display = "";
            int count = 0, all = Core.stockListManager.getStockList().Select(x => x.ID).Count();

            foreach (var ID in Core.stockListManager.getStockList().Select(x => x.ID))
            {
                string output =
                    $"[CalculateParameter ID = {ID}]  ({++count}/{all})\r\n";
                dataAnalyzer.setBasicDailyData(Core.basicDailyDataManager.getBasicDailyData(ID));
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));
                dataAnalyzer.setID(ID);
                dataAnalyzer.calculateParameter();
                output += dataAnalyzer.getDisplay();

                Core.analyzedDataManager.saveAnalyzedData(ID, dataAnalyzer.getAnalyzedData());

                viewModel.display = output + "\r\n" + viewModel.display;
                refreshText();
            }
        }