factors that affect aggregate demand and supply