Documentation

📖 How to Read the Bayesian Stock Forecast Terminal

Welcome to the documentation. This terminal replaces unreliable LLM market prompts with a deterministic, reproducible quantitative tool. All technical indicators, probability calculations, and validation checks run entirely in native TypeScript.

← Back to terminal

Overview

This page explains how to read the terminal and how each forecast is calculated. The goal is to give you the concepts in plain language — not the internal code structure — so you can interpret any ticker run with confidence.

Section 1

🔎 The Core Checkpoint: Out-of-Sample Validation

Before evaluating any trade setup, look at the Validation block. This is the ultimate guardrail for your capital.

  • What it does: The terminal uses expanding-window walk-forward validation. It steps through history one period at a time, makes out-of-sample predictions, and scores them against "climatology" — the historical base rates of the asset — using log-loss and accuracy.
  • The Blend Rule: When the network's historical predictions are uncertain, the forecast is automatically shrunk toward the historical prior. The blend weight is chosen by whichever mix performed best in the walk-forward test.

How to read it:

Beats base rates: YES

The model has identified structural patterns in history that provide a valid statistical edge (Edge > 0.0000).

Beats base rates: NO

The model is guessing blindly under the current market regime. The Learner View will hard-gate this as "NO EDGE — DO NOT RISK CAPITAL".

Section 2

📊 Posterior Forecast Engine

The terminal pulls daily open-high-low-close-volume data for the ticker and aligns it with the Nasdaq-100 (QQQ) as a broader market benchmark. Each indicator is then categorized into discrete states:

MomentumStrong-down / Down / Flat / Up / Strong-up at strict ±2% and ±10% boundaries.
RSI(14)Oversold (<35), Neutral, or Overbought (>65).
Volume RatioLow, Normal, or Spike based on a 20-day average.
VolatilityAutomatically calculated via log returns and categorized into low/mid/high terciles unique to that specific asset's trading history.

Using today's discrete state as evidence, the terminal runs exact Bayesian inference by enumeration. It outputs the mathematical probability of the asset gaining more than 10% or losing more than 10% over 15-trading-day (3 weeks) and 20-trading-day (4 weeks) horizons.

Section 3

🎯 Feature Selection via Mutual Information

The terminal does not treat every indicator equally. It ranks all six technical indicator nodes by Mutual Information (MI) against the forward-return target bucket.

It then selects only the top 3 highest-ranking nodes to drive the inference model, fitting conditional probability tables with Laplace/BDeu smoothing. The indicator with the highest MI score is reported as the primary market driver for that ticker right now.

Section 4

⏳ Historical Analogues

The terminal isolates every historical day in the asset's history that shared the same combination of discrete states as today. These are the historical analogues.

  • Sample Count ("Cell n"): When the current state cell has ≥20 historical samples, the median target and 80% band come from the empirical forward-return distribution of those exact matching days. If it has fewer than 20 samples, it safely falls back to a lognormal distribution band at current realized volatility.
  • The Forward Path: Use the 20-day cumulative median return array to optimize trade entry timing. If Days 1–5 show a negative path trend, history suggests waiting for an initial shakeout or pullback before entering.
Section 5

📐 Key Levels & Monte Carlo Barriers

  • Support & Resistance: The terminal builds a price ladder using swing pivots and volume-by-price nodes from the last year of trading data, assigning each level a strength score.
  • First-Touch Barriers: If you input an optional Entry, Stop-Loss, and Target on the run screen, the terminal executes a continuous Geometric Brownian Motion (GBM) Monte Carlo simulation. It reports the probability of your target being hit before your stop, plus the mathematical Expected Value (EV) of the trade.

⚠️ Honest Analytical Limits

Always remember the boundaries of pure mathematical models:

  1. 1. Technical Boundary: The model only sees price action, volume metrics, and index states. It cannot see unannounced macro shocks, earnings reports, corporate restructuring, or regulatory shifts.
  2. 2. The Context Filter: Use the optional News Overlay to bridge this gap. If the math shows a strong technical edge, but live headlines indicate severe fundamental overvaluation or catalyst risk, adapt your trade thesis accordingly.

Not investment advice.

Feedback

🗳️ Vote on What's Next

These are the features we're considering. Click "Want this" on anything you'd actually use — your votes decide what we build first.

Position sizer

Calculate share size from account value, risk %, entry, stop and target. Includes smart stops, take-profit planning and PDF export.

0 votes
Portfolio / trade journal

A full trading journal: ledger, calendar, analytics, playbooks, mistake tags and performance review.

0 votes
"Size this trade" from a report

Jump straight from any forecast report into the position sizer, pre-filled with the last close and the report's key levels.

0 votes
Log a planned trade from the sizer

Save a sized trade to the journal as a planned position, linked back to the forecast that produced it.

0 votes
Broker / CSV import

Import closed trades from a broker statement or CSV so the journal stays in sync without manual entry.

0 votes

One vote per feature per person. Results are public on this page.