Skip to content

Devansh-Kushwaha/StockPortfolio-PredictorApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Portfolio Tracker

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.


Features

  • 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.

Tech Stack

  • 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

Installation and Setup

  1. Clone the Repository
    git clone https://github.com/Devansh-Kushwaha/StockPortfolio-PredictorApp.git
    cd stock-portfolio-tracker
    
  2. Set Up Virtual Environment
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install Dependencies
    pip install -r requirements.txt
    
  4. 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
    
  5. Run Migrations
    python manage.py makemigrations
    python manage.py migrate
    
  6. Run the Development Server
    npm run dev (for frontend)
    python manage.py runserver (for backend)
    

API Endpoints

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

Future Enhancements

  • Advanced Analytics: Risk analysis and portfolio diversification insights.
  • Notifications: Real-time price alerts and updates.
  • Multi-currency Support: Track portfolios in various currencies.

Limitations

  • 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.

Deployment

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
    git checkout -b feature-name
  3. Commit your changes.
    git commit -m "Add feature-name"
  4. Push to your forked repository.
    git push origin feature-name
  5. Create a pull request.

Licence

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Contacts

Devansh Kushwaha
Email: devansh.67.kushwaha@gmail.com
GitHub: Devansh-Kushwaha
LinkedIn: Devansh Kushwaha

About

The Stock Portfolio and Predictor App is a comprehensive platform that allows users to track their stock investments and predict future stock trends using advanced machine learning algorithms. Designed to provide an intuitive and seamless experience, this app is perfect for both novice and experienced investors.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages