Skip to content

machine learning web application using Python's FastAPI and scikit-learn to predict S&P 500 stock price trends and cluster stocks based on average annual returns and volatility. Utilised the MVC design pattern to structure the application effectively. Implemented a decision tree classifier with 84% accuracy.

Notifications You must be signed in to change notification settings

Ccharlesss/FinanceML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

FinanceML

This project aims to build on fundamental aspects of web development, machine learning, probability and statistics, and finance to develop two robust models. The first model predicts the next day's closing price trend for stocks in the S&P 500, while the second model clusters the entire dataset based on annual average return and volatility, displaying the results on an interactive scatter plot. The goal is to assist users from diverse educational backgrounds in making more informed investment decisions.

Python was chosen for this project due to its extensive support for machine learning libraries. For the web framework, Python’s FastAPI was selected as a lightweight and widely-used option for developing machine learning web applications. On the client side, JavaScript with Material-UI was used to implement the components rendered to the user. Client-server communication is handled via HTTP protocols and Security is ensured using JWT token authentication and role-based access to critical administrative functions.

The overall architecture follows the MVC (Model-View-Controller) design pattern. To facilitate deployment and manage system dependencies, Docker was used to containerize the application into microservices, each in its own environment. The application is divided into three containers: one for the backend, one for the frontend, and one for the database. The database container uses a PostgreSQL image pulled from Docker Hub to store the models' data.

The training dataset for the machine learning models is stored in a CSV file. To ensure the training data remains up to date, a scheduler was implemented using AWS Lambda to gather daily stock data from the S&P 500 and update the CSV file.

About

machine learning web application using Python's FastAPI and scikit-learn to predict S&P 500 stock price trends and cluster stocks based on average annual returns and volatility. Utilised the MVC design pattern to structure the application effectively. Implemented a decision tree classifier with 84% accuracy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published