As well as dealing with somewhat nominal data like word counts, NMF is suited for problems involving true numerical data. This section will show how the same algorithm can be applied to trading volume in the United States stock market using data downloaded from Yahoo! Finance. This data may show patterns of important trading days or the ways that underlying factors can drive the volume of multiple stocks.
Financial markets are considered a quintessential example of collective intelligence because they have a great number of participants acting independently based on different information and biases and producing a small set of outputs, such as price and volume. It has proven extremely difficult for individuals to do a better job than the collective in predicting future prices. There is a large body of academic research on the ways that groups of people are more successful at setting prices in a financial market than any individual could possibly be.
The trading volume for a specific stock is the number of shares that are bought and sold within a given period, usually one day. Figure 10-7 shows a chart of Yahoo! stock, which has the ticker symbol YHOO. The line at the top is the closing price, the price of the last transaction of the day. The bar chart below shows the trading volume.
Figure 10-7. Stock chart showing price and trading volume ...