The previous chapter gave us our first introduction to building an equation: a simple moving average. In this chapter, we're going to implement two more functions where the math is only slightly more advanced than the simple moving average (SMA). The exponential moving average (EMA) and Bollinger Bands are both technical trading indicators. These, coupled with the SMA, will give us a nice set of lagging indicators on top of our base stream of stock price data. The moving averages lag price movement because they're based on past data. They smoothen price data and show its current direction by filtering out noise or erratic price points in a time series.