The effects of local and global risk factors on the S&P 500 stock returns: an empirical investigation