How I designed and built Biniyog's three-layer stock intelligence engine: fundamental ranking, technical analysis, and AI-driven sentiment analysis - giving retail investors professional-grade insights for every company on the Dhaka Stock Exchange.
Biniyog.com.bd is Bangladesh's digital stock brokerage platform serving retail investors on the Dhaka Stock Exchange. By 2024, the trading product was strong - users could buy, sell, manage portfolios, and practice with paper trading. What it didn't have was an answer to the most important question every investor asks before placing a trade: is this company actually worth investing in right now?
Retail investors in Bangladesh were making decisions based on tips, hearsay, and gut instinct - not because they didn't want data, but because professional-grade analysis was either paywalled, too complex, or simply unavailable for the DSE market. Bloomberg terminals and equity research reports exist for institutional players. Retail investors had almost nothing.
Biniyog already had the raw ingredients - live DSE feeds, financial performance data, news from multiple sources. What was missing was the analytical layer that turned raw data into actionable intelligence. I proposed building Company Analysis as a comprehensive, three-layer intelligence product covering every dimension a serious retail investor cares about: company fundamentals, price and volume technicals, and real-time market sentiment.
The product vision: Give every Biniyog user the kind of stock analysis that previously required either a Bloomberg subscription or a professional fund manager. Not simplified - genuinely comprehensive, but presented clearly enough that a retail investor can act on it with confidence.
When I mapped what investors actually needed before committing capital, three distinct gaps emerged. Each pointed to a different type of analysis - and together they formed the blueprint for the three-layer architecture.
Company Analysis is presented to users as a single cohesive product - tap a company, see a complete picture. But underneath, three independent analytical engines run in parallel, each with its own data sources, processing logic, scoring methodology, and update schedule.
A full walkthrough of the Company Analysis feature on the live Biniyog platform - showing fundamental scores, technical signals, and sentiment analysis in use.
The fundamental ranking system evaluates every DSE equity company on a weekly basis. I designed the analytical framework myself - defining which metrics matter, how much weight each should carry, and how to handle the edge cases that break naive scoring systems.
I categorised the 16 metrics into two groups. The weighting reflects what actually drives long-term investment returns for DSE companies - profitability and financial health carry the most weight because they're the most reliable predictors of company resilience.
Risk adjustment: I specified market-group penalties so the final score is risk-adjusted - not just a financial metric aggregate. Z-group companies carry a scoring penalty reflecting the elevated risk they carry, giving the ranking a more honest picture of investment quality.
During development, a critical issue emerged: all companies were receiving an identical fundamental score. The root cause was a baseline value collision - when too many companies had similar values, the percentile calculation collapsed, producing an undifferentiated flat score for everyone.
I resolved this by redesigning the scoring methodology with a dual approach: percentile-based scoring when data is sufficiently varied across companies, and absolute threshold scoring - for example, ROE ≥20% earns 95 points, 15–20% earns 80 points - when percentiles collapse. This produced a realistic score distribution from 20–95 and made rankings genuinely useful. The decision about when to use which approach, and where to set the absolute thresholds, was mine to make - and it required judgment about what "good" financial performance actually looks like for DSE companies.
The technical analysis engine processes daily price and volume data for every DSE equity company, computing over 50 indicators and aggregating them into a single technical score with full category breakdown. I specified the category framework, the weighting structure, and the signal presentation logic.
The weighting reflects the relative reliability and relevance of each category for retail investor decisions. Trend indicators carry the most weight because they capture the clearest, most actionable signal - is the price moving up or down over time? Momentum confirms trend strength. Volume validates whether a price move has genuine market participation behind it.
Signal clarity over data density: Each indicator produces a labelled signal - BUY, WEAK_BUY, NEUTRAL, WEAK_SELL, SELL - rather than a raw score. I specified this signal vocabulary deliberately. A retail investor looking at an RSI of 35 doesn't know what to do with that number; seeing "WEAK_SELL" with a plain-language explanation gives them the same information in an actionable form. The underlying maths stays intact; the presentation becomes human.
The sentiment layer is where I made the most deliberate choice to apply AI as a core product capability. The volume of daily market news in Bangladesh is far beyond what any manual process can analyse consistently. I designed an automated NLP pipeline to handle it at scale.
Each news item passes through three NLP scoring methods, combined into a final sentiment score and aggregated at company, sector, and market level:
Optimised for short, news-style financial text. Handles vocabulary like "margin compression," "revised upward," "dividend cut" better than general-purpose models. Produces a score from −1.0 (most negative) to +1.0 (most positive).
General-purpose sentiment analysis providing a second signal that catches sentiment patterns VADER may miss. Running two models and comparing outputs also provides a confidence signal - high agreement = higher confidence score.
DSE-specific vocabulary weighting that I specified to catch industry signals general models miss - terms specific to Bangladeshi market context, regulatory language, and sector-specific financial terminology.
Why AI here and not elsewhere: I used AI for sentiment because scale was genuinely the bottleneck. The alternative - manual analysis - covers 5–10 companies per analyst per day. The AI pipeline covers 300+ companies and thousands of news items daily with consistent methodology. This is not AI as a gimmick; it's AI as the only viable solution to a real scale problem. The confidence scoring on every output makes uncertainty explicit, so users never mistake a low-confidence signal for a high-conviction recommendation.
North Star: Weekly active users engaging with Company Analysis - the metric that confirms the feature is being used for real investment decisions, not just browsed once and forgotten. "Engaged" means looking up a company before placing a trade, not just opening the section.
| Layer | Metric | Why it's on the dashboard |
|---|---|---|
| Adoption | % of active traders using Company Analysis before placing a trade | The core value hypothesis: does the feature change trading behaviour? If traders consult Company Analysis before deciding, it's doing its job. High trading volume with zero Company Analysis usage means the feature failed to integrate into the actual decision-making flow. |
| Adoption | New users acquired via Company Analysis as an entry point | Investment intelligence features attract users who wouldn't sign up for a basic brokerage. Tracking new registrations where Company Analysis was the first feature engaged tells us whether the feature expands the addressable user base, not just serves existing users. |
| Engagement | Companies analysed per session per active user | Depth signal. A user who analyses 5 companies per session is building an investment thesis, not glancing at a number. This distinguishes serious users from casual visitors and informs where to invest in depth vs. breadth. |
| Engagement | Session return rate - % of users engaging weekly for 4+ consecutive weeks | Investment analysis is only useful if it becomes a habit. Weekly return for 4+ weeks signals the feature has become part of the user's regular investment process - the strongest indicator of long-term retention value. |
| Quality | Fundamental coverage - % of active DSE companies with complete rankings | If a user looks up a company and sees "no data available," the feature has failed that use case. Coverage is a quality floor metric that must stay high or the analytical layer becomes unreliable as a comprehensive market tool. |
| Quality | Sentiment pipeline freshness - % of days with same-day analysis | Sentiment on yesterday's news is significantly less valuable than same-day analysis. This metric ensures the AI pipeline runs reliably and delivers fresh signals. A drop here is an early warning of pipeline failure before users report stale data. |
| Business | Trade volume uplift from Company Analysis users vs. non-users | The business case for the feature. If Company Analysis users show higher trade volume, the feature is demonstrably generating business value - not just product engagement. |
| Business | Plan conversion - free to premium for Company Analysis power users | Advanced analytical features are a natural driver of premium plan upgrades. Users who rely on the analysis for real decisions have the highest willingness to pay for enhanced features and historical depth. |
User stories, acceptance criteria, and the data-to-insight pipeline as specified in the product requirements.
| ID | As a… | I want… | So that… |
|---|---|---|---|
| US.1 | Retail investor evaluating whether to buy a company | a scored view of the company's financial health compared to peers in the same sector | I can make an evidence-based decision rather than relying on tips or gut instinct |
| US.2 | Trader who has decided to invest in a company | clear technical signals - trend direction, momentum, and volume confirmation - for that company | I know whether this is the right moment to enter a position, not just whether the company is worth owning |
| US.3 | Investor monitoring a company already in my portfolio | an aggregated sentiment score based on today's news about that company and its sector | I can react to market mood changes quickly without reading through dozens of news sources myself |
| US.4 | Investor who doesn't know much about technical analysis | indicator results presented as plain-language signals (BUY / SELL / NEUTRAL) rather than raw numbers | I can use the technical analysis without needing to understand what an RSI of 35 or a MACD crossover means |
| # | Criteria | Owner | Verified by |
|---|---|---|---|
| AC.1 | Fundamental rankings must produce a realistic score distribution. Dual scoring - percentile-based with absolute threshold fallback - must be implemented. No more than 10% of companies within ±2 points of any single value. | DSE / BE | QA: verify score range spans at least 20–90 across all companies |
| AC.2 | Fundamental ranking execution must complete in under 5 seconds for 300+ companies. API response time for all ranking endpoints must be under 200ms. | BE | Load test: trigger weekly run, measure wall-clock time; API latency measured with standard tooling |
| AC.3 | Every technical indicator output must include a plain-language signal label. Raw scores must be secondary in the UI - accessible on expansion, not shown by default. | FE | Design review: signal labels visible without expanding any element; raw scores only on expanded view |
| AC.4 | Sentiment analysis must process all three source types daily and produce company, sector, and market-level aggregations available by 8 AM each trading day. | Python / BE | Monitoring: pipeline run log checked at 8:30 AM; alert if any source type produces zero articles processed |
| AC.5 | Every analytical output must display a confidence score or data freshness indicator. No score is shown without context for how reliable it is. | FE | QA: verify confidence score visible on every company fundamental card; verify "as of date" present on all technical and sentiment outputs |
How raw market data becomes the analytical signals a user sees when they tap a company in the Biniyog app.