private void OneStockBackTest(string stockName)
        {
            for (int i = 0; i < _tradeManager.GetTradeList.Count; i++)
            {
                if (_tradeManager.GetTradeList[i].Finished)
                {
                    _backtest.ChangePortFolValue(_tradeManager, i);
                    _backtest.MaxDrawDown(i);
                }
            }

            if (_tradeManager.GetTradeList.Count > 0)
            {
                _backTestList.Add(_backtest.GetOneStockBacktest(_tradeManager, _dataList, _algoName, stockName, _backtestPeriodPicker.GetStartDate(), _backtestPeriodPicker.GetEndDate()));
            }
        }
Ejemplo n.º 2
0
        private void Portfolio()
        {
            AddStartValuePortfolio();
            int highsCounter = 0;

            for (int i = 0; i < _tradeManager.GetTradeList.Count; i++)
            {
                if (_tradeManager.GetTradeList[i].Finished)
                {
                    AddEquityCurveValue(i);
                    _backtest.MaxDrawDown(i);
                    AddNewHigh(i);
                    highsCounter++;
                }
            }

            AddEndValuePortfolio();
            AddMaxDrawDown();
        }