$

Praxis

This document bridges analysis and action. It describes where Ghost’s knowledge meets trading practice, and how the system learns from experience.


The Decision Boundary

Ghost outputs end at a clear boundary:

Ghost Domain                    │  Human Domain
────────────────────────────────┼────────────────────────────────
Levels with confluence          │  Which level to enter at
Director alignment/conflict     │  How to weight disagreement
Zone status (IN_PRIMARY, etc)   │  Whether to act on status
R:R at each zone               │  Position size per R:R
Flags (earnings, gamma, etc)   │  What the flags mean for me

Ghost presents structured data. The trader applies context, risk tolerance, and judgment.


Session Workflow

Pre-Session

# Run full analysis on watchlist (20 LLM calls each)
ghost run VST
ghost run META
ghost run AMZN

This populates the KB with Market Aggregator output: entry zones, targets, stops, flags.

Pre-Market

# Check for setups across watchlist (zero API calls)
ghost scout scan

# If holding a position, activate defense mode
ghost run VST --entry 159.71

Scout surfaces actionable setups from KB. Defense mode shifts analysis from “where to enter” to “what to do with position.”

During Session

# Monitor for intraday signals
ghost intraday VST

# Re-scan if prices moved
ghost scout scan

Intraday analysis detects gaps, sweeps, opening range breaks, volume anomalies.

End of Day

# Verify predictions against actual outcomes
ghost verify VST

# Review guardrail accuracy
ghost guardrails

This feeds the self-correction loop. Predictions are marked hit/miss.


Execution Modes

Ghost surfaces two modes. A setup can be scalp, swing, both, or neither.

ModeTimeframeStop LogicTarget LogicR:R Threshold
ScalpMinutes to hoursOR low, air pocketVWAP, POC, mean reversion>1.0
SwingDays to weeksBelow structural levelFib extensions, prior highs>1.5

Mode Detection

SituationWhat Ghost Shows
Overdone dip, not at structureSCALP only — mean reversion trade
At structure, not overdoneSWING only — wait for level test
Overdone dip INTO structureBOTH — scalp now, swing if continues
Neither overdone nor at structureWAIT — no setup

See ONTOLOGY.md Execution Mode Concepts for full treatment.


Zone-Based Trading

Entry zones cascade:

primary (highest) > secondary > aggressive (lowest) > stop_loss

All three zones required. Stop must be below aggressive.

Zone Status Actions

Scout classifies current price vs zones:

Zone StatusMeaningTypical Action
IN_PRIMARYPrice inside primary zoneEntry candidate
IN_SECONDARYPrice inside secondary zoneEntry candidate (deeper dip)
IN_AGGRESSIVEPrice at panic zoneEntry candidate (low conviction)
JUST_ABOVE_PRIMARYWithin 2% above primaryWait for zone
IN_GAPBetween zonesNo confluence — wait
EXTENDED>2% above primaryNo setup currently
BELOW_ZONESBelow all zonesThesis in question

R:R Calculation

R:R = (scalp_target - zone_midpoint) / (zone_width / 2)

Ghost calculates R:R at each zone. The trader decides minimum acceptable R:R.


Position Management

Defense Mode

When holding a position, pass --entry to shift analysis:

ghost run VST --entry 159.71

This activates guardrails:

GuardrailWhat It Checks
Sweep completionIs there an active sweep trapping your entry?
Max pain proximityIs price being pinned near expiration?
Catalyst overrideIs there a binary event overriding technicals?
AH momentumIs extended hours action signaling tomorrow’s direction?

Exit Optimization

Defense mode shifts from entry zones to exit guidance:

RecommendationMeaning
hold_for_targetStructure supports continuation
wait_for_entryUnderwater but thesis intact
exit_nowStructure broken, cut loss
hold_with_cautionMixed signals, tight stops

Post-Mortem Methodology

When analysis fails, trace backwards:

Outcome → Aggregator output → Director synthesis → Agent analysis → Data input

Error Categories

