An interactive web application that allows users to buy/sell stocks using the Interactive Brokers(IBKR) trading services to send the trading requests through. There is also a ML model that is fed historical data of the specified stock to predict whether the stocks price would go up or down. The backend is made using Python and the web framework used was Flask. The front-end is a combination of CSS, HTML and Javascript to make each webpage that users can interact with.
The historical data from IBKR was utilized to feed into a random forest model that used rolling averages to predict the price for the next day (whether it went up or down). The IBKR API and Flask server ran on different threads, so multithreading was needed so that all features could be implemented. The historical data was written to a csv file and then read across threads so that information would not be lost, while user data on contracts and stocks were stored securely using SQLAlchemy. The predictions page also features a interactive graph that shows the historical stock data across a specified time period using GraphQL. Overall, this web application utilizes stock trading and ML prediction on prices, which will be improved on in future updates.