@Test public void calculateWithNullSeriesSizeShouldReturn0() { MockBarSeries series = new MockBarSeries(numFunction, new double[] {}); AnalysisCriterion mdd = getCriterion(); assertNumEquals(0d, mdd.calculate(series, new BaseTradingRecord())); }
@Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { CashFlow cashFlow = new CashFlow(series, tradingRecord); return calculateMaximumDrawdown(series, cashFlow); }
MaximumDrawdownCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { CashFlow cashFlow = new CashFlow(series, tradingRecord); return calculateMaximumDrawdown(series, cashFlow); } }
MaximumDrawdownCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { CashFlow cashFlow = new CashFlow(series, tradingRecord); return calculateMaximumDrawdown(series, cashFlow); }  }
MaximumDrawdownCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { CashFlow cashFlow = new CashFlow(series, tradingRecord); return calculateMaximumDrawdown(series, cashFlow); }  @Override Num calculate(BarSeries series, TradingRecord tradingRecord); @Override Num calculate(BarSeries series, Trade trade); @Override boolean betterThan(Num criterionValue1, Num criterionValue2); }
MaximumDrawdownCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { CashFlow cashFlow = new CashFlow(series, tradingRecord); return calculateMaximumDrawdown(series, cashFlow); }  @Override Num calculate(BarSeries series, TradingRecord tradingRecord); @Override Num calculate(BarSeries series, Trade trade); @Override boolean betterThan(Num criterionValue1, Num criterionValue2);  }