Not long ago securities were traded by human traders in face-to-face markets. The ecosystem of an open outcry market was well-known, visible to a human eye, and rigidly prescribed. Now trading is increasingly done in anonymous electronic markets where traders do not have designated functions or mandatory roles. In fact, the traders themselves have been replaced by algorithms (machines) operating with little or no human oversight. While the process of electronic trading is not visible to a human eye, machine-learning methods have been developed to recognize persistent patterns in the data. In this study, we develop a dynamic machine-learning method that designates traders in an anonymous electronic market into five persistent categories: high frequency traders, market makers, opportunistic traders, fundamental traders, and small traders. Our method extends a plaid clustering technique with a smoothing framework that filters out transient patterns. The method is fast, robust, and suitable for a discovering trading ecosystems in a large number of electronic markets.