Skip to content

An advanced financial forecasting system that combines classical statistical models (ARIMA, SARIMA, Exponential Smoothing) with machine learning techniques to deliver real-time market insights. Built with a robust Flask backend and an interactive Streamlit dashboard, Euclid integrates real-time data from yfinance.

License

Notifications You must be signed in to change notification settings

Ronit26Mehta/Euclid-Computer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Euclid: Predictive Analytics Platform


Table of Contents


πŸ“Œ Project Overview

Euclid: Predictive Analytics Platform is an advanced financial analytics and predictive modeling system designed to harness the power of modern data science techniques. Drawing inspiration from the iconic Euclid computer in the movie Pi, this platform is built to unravel complex market dynamics and provide actionable insights through robust forecasting models.

At its core, Euclid leverages both classical statistical methods and contemporary machine learning approaches to deliver highly accurate financial predictions. By integrating real-time data feeds with powerful visualization tools, it enables users to monitor market trends, evaluate investment opportunities, and make data-driven decisions.

Key aspects include:

  • Data-Driven Decision Making: Utilizes historical and real-time data to forecast future trends.
  • Customizable Analytics: Provides flexibility to select data sources, models, and forecast parameters.
  • User-Centric Design: An intuitive dashboard powered by Streamlit ensures accessibility and ease-of-use.
  • Robust Architecture: Built with a Flask-based backend that includes comprehensive error handling and retry mechanisms to ensure reliability.

πŸš€ Features

  • Time Series Forecasting:

    • Implements various statistical models such as ARIMA, SARIMA, and Exponential Smoothing.
    • Allows users to experiment with different forecasting techniques based on historical trends.
  • Real-Time Financial Data Acquisition:

    • Integrates with yfinance to fetch real-time stock, cryptocurrency, and market data.
    • Ensures that users always have access to the most current financial information.
  • Sentiment Analysis:

    • Utilizes TextBlob for extracting sentiment from market news and social media.
    • Provides insights into market mood and potential impacts on stock performance.
  • Interactive Dashboard:

    • Developed using Streamlit, it offers a dynamic, user-friendly interface.
    • Features interactive charts and graphs powered by Plotly for enhanced data visualization.
  • REST API:

    • The Flask-based backend exposes endpoints for data processing, prediction generation, and sentiment analysis.
    • Ensures seamless communication between the frontend and backend modules.
  • Robust Error Handling & Retry Logic:

    • Implements automatic retries using the Tenacity library to manage transient errors.
    • Extensive logging and exception management to maintain system stability.
  • Extensible Architecture:

    • Designed to support future enhancements and additional data sources.
    • Modular codebase allows for easy integration of new machine learning models and visualization tools.

πŸ—οΈ Project Structure

Euclid-Computer/
β”œβ”€β”€ Backend/
β”‚   └── Euclids_backend.py      # Flask API for financial data processing, forecasting, and analytics.
β”œβ”€β”€ FrontEnd/
β”‚   └── EuclidFrontEnd.py       # Streamlit dashboard for interactive data visualization and user interaction.
β”œβ”€β”€ README.md                   # Comprehensive project documentation.
β”œβ”€β”€ Euclid System INC.docx      # Detailed system overview and design documentation.
└── requirements.txt            # List of Python dependencies for the project.

Each module has been carefully designed to ensure separation of concerns, allowing the backend to focus solely on data processing and the frontend to provide a seamless user experience.


πŸ”§ Installation & Setup

Prerequisites

  • Python 3.8+: Ensure you have the correct version of Python installed.
  • Pip: Python package installer.
  • Git: Version control system for cloning the repository.
  • Internet Connection: Required for fetching real-time financial data and dependencies.

1️⃣ Clone the Repository

Open your terminal and execute:

git clone https://github.com/your-username/Euclid-Computer.git
cd Euclid-Computer

2️⃣ Install Dependencies

Install all necessary packages using the provided requirements.txt:

pip install -r requirements.txt

Note: If you encounter any issues, consider creating a virtual environment for project isolation.

3️⃣ Run the Backend (Flask API)

Navigate to the Backend directory and start the Flask server:

cd Backend
python Euclids_backend.py

This will launch the REST API, which listens for incoming requests on the specified port (typically 5000).

4️⃣ Run the Frontend (Streamlit Dashboard)

Open a new terminal window, navigate to the FrontEnd directory, and run the Streamlit application:

cd ../FrontEnd
streamlit run EuclidFrontEnd.py

The dashboard will open in your default web browser, providing interactive access to the platform's features.


🎯 API Endpoints

The backend exposes several REST API endpoints to facilitate communication and data retrieval:

