This is a demo of using Robotic Process Automation (RPA) to optimize an online stock trading algorithm. A machine learning optimizer needs a way to repeatedly run the algorithm for different initialization parameters values to zero in on the values that maximizes the algorithm Performance. In other words the optimizer needs a loss function that it needs to invoke repeatedly and measure performances changes. Traditionally back-end automation is how this loss function can be exposed to the optimizer as an API call. This is a novel attempt to use front-end optimization for the loss function. The advantage of using RPA here is it is fast to setup and cheaper.