How Will AI Affect the Stock Market: Mathematical Analysis and Data Science Insights