Endpoint Method Description Example Usage
/api/predict POST Accepts input parameters and returns financial predictions. curl -X POST http://127.0.0.1:5000/api/predict -d '{"symbol": "AAPL", "model": "ARIMA"}'
/api/data GET Retrieves market data for specified assets. curl http://127.0.0.1:5000/api/data?symbol=AAPL
/api/sentiment GET Analyzes and returns sentiment data based on market news. curl http://127.0.0.1:5000/api/sentiment?query=Apple

Each endpoint is documented with input parameters and expected output formats to simplify integration with external systems.


πŸ› οΈ Technology Stack

Backend:

  • Flask: A lightweight WSGI web application framework used to build the RESTful API.
  • Pandas: For data manipulation and analysis.
  • Statsmodels: Provides classes and functions for the estimation of many different statistical models.
  • Scikit-Learn: Used for scaling and basic machine learning functionalities.
  • Tenacity: Implements robust retry logic to handle transient errors.
  • Logging: Python’s built-in logging module for detailed system logging.

Frontend:

  • Streamlit: Framework for building interactive web applications.
  • Plotly: Graphing library for interactive, publication-quality graphs.
  • YFinance: Library to fetch financial data from Yahoo Finance.
  • TextBlob: Simplifies the process of performing sentiment analysis.
  • Requests: For making HTTP requests to the backend API.
  • Caching: Implemented to optimize performance by reducing redundant data fetches.

Machine Learning Models:

  • ARIMA: Autoregressive Integrated Moving Average for time series forecasting.
  • SARIMA: Seasonal ARIMA, an extension of ARIMA that supports seasonality.
  • Exponential Smoothing: Forecasting method for univariate data.

🀝 Contributing

We welcome contributions from the community! Follow these steps to contribute:

  1. Fork the Repository: Click the "Fork" button at the top right of the GitHub repository page.
  2. Create a New Branch:
    git checkout -b feature-branch
  3. Make Your Changes: Implement new features or bug fixes. Make sure to follow coding standards and write clear, concise commit messages.
  4. Commit Your Changes:
    git commit -m "Description of changes"
  5. Push to Your Fork:
    git push origin feature-branch
  6. Open a Pull Request: Navigate to the original repository and open a pull request, describing your changes in detail.

Please ensure that your code is well-documented and includes tests where applicable.


πŸ“œ License

This project is licensed under the MIT License. For more details, please refer to the LICENSE file in the repository.

MIT License Summary:

  • Permission: Free to use, modify, distribute, and sublicense.
  • Conditions: Attribution must be provided.
  • Disclaimer: The software is provided "as-is", without warranty of any kind.

πŸ“’ Acknowledgments

  • Inspiration: The Euclid computer from Pi served as a major inspiration for the project’s name and conceptual framework.
  • Contributors: Special thanks to all developers, contributors, and open-source libraries that made this project possible.
  • Community: Gratitude to the community for valuable feedback and continuous support.

❓ FAQ & Troubleshooting

Q: What do I do if the dashboard fails to load?

A: Ensure that the backend API is running without errors. Check the terminal logs for any error messages and verify that all dependencies are installed.

Q: How can I customize the forecasting models?

A: The backend code in Euclids_backend.py is modular. You can adjust parameters for ARIMA, SARIMA, or Exponential Smoothing directly within the code. Detailed comments in the source code guide you through customization.

Q: I’m experiencing issues with data retrieval from Yahoo Finance.

A: Make sure you have a stable internet connection. If problems persist, check the yfinance library documentation for updates or known issues.

Q: How can I contribute new features?

A: Please refer to the Contributing section above. We appreciate any improvements or bug fixes submitted through pull requests.


πŸš€ Future Roadmap

  • Advanced Machine Learning Integration: Incorporate deep learning models for enhanced prediction accuracy.
  • Expanded Data Sources: Support additional financial data providers and integrate more comprehensive market data.
  • User Authentication: Implement secure user authentication for personalized dashboards and data security.
  • Mobile App Version: Develop a mobile-friendly version of the dashboard for on-the-go analytics.
  • Enhanced Reporting: Automate report generation and email notifications for daily market summaries.

πŸ“ž Contact

For any queries, support requests, or feedback, please contact:


Euclid is committed to empowering users with actionable financial insights through innovative predictive analytics. Thank you for exploring our project and contributing to its evolution!

About

An advanced financial forecasting system that combines classical statistical models (ARIMA, SARIMA, Exponential Smoothing) with machine learning techniques to deliver real-time market insights. Built with a robust Flask backend and an interactive Streamlit dashboard, Euclid integrates real-time data from yfinance.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages