Projects / MarketLens AI

ML

MarketLens AI

An AI-powered stock decision support system that analyzes market trends and real-world signals. Models (Random Forest, LightGBM) generate insights over a PostgreSQL data layer, with a React front end for exploring decisions.

FastAPIPythonReactPostgreSQLLightGBM

01 Walkthrough

One short demo and two screens from the product.

Screenshot 01
Screenshot 02

02 Stack layers

Interface

ReactDecision dashboards

API

FastAPITyped contractsOpenAPI

ML & data

Random ForestLightGBMPostgreSQL

03 Architecture

REQUESTGET /signals/AAPL/decisiontracing
storetrainrecentinferMarket FeedsPrices · fundamentalsEXTSignal SourcesNews · eventsEXTClientDashboardCLIENTIngest WorkersNormalizeSVCFastAPIDecision APISVCPostgreSQLMarket storeDATAFeature PipelineWindows · indicatorsSVCModel EnsembleRF · LightGBMSVC

Ingest workers store market and signal data. FastAPI pulls recent features, runs the ensemble, and returns a scored decision.

  • React UI for exploring market decisions
  • FastAPI + ML ensemble (Random Forest, LightGBM)
  • PostgreSQL for market/financial data

04 Engineering challenges

01

Signal fusion

Market prices and unstructured real-world signals are normalized into one comparable feature space.

02

Training pipeline

Windowed feature generation and scheduled retraining keep the ensemble current as market regimes shift.

03

Fast inference

Model loading, caching, and lean feature queries keep decision endpoints responsive.

04

Explainability

Tree-based models expose feature importance, so a decision can always be traced to its drivers.

05 Trade-offs & decisions

PostgreSQLvsMongoDB

Time-series joins across instruments, signals, and predictions are fundamentally relational.

FastAPIvsFlask

Async IO and typed contracts fit ML serving; OpenAPI docs come free.

RF + LightGBMvsDeep learning

On tabular financial data, gradient boosting wins on accuracy per unit of training cost, and it stays explainable.