An analysis of the impact of high frequency trading on equity markets