CategoryWhere to LookFix
Data errorTools returned wrong/stale dataFix tool, refresh data source
Agent misreadAgent misinterpreted correct dataAdjust agent prompt hermeneutics
Director misynthDirectors disagreed, wrong one weightedAdjust director synthesis logic
Aggregator artifactAggregator introduced biasRemove from aggregator constraints
Narrative attributionAgent explained price move by citing headline, but flow moved first — the headline was the label, not the causeApply narrative forensics: trace the 5 observable channels (state logistics, actor behavior, counterparty behavior, risk pricing, speculative positioning) to find when the market actually knew. See NARRATIVE_FORENSICS.md
Human overrideTrader ignored good analysisNot a system error

Correction Process

  1. Identify — Which layer failed?
  2. Isolate — Test that layer in isolation (ghost test [stack])
  3. Correct — Adjust prompt or logic
  4. Validate — Zero-cost validation (ghost prompt render)
  5. Verify — Run full analysis, compare to known-good

Backtest Process

For systematic evaluation:

1. Scorecard

Track predictions systematically:

FieldPurpose
TickerWhat was analyzed
DateWhen
ZonePrimary/secondary/aggressive
Entry priceWhere Ghost said to enter
TargetWhere Ghost said to exit
Actual outcomeWhat happened
Hit/MissDid it work?
ConditionsMarket conditions at time

2. Audit

Group by condition to find systematic errors:

"Multi-TF squeeze" predictions: 12 total, 4 hits = 33% accuracy
"Near max pain on Friday" predictions: 8 total, 7 hits = 87% accuracy

3. Correction

If a condition shows systematic error, adjust:

4. Replay Validation

Re-run corrected prompts against historical data:

ghost prompt render [agent] --ticker VST

Zero-cost validation of prompt changes.

5. Live Verification

After correction, track next N live predictions for that condition. If accuracy improves, correction is valid.


Resource-Aware Practice

Ghost runs cost API quota. Practice with awareness.

CommandLLM CallsUse Case
ghost run~10Full pipeline — use sparingly
ghost test news7-8Test news stack changes
ghost test technical~10Test technical stack changes
ghost test strategist --use-cache1Test aggregator with cached inputs
ghost test vst-module1Test VST module prompt changes in isolation (uses cached upstream theses + live env data)
ghost scout scan0KB-only watchlist scan
ghost prompt render0Zero-cost prompt validation (includes vst-module for VST module template)

Quota Rules

  1. Never run ghost run more than twice per development session for testing
  2. For prompt changes, use ghost test [stack] in isolation
  3. For syntax validation, use ghost prompt render at zero cost
  4. If quota hits 429, stop immediately — do not retry
  5. Batch changes, verify together

Feedback Integration

Ghost’s feedback loop:

Run → Predict → Verify → Learn → Adjust → Run
StageWhat Happens
RunAnalysis produces prediction
PredictPrediction saved with conditions
VerifyAuto-verify after 1hr via yfinance
LearnAccuracy stats updated with decay weighting
AdjustDirectors see track record in prompts
RunNext analysis informed by history

The system doesn’t just predict — it learns from predictions.


Scout Cold-Start Behavior

Scout scoring has two effective regimes depending on prediction history:

Structural-only (cold start): When fewer than 3 verified predictions match the current condition combination, get_multi_condition_accuracy() returns accuracy_pct: None, which maps to a 1.0x multiplier — no adjustment. Scout scores using structural factors only: zone status, R:R, conviction, director bias.

Full scoring (warm): Once enough verified predictions exist, Scout applies condition-aware accuracy weighting. The system degrades gracefully — it progressively relaxes conditions (dropping lowest-priority first: day_of_week, then gap proximity, then director confidence, etc.) until it finds at least 3 matching predictions. This means partial condition matches activate before full matches do.

Bootstrapping a new ticker requires multiple ghost run calls to build prediction history, plus time for auto-verification (predictions must be >= 1hr old). This has quota cost implications — budget accordingly. The structural-only scores are still useful; condition accuracy adds refinement, not the foundation.