How sahniaditya007/stockmarketanalysis works
This repository is a stock-analysis app with a React interface and Flask image API, plus a separate interactive Python analysis script. The web workflow collects a symbol and date range, requests a plot, downloads historical prices, and returns a chart. The standalone script additionally reports statistics, fits and evaluates a linear regression, and plots future predictions. The README is empty; the architecture reflects the supplied tree and sampled source.
Main entry points: stock_analysis.py Historical data and statistics · stock.jsx Plot request and display · app.py Flask plot handler · App.jsx Symbol and dates
Components 14
Web interface
- React entry
react-app/src/main.jsx - Symbol and dates
react-app/src/App.jsx - Plot request and display
react-app/src/stock.jsx
Plot API
- Flask plot handler
app.py - Historical prices
app.py - Returns and chart
app.py
Interactive analysis
- Analysis inputs
stock-analysis/stock_analysis.py - Historical data and statistics
stock-analysis/stock_analysis.py - Price and return charts
stock-analysis/stock_analysis.py - Regression and evaluation
stock-analysis/stock_analysis.py - Future price predictions
stock-analysis/stock_analysis.py
Other components
- User
- Yahoo Finance
- Browser
Connections 16
- User → Symbol and dates: enters inputs
- React entry → Symbol and dates: renders
- Symbol and dates → Plot request and display: passes inputs
- Plot request and display → Flask plot handler: requests plot
- Flask plot handler → Historical prices: downloads prices
- Historical prices → Yahoo Finance: fetches history
- Historical prices → Returns and chart: supplies prices
- Returns and chart → Flask plot handler: returns PNG
- Flask plot handler → Plot request and display: serves image URL
- Plot request and display → Browser: displays image
- User → Analysis inputs: enters inputs
- Analysis inputs → Historical data and statistics: supplies query
- Historical data and statistics → Yahoo Finance: fetches history
- Historical data and statistics → Price and return charts: supplies prices
- Historical data and statistics → Regression and evaluation: supplies data
- Regression and evaluation → Future price predictions: predicts future