Abstract. This paper is concerned with the optimality of a trend following trading rule. The idea is to catch a bull market at its early stage, ride the trend, and liquidate the position at the first evidence of the subsequent bear market. We characterize the bull and bear phases of the markets mathematically using the conditional probabilities of the bull market given the up to date stock prices. The optimal buying and selling times are given in terms of a sequence of stopping times determined by two threshold curves. Numerical experiments are conducted to validate the theoretical results and demonstrate how they perform in a marketplace. 1. Introduction. Trading in organized exchanges has increasingly become an integrated part of our life. Big moves of market indices of major stock exchanges all over the world are often the headlines of news media. By and large, active market participants can be classified into two groups according to their trading strategies: those who trade contra-trend and those who follow the trend. On the other hand, there are also passive market participants who simply buy and hold for a long period of time (often indirectly through mutual funds). Within each group of strategies there are numerous technical methods. Much effort has been devoted to theoretical analysis of these strategies.Using optimal stopping time to study optimal exit strategy for stock holdings has become the standard textbook method. For example, Øksendal [24, Examples 10.2.2 and 10.4.2] considered optimal exit strategy for stocks whose price dynamics were modeled by a geometric Brownian motion. To maximize an expected return discounted by the risk-free interest rate, the analysis in [24] showed that if the drift of the geometric Brownian motion was not high enough in comparison to the discount of interest rate, then one should sell at a given threshold. Although the model of a single geometric Brownian motion with a constant drift was somewhat too simplistic, this result well illustrated the flaw of the so-called buy and hold strategy, which worked only in limited situations. Stock selling rules under more realistic models have gained increasing attention. For example, Zhang [31] considered a selling rule determined by two