Case Study · Problem → Solution → KPI/ROI

Realtime U.S. Stock Analysis Program

An internal tool for realtime analysis and prediction across 5,000+ U.S. listed stocks and ETFs, with 15m / 1h multi-timeframe support.

Coverage
5,000+ U.S. stocks/ETFs
Timeframes
15m · 1h configurable
Historical validation
backtest period
Risk decision
stopped after regime shift
Role
ML · Data Analysis · UX
Period
2023-2025
Team
solo design/build
Codebase
Python
#RealtimeInference#CosineSimilarity#MultiTimeframe

This case explains historical validation and a stop decision; it is not investment advice or a performance guarantee.

TL;DR

Role & Impact

  • Designed the end-to-end UX of a data product: collect → analyze → realtime inference → share.
  • Kept a KPI/ROI board visible to support a 10-minute time-to-insight on an i9-13900K baseline.
  • Validated signal quality during the 2024.11-2025.01 live-test period, then stopped after a market-regime change.

Technical History

  • Core stack: Python and MySQL.
  • Model path: Regression → LSTM → SVM → Transformer → SVR → XGBoost → Dask → cosine similarity.
  • Improved speed through cosine similarity and condition tuning: 48x vs Regression, 3-4x vs Dask.
  • Improved MySQL performance about 3x through connection-pool and thread tuning.
  • Built CPU-based formula pipelines for preprocessing and postprocessing.

Problem

User & Context

  • Needed automation for large-universe, multi-timeframe analysis across U.S. stocks/ETFs.
  • Needed one screen for signal validation, realtime deployment, and output sharing.

Needs & Pain Points

  • Compare signal quality and risk KPIs across 15m/1h timeframes.
  • Expose cause and ROI impact when a run fails.
  • Detect and handle missing values and outliers in realtime data.

Core Solution Strategy

1) One-screen workflow

Collect → analyze → realtime inference → preview in a single flow.

2) Multi-timeframe realtime flow

Process 15m/1h configurable windows with realtime inference streams.

3) Cosine-similarity engine

Managed historical validation and post-regime-shift degradation separately.

4) Recovery and risk

Separated pre/post-event regimes with step logs, cancellation, restart, and rollback flows.

Design-to-Code Mapping

Collector

Collect 5,000+ U.S. stock/ETF time series at 15m/1h intervals.

Analyzer

Cosine-similarity pattern matching and tuning metrics.

Preview/UI

Realtime comparison/prediction charts and file export.

KPI & ROI Frame

KPI Definition

  • Coverage: 5,000+ U.S. stocks/ETFs.
  • Signal Quality: directional signal quality in historical validation.
  • TTI: collect → preview = 10 minutes on Intel i9-13900K.
  • Win Rate: about 95% in the historical test context.
  • Reproducibility: no variance under identical historical-data conditions.

Sensitivity, Not Investment Claims

The scenario explains the historical test period and does not represent future returns.

  • Live test: 2024.11-2025.01.
  • Interpretation: validation numbers are for model-quality inspection.
  • Stop decision: strategy stopped after tariff-related market-regime changes in 2025.

Includes no fees, slippage, taxes, execution failure, or FX effects; this is a recruiting risk-management case.

Core Flow

Data refresh → analysis → sharing

  1. Select SourceChoose the analysis universe.
  2. CollectRefresh data and handle errors.
  3. ConfigureReview analysis parameters.
  4. AnalyzeRun, show progress, and allow cancellation.
  5. PreviewReview result charts and tables.
  6. ShareExport spreadsheets and rerun.

Impact & Result

Metrics

  • Coverage: 5,000+ symbols.
  • Signal Quality: confirmed in the historical validation period.
  • Risk Outcome: strategy stopped after tariff-driven regime changes.

Business Result

  • 2024-05: explored commercialization from backtest performance.
  • 2025-04: accuracy dropped after the Trump administration and tariff war context, so the strategy was discarded.

Confirmed the limits of a similarity-based pattern strategy under regime shifts.

Measurements were reported from logs, trade records, and Excel metadata; public materials clearly separate historical validation from future performance.