The rally was fueled by renewed foreign investor interest and expectations that the recent market downturn has bottomed out.