# CAPITAL GATE — RESEARCH ANCHOR

Status: RESEARCH ONLY
Date: 2026-09-23

For a new chat/session, read `docs/NEXT_CHAT_HANDOFF.md` first. The mandatory next step is an audit of existing LAB infrastructure before creating or extending capital-gate code.

## Core idea

The market is already interpreted by DATASET passport + strategy profile machinery. The capital gate MUST NOT re-analyze the market and MUST NOT grade individual profiles.

It observes the resulting continuous DEMO equity behavior and decides only whether new LIVE capital may be deployed.

States:
- ACTIVE — new LIVE entries allowed.
- SLEEP — new LIVE entries blocked.
- WAKE — transition back to ACTIVE after DEMO equity recovery is confirmed.

## Architecture

`DATASET passport -> profiles / filters / bans / shadow logic -> DEMO always on -> DEMO equity -> capital gate -> LIVE entry permission`

Responsibilities:
- Profiles make ROI and adapt to market conditions.
- DEMO is the always-on sensor of the complete current system.
- Capital gate protects capital from sustained deterioration of the resulting system curve.
- LIVE is only a consumer of permission.

## Hard rules

1. SLEEP blocks only NEW LIVE entries.
2. SLEEP must NOT stop DEMO.
3. SLEEP must NOT reset stats, profiles, bans, passport state, or shadow research.
4. Existing LIVE positions keep their own stop/trailing/floor/protection lifecycle unless an explicit separate policy says otherwise.
5. Gate decisions must be causal: only information available before a candidate LIVE entry may be used.
6. No future lookahead.
7. Technical data gaps must not be interpreted as strategy degradation.
8. `combatsolo.info` is reference/read-only unless explicitly authorized otherwise.

## Technical-gap validation

DEMO equity may contain discontinuities caused by server/runtime failures or resets.
Parser2 is used only as an independent continuity validator, not as a trading signal.

When equity jumps unexpectedly:
- compare the jump with actual `POSITION_CLOSED` PnL in the same bucket;
- check Parser2 market continuity for the same interval;
- if the move is not explained by real closes and Parser2 remained continuous, mark it `TECH_GAP`;
- preserve gate state across the technical gap and do not treat the jump as drawdown/recovery.

## What the gate is NOT

The gate is NOT:
- a BTC direction predictor;
- a bull/bear/flat classifier;
- a replacement for profiles;
- a profile-quality switch;
- a second passport;
- an optimizer of individual entries.

It answers only: should new LIVE capital be deployed now, or should it sleep while DEMO continues observing/adapting?

## Current research finding

A first 14-day LONG-only causal test showed that simple LONG -> WAIT gating can remain profitable while reducing some bad exposure, but naive fixed high-watermark thresholds are not yet sufficient.

A previously detected invalid test filtered by state at trade CLOSE time and overstated performance. That result is invalid and must not be reused. Correct tests decide state at ENTRY time.

Current disposable research probe:
- `datasetis.info/tools/research_equity_capital_gate.php`

The current research direction is to evaluate curve-shape deterioration/recovery rather than blindly use fixed absolute PnL thresholds.

## Intended future flow

`DEMO curve healthy -> ACTIVE`

`DEMO curve persistently deteriorates -> SLEEP`

`DEMO continues trading/adapting while LIVE sleeps`

`DEMO curve recovers and confirms -> WAKE -> ACTIVE`

Later, when SHORT is fully ready, the higher-level permission layer may evolve toward `LONG / SHORT / SLEEP`, while remaining separate from profile internals.
