Financial Stock Price Forecasting API
Position: Backend Engineer, Software Engineer, Project Manager
Type: Team project (in progress)
Duration: September 2025 - Present
Stack: Java, Python, Spring Boot, GitHub Actions, Postman
Skills: API design, systems architecture, CI/CD, Machine Learning, Natural Language Processing
Summary
?force=true override
Objective
Our Financial Stock Price Forecasting API is a Java-based REST API that forecasts short-term stock movements by combining quantitative (historical prices) and qualitative (market sentiment) signals. The system ingests market data from Alpha Vantage and news sentiment from Hugging Face transformers, producing confidence-adjusted predictions via three model pipelines—stock, sentiment, and combined fusion. We will deploy API endpoints for X-day price, X-day sentiment, and next-day combined prediction.
Why This API?
While components like sentiment APIs and stock price feeds already exist, a single developer-facing platform that merges price data and sentiment analytics into one system and produces predictive outputs rather than just raw scores is uncommon. Our Financial Stock Price Forecasting API fills that gap by unifying both signals into a reproducible forecasting API with caching, standardized schemas, and modular endpoints for analytics and scalability.
Methods
-
Modular microservice design: Built with Spring Boot
and separated into
StockDataService,NewsDataService, andForecastDataService, orchestrated by a unifiedCompositeController. - Data ingestion layer: Pulls daily time series from Alpha Vantage and real-time news articles, storing results in local JSON cache to limit API calls and accelerate repeated requests.
- Model orchestration: Each endpoint triggers one of three predictive models—TrendMaster (price), Hugging Face BERT (sentiment), and a custom fusion model combining the two for next-day output (planned).
-
Cache & freshness control: Custom validation for
stock (24 h) and sentiment (6 h) responses; optional
?force=trueparameter to override. - Testing & documentation: Utilize Postman suites and command-line curl validation; automated Maven build and test cycle.
Key Features
- X-day stock prediction: Time-series model forecasts near-term prices using Alpha Vantage daily or intraday data.
- X-day sentiment prediction: Transformer-based model computes mean sentiment trajectory from recent financial headlines.
- X-day combined prediction: Weighted fusion of stock and sentiment forecasts for improved directional accuracy.
-
Adaptive endpoints: Works for any equity ticker;
supports custom horizon (
?horizon=1d). - API-first design: JSON-formatted responses.
API Endpoints
-
GET /market/daily?symbol=AMZN— Retrieves daily stock data (open, close, high, low, volume) -
GET /market/sentiment?symbol=AMZN— Retrieves news sentiment data for given ticker (very positive, positive, negative, very negative, neutral) -
GET /market/predict?symbol=AMZN&horizon=1d— Generates X-day stock price prediction (price) -
GET /market/combined?symbol=AMZN— (Planned) Combines stock + sentiment models for X-day forecast