This project allows you to search for stock prices, visualize the prices as candlestick plot and perform predictions using Machine Learning techniques.
The web development framework used is Django , the interface is in JavaScript and the ChartJs library.
- 🔎 Search stock prices using Alpha Vantage or Yahoo Finance
- 📈 Interactive visualization of stock prices with Chart.js candlestick plot
- 🔮 Perform stock price predictions with Machine Learning algorithms, using Scikit-learn and XGBoost
- 🌍 Easy-to-use web interface built with Django
Building and running a Docker container using the give Dockerfile
file can be easily performed by using the available scripts:
chmod u+x docker_build.sh && chmod u+x docker_run.sh # give execution rights to the scripts for the current user
./docker_build.sh && ./docker_run.sh
The application will be available at http://127.0.0.1:8000 .
A Datadog Agent is already configured to analyze the application.
- Place your precious API KEY in the
.env
file in the root directory of the project - example:
DD_API_KEY=__your_precious_beloved_datadog_api_key__
- Starting the Docker Compose using the given
docker-compose.yaml
can be easily performed by using the available script:
chmod u+x dockercompose_up.sh # give execution rights to the script for the current user
./dockercompose_up.sh
The application will be available at http://127.0.0.1:8000 . The Datadog Agent traces will be available at Datadog.
- 🐍 Python 3.10
- 🔑 Alpha Vantage API key (if using Alpha Vantage for stock prices), get one here
- 📦 Required Python packages, listed in
requirements.txt
git clone https://github.com/gabripo/moneyshow.git
cd stock-price-visualizer
It's recommended to use a virtual environment to manage your dependencies.
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required Python packages using the requirements.txt file.
pip install -r requirements.txt
If you're using Alpha Vantage, you'll need to configure your API key 🔑.
- Create a folder named
proj_secrets
in the project root directory. - Create a
__init__.py
file in the created folder. - Add your Alpha Vantage API key into the
__init__.py
file:
ALPHA_VANTAGE_API_KEY=your_api_key_here
python manage.py migrate
python manage.py runserver
Insert the symbol (ticker) of the stock, then click on "Visualize Stock" to fetch and visualize its data 📈.
You can zoom in the generated graph and reset the zoom with the "Reset Zoom" button above it.
Select a prediction method from the dropdown menu, then click on "Predict" 🔮.
Checkout the repo, open it with Visual Studio Code: debug configurations are there. You know what to do.
- Use skforecast for time series prediction
- Real-time data fetching