NEW YORK ( TheStreet) -- Stocks drifting down in both China and the U.S. sent the dollar rising today, as investors took the greenback's safe haven status to heart. The dollar was gaining against a group of currencies today, up at 94.9650 Japanese yen. The dollar was also tracking up at 1.0917 Canadian dollars and 1.0897 Swiss francs. The Shanghai Composite Index lost 5%, or 171.94, to close at 3,266.43 points. That's the deepest dive for the benchmark index in eight months. In the afternoon, the S&P 500, Dow Jones Industrial Average and Nasdaq Composite were each losing 0.9%, 0.7% and 0.8%, respectively. The euro was down at $1.4018 while the British pound dropped to $1.6376. The Australian dollar, which was building yesterday, was down at 81.41 U.S. cents. --Reported by Sung Moss in New York.