@Test public void rewardRiskRatioCriterionWithNoTrades() { MockBarSeries series = new MockBarSeries(numFunction, 1, 2, 3, 6, 8, 20, 3); assertTrue(rrc.calculate(series, new BaseTradingRecord()).isNaN()); }
@Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord).dividedBy(maxDrawdown.calculate(series, tradingRecord)); }
RewardRiskRatioCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord).dividedBy(maxDrawdown.calculate(series, tradingRecord)); } }
RewardRiskRatioCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord).dividedBy(maxDrawdown.calculate(series, tradingRecord)); }  }
RewardRiskRatioCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord).dividedBy(maxDrawdown.calculate(series, tradingRecord)); }  @Override Num calculate(BarSeries series, TradingRecord tradingRecord); @Override boolean betterThan(Num criterionValue1, Num criterionValue2); @Override Num calculate(BarSeries series, Trade trade); }
RewardRiskRatioCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord).dividedBy(maxDrawdown.calculate(series, tradingRecord)); }  @Override Num calculate(BarSeries series, TradingRecord tradingRecord); @Override boolean betterThan(Num criterionValue1, Num criterionValue2); @Override Num calculate(BarSeries series, Trade trade);  }