ManageablePosition position = new ManageablePosition(BigDecimal.valueOf(shares), bundle);
// create random trades that add up in shares to the position they're under (this is not enforced by the system)
if (shares <= 2000) {
ManageableTrade trade = new ManageableTrade(BigDecimal.valueOf(shares), bundle, _tradeDate3, null, ExternalId.of("CPARTY", "BACS"));
position.addTrade(trade);
} else {
ManageableTrade trade1 = new ManageableTrade(BigDecimal.valueOf(2000), bundle, _tradeDate1, null, ExternalId.of("CPARTY", "BACS"));
position.addTrade(trade1);
ManageableTrade trade2 = new ManageableTrade(BigDecimal.valueOf(shares - 2000), bundle, _tradeDate2, null, ExternalId.of("CPARTY", "BACS"));
position.addTrade(trade2);
}
return position;
}