Building a Stock Analysis Engine: From Zero to Buy/Sell Signals in 2 Weeks
The Challenge
MoodFlow already had 5 AI content tools. But our users in Singapore, Malaysia, and Indonesia kept asking: "Can you add stock analysis?"
The requirements were brutal:
- Instant signal — not charts, not reports. A verdict.
- Multi-market — SGX, Bursa Malaysia, IDX
- Deep analysis — 18+ technical indicators + fundamentals + capital flow
- Free tier — daily picks at zero cost
The Tech Stack
| Layer | Choice | Why |
|---|---|---|
| Data | yfinance | Free, covers SG/MY/ID markets |
| Scoring | Custom Python engine | PE + ROE + revenue growth + OBV + MFI + volume ratio |
| AI Analysis | DeepSeek API | Deep analysis when rule engine shows ambiguity |
| API | FastAPI | Async, lightweight, JSON responses |
| Deployment | Singapore VPS | Low latency to SEA users |
The Scoring Engine
Total Score = Technical(40%) + Fundamental(35%) + Capital Flow(25%)
Technical: buy/sell signals × 5 → 0-100
Fundamental: PE(50pts) + ROE(30pts) + Revenue Growth(20pts) → 0-100
Capital: OBV(40pts) + MFI(35pts) + Volume Ratio(25pts) → 0-100
Each indicator is weighted and cross-checked. When the rule engine and AI disagree — that's a "deep divergence" signal, which actually tells you something interesting is happening.
The Result
- SG, MY, ID markets covered
- 10-second analysis turnaround
- Clear verdict: 🟢Buy / 🟠Hold / 🔴Sell / 🟡Wait
- Free daily picks for all markets
👉 Try the stock assistant: https://getmoodflow.com
🔮 Free Daily Fortune!
Built a stock engine, also built a fortune teller. One makes you money, one makes you smile. Both free.
Top comments (0)