@Test public void rewardRiskRatioCriterionOnlyWithGain() { MockTimeSeries series = new MockTimeSeries(1, 2, 3, 6, 8, 20, 3); TradingRecord tradingRecord = new BaseTradingRecord( Order.buyAt(0), Order.sellAt(1), Order.buyAt(2), Order.sellAt(5)); assertTrue(Double.isInfinite(rrc.calculate(series, tradingRecord))); }
@Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord) / maxDrawdown.calculate(series, tradingRecord); }
RewardRiskRatioCriterion extends AbstractAnalysisCriterion { @Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord) / maxDrawdown.calculate(series, tradingRecord); } }
RewardRiskRatioCriterion extends AbstractAnalysisCriterion { @Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord) / maxDrawdown.calculate(series, tradingRecord); }  }
RewardRiskRatioCriterion extends AbstractAnalysisCriterion { @Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord) / maxDrawdown.calculate(series, tradingRecord); }  @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override boolean betterThan(double criterionValue1, double criterionValue2); @Override double calculate(TimeSeries series, Trade trade); }
RewardRiskRatioCriterion extends AbstractAnalysisCriterion { @Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return totalProfit.calculate(series, tradingRecord) / maxDrawdown.calculate(series, tradingRecord); }  @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override boolean betterThan(double criterionValue1, double criterionValue2); @Override double calculate(TimeSeries series, Trade trade);  }