We investigate the gains and losses from equity trades of individual investors, various institutional investors, and foreign investors in the Tokyo Stock Exchange. We develop a trade-weighted performance measure and examine the impact of trading intervals, price spreads, and market timing on performance. We find that different investor types gain or lose from different sources. For example, we discover that individual investors have poor market timing ability but potentially gain during short-run trading intervals as their average sell price is consistently higher than the average purchase price. In contrast, we find that foreign investors consistently generate gains from trade due to good market timing, although their average sell price is lower than the average purchase price. Also, we find that foreign investors extract significant portion of their gains by trading against Japanese institutional investors when Japanese investors trade before their fiscal-year end.