Stock-Analyzer is an application designed to analyze stock data retrieved from an external API and provide useful insights for investing. 💼
Provide investment recommendations based on an automated analysis of broker activity, rating changes, and price projections. 📈
- Docker installed on your system 🐳
.envfile in the backend directory 🛠️
-
Configure the environment 🧪:
- In the backend directory, make sure to include a
.envfile based on the provided.env.example. - You can copy and rename it using the following command:
cp backend/.env.example backend/.env
- Then, edit the
.envfile with the necessary configurations.
- In the backend directory, make sure to include a
-
Start the project 🏁:
- From the project root, run the following command:
docker-compose --profile dev up
- This will start the necessary containers to run the application.
- From the project root, run the following command:
-
Open the App Web UI 🔄:
- Go to http://localhost:8082
- Once there, click on the "Sync Stocks" button to fetch the latest stock data.
Once the containers are up and running, you can access the application through the following URLs:
- CockroachDB Web UI: http://localhost:8080/
- API: http://localhost:8081/
- App Web UI: http://localhost:8082/
- Data Collection: It gathers all the stocks that had relevant movements on a specific date.
- Recommendation Processing: Each stock is automatically evaluated based on three factors:
- 📊 Rating changes.
- 🧾 Actions taken by brokers (such as raising the target price).
- 💰 Growth potential based on the target price change.
- Score Calculation: Each factor is assigned a specific score. Stocks are sorted by this score and the top 5 are shown.
- Result: The user receives a clear recommendation, with an explanation, score, and potential growth.
// Stock evaluation:
score = ratingScore + actionScore + potentialGrowth- RatingScore: Assigned based on rating improvement or deterioration.
- ActionScore: Based on broker actions (e.g., upgraded rating, raised target).
- PotentialGrowth: Percentage change between the previous and new normalized target price.
| 🎯 Action | 🔢 Points | 📘 Meaning |
|---|---|---|
| ✅ Upgraded by | +8 | Rating of the stock was improved. |
| 🟢 Target raised by | +7 | Target price was increased. |
| 🟡 Target set by | +6 | A target price was set for the first time. |
| 🟡 Initiated by | +5 | Coverage of the stock was initiated. |
| 🟡 Reiterated by | +4 | Rating was reiterated. |
| 🔴 Downgraded by | +3 | Rating was lowered. |
| ❌ Target lowered by | +1 | Target price was decreased. |
| 🏷️ Rating | 🔢 Points | 📘 Interpretation |
|---|---|---|
| ✅ Strong-Buy, Buy, etc. | +5 | High expectation of price increase. |
| 🟢 Outperform, Overweight | +4 | Expected to perform better than the market. |
| 🟡 Hold, Neutral, etc. | +3 | Expected to remain stable. |
| 🔴 Underperform, Negative | +2 | Expected to perform below the market. |
| ❌ Sell | +1 | Recommendation to sell. |
Apple Inc. (AAPL)
- ⭐ Score: 14.3
- 🔍 Reasons:
- Rating improvement from Hold to Buy (+2)
- Action taken: Target raised by JP Morgan (+7)
- Increase in target price by 52.86% (+5.3)
- 📈 Growth potential: 52.86%
Perfecto, aquí tienes el apartado para agregar al README.md sobre cómo desplegar la aplicación en AWS usando Terraform:
To deploy this application on an AWS EC2 instance using Terraform, follow these steps:
-
Terraform installed.
-
AWS credentials configured in your system (
~/.aws/credentialsor environment variables). -
An SSH key generated using
ed25519.You can generate one with the following command:
ssh-keygen -t ed25519
Save the private key securely, as it will be required to access the instance.
-
Navigate to the Terraform folder:
cd terraform -
Initialize Terraform:
terraform init
-
Apply the configuration:
terraform apply
Confirm when prompted. This will create an EC2 instance and set it up for deployment.
-
Upload your configured
.envfiles to the corresponding folders in the instance:backend/.envfrontend/.env
-
Access the EC2 instance via SSH, then navigate to the app directory and run:
docker-compose --profile prod up -d
-
✅ Your app should now be live and running on your EC2 instance!
This project is intended for educational and informational purposes only.
All investment decisions are the sole responsibility of the user. I am not responsible for any financial losses or outcomes resulting from the use of this tool. Please do your own research and consult a professional financial advisor before making any investment.


