How mehassanhmood/portfolio-optimzation works
This repository combines a small Flask sentiment-analysis demo with a broader stock-market research project. The principal runtime workflow is a user entering text in the web page, the browser requesting analysis from Flask, and the server returning a FinBERT classification. The README also describes data collection, model development and evaluation, quantitative-data integration, and prediction goals; those research capabilities are represented at the level supported by the README and file tree. The notebook and dataset were not sampled, so their internal behavior is not inferred.
Main entry points: server.py Flask Server · main.ipynb Model Experiments · index.html Analysis Page · all-data.csv Market Sentiment Data
Components 11
Sentiment Web App
- Analysis Page
downstram-pipeline/templates/index.html - Browser Request
downstram-pipeline/static/mywebscript.js - Flask Server
downstram-pipeline/server.py - FinBERT Classifier
downstram-pipeline/SentimentAnalysis/sentiment_analysis.py
Model Research
- Model Experiments
main.ipynb - Market Prediction
main.ipynb - Model Evaluation
main.ipynb
Data Inputs
- Market Sentiment Data
all-data.csv
Other components
- User
- FMP API
- Kaggle
Connections 11
- User → Analysis Page: enters text
- Analysis Page → Browser Request: runs script
- Browser Request → Flask Server: requests analysis
downstram-pipeline/static/mywebscript.js - Flask Server → Analysis Page: renders page
downstram-pipeline/server.py - Flask Server → FinBERT Classifier: calls analyzer
downstram-pipeline/server.py - FinBERT Classifier → Flask Server: returns labels
downstram-pipeline/server.py - FMP API → Market Sentiment Data: provides sentiment data
README.md - Kaggle → Market Sentiment Data: provides training data
README.md - Market Sentiment Data → Model Experiments: supports analysis
README.md - Model Experiments → Model Evaluation: evaluates models
README.md - Model Experiments → Market Prediction: develops predictions
README.md