Contrarian Setup Gate is the synthesis step of a three-step contrarian process. It reads the JSON reports from the COT crowding detector, the news-reaction failure analyzer and the weekly price-action confirmation, and combines them into a single status such as CROWDED, WATCHING_PRICE, READY_FOR_PLAN, REJECTED or INSUFFICIENT_EVIDENCE.
It runs entirely on local files. A missing, unreadable, stale or inconsistent report never counts as a pass; it is named in the output and blocks or downgrades the status. The gate does not place or recommend orders and is not investment advice.
What You Get
- A setup status of READY_FOR_PLAN, WATCHING_PRICE, CROWDED, REJECTED or INSUFFICIENT_EVIDENCE
- A list of missing or blocking confirmations, each with its state and reason
- Direction, entry trigger and invalidation level when all three steps confirm
- A decision table reference that covers every reachable combination of the three step states
Common Use Cases
- Seeing which pipeline step still blocks a futures setup
- Checking whether stale or mismatched report files were used
- Handing a confirmed direction and stop reference to a position sizing step
- Re-running a past date with a fixed as-of value to get the same result
What Makes It Unique
Each step is settled fully before the next file is consulted, so an earlier definitive verdict is never softened by a later problem. The as-of date is required, so staleness checks give the same result on every rerun. Input files are rejected if they contain any non-finite number anywhere, which keeps every output a valid JSON file even with adversarial input. A bad input file produces a report that names the reason and exits normally.
Under The Hood
The agent runs a local Python script that reads up to three JSON report files and writes a JSON file and a Markdown file into an output folder (reports/ by default), so it creates files on disk. The script makes no network calls, reads no environment variables for credentials and needs no API key. A second module holds the pure decision logic and a reference file holds the decision table.