A High-Performance Client-Server Stock Analysis Tool Developed for the Adquisición y Transmisión de Datos (ATD) Course, 2025-2026.
StockPulse is a financial intelligence tool designed to bridge the gap between raw market data and actionable insights. By integrating multiple data acquisition techniques —including REST APIs and Dynamic Web Scraping— the system provides a 360-degree view of any stock ticker.
The project follows a Client-Server architecture implemented via TCP Sockets, ensuring a separation of concerns where the server handles heavy data lifting and the client focuses on interactive visualization.
-
Multi-Source Integration: Correlate technical price history with fundamental ratios and real-world news.
-
Advanced Data Acquisition: Utilize
Selenium,Requests, andRESTful APIs. -
Efficient Transmission: Implement a robust
Socketcommunication protocol to transfer complex JSON payloads. -
Data Refinement: Apply filtering and mapping logic to transform raw data into human-readable economic interpretations.
| Category | Tools |
|---|---|
| Language | Python 3.11+ |
| Data Acquisition | Selenium, BeautifulSoup (Testing), Requests |
| APIs | TwelveData, Financial Modeling Prep (FMP) |
| Networking | Sockets (TCP/IP), JSON serialization |
| Visualization | Plotly, Tabulate, Webbrowser |
The system is divided into three main components:
The engine of the project. It listens for incoming connections and orchestrates data retrieval from four distinct sources:
-
TwelveData API: Retrieves historical closing prices from the last 365 days.
-
FMP API: Fetches analyst consensus, price targets, and future growth estimates.
-
Finviz (Selenium): Scrapes the "Snapshot" table for real-time fundamental ratios like P/E, ROE, and Debt/Eq.
-
El Mundo (Selenium): Performs an advanced search for the latest economic news in Spanish related to the company.
A user-friendly interface that:
-
Connects to the server via IP and Port.
-
Validates tickers using the
yfinancelibrary. -
Receives and unpacks JSON data.
-
Generates an interactive Plotly graph and renders a formatted financial report in the terminal.
A modular playground used during development to isolate functions and debug scraping selectors before integration.
We exceed the requirement of members + 1 sources by integrating 4 high-value sources, relating technical trends with market sentiment and public news.
Raw data is processed via generate_financial_summary. This function maps obscure API keys to readable names and adds an "Economic Interpretation" column to help users understand metrics like RSI or Debt/Equity.
Implemented a full TCP Socket lifecycle:
- Server-side: Concurrent-ready binding on port 10000 and listening for requests.
- Client-side: Structured request-response pattern using encoded JSON strings.
- Clone the repository:
git clone [https://github.com/your-username/stockpulse-atd.git](https://github.com/your-username/stockpulse-atd.git) cd stockpulse-atd - Install dependencies: The system relies on libraries such as
socket,seleniumorrequestsfor data acquisition, transmission and display.pip install -r requirements.txt
- Run the server: Execute
server.pyscript to start the backend. The server will bind to the local IP and listen for TCP connections on port 10000.python .\server.py - Run the client: In a separate terminal, launch the
client.pyscript. The application will prompt you for the server's IP address and port to establish the socket connection.python .\client.py