@Test public void reallyLongCashFlow() { int size = 1000000; TimeSeries sampleTimeSeries = new MockTimeSeries(Collections.nCopies(size, (Tick) new MockTick(10))); TradingRecord tradingRecord = new BaseTradingRecord(Order.buyAt(0), Order.sellAt(size - 1)); CashFlow cashFlow = new CashFlow(sampleTimeSeries, tradingRecord); assertDecimalEquals(cashFlow.getValue(size - 1), 1); }
@Override public Decimal getValue(int index) { return values.get(index); }
CashFlow implements Indicator<Decimal> { @Override public Decimal getValue(int index) { return values.get(index); } }
CashFlow implements Indicator<Decimal> { @Override public Decimal getValue(int index) { return values.get(index); } CashFlow(TimeSeries timeSeries, Trade trade);  CashFlow(TimeSeries timeSeries, TradingRecord tradingRecord); }
CashFlow implements Indicator<Decimal> { @Override public Decimal getValue(int index) { return values.get(index); } CashFlow(TimeSeries timeSeries, Trade trade);  CashFlow(TimeSeries timeSeries, TradingRecord tradingRecord); @Override Decimal getValue(int index); @Override TimeSeries getTimeSeries(); int getSize(); }
CashFlow implements Indicator<Decimal> { @Override public Decimal getValue(int index) { return values.get(index); } CashFlow(TimeSeries timeSeries, Trade trade);  CashFlow(TimeSeries timeSeries, TradingRecord tradingRecord); @Override Decimal getValue(int index); @Override TimeSeries getTimeSeries(); int getSize();  }