Developing a successful trading algorithm is about finding the right balance between capturing market gains and managing risks. In this capstone project for the Flatiron School Data Science Bootcamp, I created and refined a QuantConnect trading algorithm that combines a dynamic strategy for SPY with a risk-managed approach for TQQQ. The goal was to optimize…