Because of the heavy sells on stocks this month, equity allocation has been below target for most institutions and investors this month. Month end is the opportunity for them to rebalance their portfolio and in response to the sells, most equities will be seeing buying pressure just like S&P 500.
So, in Month ends like this, S&P 500 direction often depends on the net flow of assets either because investors are rebalancing their portfolios to meet their targets, or readjusting their positions and moving money between equities, bonds, cash or international assets to meet up their pre-determined allocation schedules.