A web application to help users manage and track their stock portfolios. Built with Django REST Framework for the backend, MySQL for data storage and React JS framework for frontend.
- User Authentication: Secure login and signup.
- Portfolio Management: Add, update, and remove stocks in your portfolio.
- Real-time Market Data: Fetch the latest stock prices and calculate portfolio performance.
- Cost Prediction: Take a look at our stock cost prediction through Machine Learning models to take better decisions.
- Frontend: React JS
- Backend: Django REST Framework
- Database: MySQL
- API: Integration with third-party stock market APIs of Alpha Vantage & Yahoo Finance
- Hosting: Vercel for Frontend & Render for Backend
- Clone the Repository
git clone https://github.com/Devansh-Kushwaha/StockPortfolio-PredictorApp.git cd stock-portfolio-tracker - Set Up Virtual Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install Dependencies
pip install -r requirements.txt
- Set Up Environment Variables
Create a .env file in the project root and add the following:
API_KEY=your_api_keY DATABASE_PASSWORD=your_database_password DATABASE_USER=your_database_username DATABASE_NAME=your_database_name
- Run Migrations
python manage.py makemigrations python manage.py migrate
- Run the Development Server
npm run dev (for frontend) python manage.py runserver (for backend)
| Endpoint | Method | Description |
|---|---|---|
/api/stocks/ |
GET | View portfolio |
/api/stocks/create/ |
POST | Add a new stock |
/api/stocks/delete/<int:pk> |
DELETE | Remove a stock from the portfolio |
/api/stocks/update/<int:pk> |
PUT | Edit a stock in the portfolio |
/api/stocks/ predict |
POST | Get predictions of a stock's costd |
- Advanced Analytics: Risk analysis and portfolio diversification insights.
- Notifications: Real-time price alerts and updates.
- Multi-currency Support: Track portfolios in various currencies.
- Live Prices: The live stock prices are fetched only when the page is refreshed.
- Fallback for API Failures: If any of the external APIs fail to return a response, the stock price is defaulted to
$100. This serves as a debugging aid and helps in identifying API-related issues.
- Frontend: Vercel
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch.
git checkout -b feature-name
- Commit your changes.
git commit -m "Add feature-name" - Push to your forked repository.
git push origin feature-name
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Devansh Kushwaha
Email: devansh.67.kushwaha@gmail.com
GitHub: Devansh-Kushwaha
LinkedIn: Devansh Kushwaha