{
CqlResult tResult = getClient().execute_cql_query(ByteBufferUtil.bytes(buildStocksQuery(ticker)), Compression.NONE);
CqlRow tRow = tResult.getRowsIterator().hasNext() ? tResult.getRowsIterator().next() : null;
if ( tRow != null ) {
Double price = Double.valueOf(ByteBufferUtil.string(tRow.columns.get(0).value));
Position s = new Position(ByteBufferUtil.string(tRow.key), price, tickerLookup.get(tRow.key));
p.addToConstituents(s);
total += price * tickerLookup.get(tRow.key);
basis += r.nextDouble() * 100 * tickerLookup.get(tRow.key);
}
}