Building a stock trading system