CASE FILE / RESEARCH SYSTEM

RESEARCH SYSTEM / RESEARCH SYSTEM

NEPSE Market Intelligence

A research system connecting price ingestion, technical indicators, news sentiment, ensemble prediction, backtesting, an API, and a dashboard.

Technical systems artwork for NEPSE Market Intelligence

SYSTEM QUESTION

Keep data provenance, feature construction, model inference, and evaluation visible as separate research stages.

Market data availability, synthetic fallbacks, model dependencies, and test assumptions can materially change what a prediction represents.

DIRECT ANSWER

What does NEPSE Market Intelligence do?

A research system connecting price ingestion, technical indicators, news sentiment, ensemble prediction, backtesting, an API, and a dashboard. It addresses market data availability, synthetic fallbacks, model dependencies, and test assumptions can materially change what a prediction represents.

ROLE & SCOPE

ROLE EVIDENCE

The inspected repository establishes a local research implementation but does not establish an individual contributor role.

AUDITED SCOPE

The audited slice covers ingestion, indicator generation, sentiment paths, the three-model ensemble, backtesting, API routes, dashboard code, and the generated report.

CONSTRAINTS

The ingestion path can synthesize historical prices, sentiment can fall back to generated or rule-based data, and no accuracy or return metric is published here.

ARCHITECTURE

  1. 01

    data

    Price ingestion

    loads cached price history, attempts current market data, or generates a synthetic fallback

    src/data_ingest.py
  2. 02

    data

    News sentiment

    uses generated news fallbacks and transformer or rule-based sentiment analysis

    src/news_sentiment.py
  3. 03

    internal

    Feature pipeline

    derives trend, momentum, volatility, and volume indicators

    src/indicators.py
  4. 04

    internal

    Ensemble predictor

    combines XGBoost, LSTM, and Transformer probabilities

    src/predictor.py
  5. 05

    boundary

    API and dashboard

    expose analysis through FastAPI routes and a Streamlit interface

    api/main.py

TRUST BOUNDARIES

  1. BOUNDARY 01

    Price data to research dataset

    Downloaded, cached, current, or generated price values enter feature construction.

    src/data_ingest.py
  2. BOUNDARY 02

    News text to sentiment features

    Scraped or generated headlines enter transformer or rule-based sentiment analysis.

    src/news_sentiment.py
  3. BOUNDARY 03

    HTTP client to model execution

    Ticker, date range, and strategy parameters reach prediction and backtest functions.

    api/main.py

SECURITY DECISIONS

RISKCONTROLSOURCE

Malformed ticker input reaching model and data-loading paths.

The prediction route normalizes ticker text and bounds its length.

api/main.py

Research consumers mistaking generated history for observed market history.

The ingestion code emits an explicit synthetic-data message, but provenance still needs stronger propagation into outputs.

src/data_ingest.py

IMPLEMENTATION EVIDENCE

  1. sourcesrc/indicators.py

    Indicator engine

    The feature code computes moving-average, momentum, volatility, and volume families.

  2. sourcesrc/predictor.py

    Ensemble path

    The predictor trains and combines XGBoost, LSTM, and Transformer components.

  3. sourcesrc/backtest.py

    Backtest engine

    The engine models positions, transaction costs, slippage, and evaluation metrics.

  4. reportreports/final_report.md

    System report

    The local report documents architecture and methodology without a fixed performance result.

VERIFIED OUTCOMES

  1. Research stages are callable through prediction, sentiment, and backtest API routes.

    api/main.py
  2. A local Streamlit interface renders price history, indicators, and model-facing views.

    dashboard/app.py

OPEN HARDENING

  1. 01

    Carry observed-versus-generated provenance into every API and dashboard result.

    src/data_ingest.py
  2. 02

    Replace unrestricted API CORS with an explicit consumer allowlist before network exposure.

    api/main.py