Taiwan Precision Stock Screener Agent Onboarding

2026-06-10
agent-skillinvestingtaiwan-stockssetup-guidepublished

Taiwan Precision Stock Screener Agent Onboarding

This note is written for an agent that needs to install and operate Marcus's Taiwan stock-analysis skill in a new environment.

The skill is tw-precision-stock-screener: a conservative Taiwan equity screening workflow derived from himself65/finance-skills, then tightened for repeatability, cutoff safety, and high precision. It is built to find a short list of high-confidence Taiwan stock candidates, not to maximize the number of winners it can mention.

Use this note to set up the skill, understand the original workflow, and add the new interactive mode: Progressively Reverse Training.

This is research and education, not investment advice. Never describe any output as certain, guaranteed, or a personalized instruction to buy.

What This Skill Does

The skill screens Taiwan TWSE/TPEX stocks as of a specified date.

It merges:

Then it applies a frozen high-precision policy:

  1. Liquidity.
  2. SEPA trend quality.
  3. Revenue and earnings momentum.
  4. Growth-adjusted valuation.
  5. Extension risk.
  6. Veto layer for crowded, overextended, cyclical, or low-quality false positives.
  7. Optional information overlay using dated MOPS/IR/news/social evidence.

The preferred failure mode is "too few names." The skill should miss some winners rather than flood the user with false positives.

Source Package

Download the complete package:

tw-precision-stock-screener-v2.tar.gz

SHA-256:

d5d01af24f5a11a612a031d45b0eac56f878e29dc6b4436444f87357ac32303a

The package contains the full skill source:

tw-precision-stock-screener/
├── SKILL.md
├── agents/openai.yaml
├── references/data-sources.md
├── references/filter-policy.md
├── references/finance-skills-map.md
├── references/information-overlay.md
├── references/output-contract.md
├── references/progressive-reverse-training.md
├── references/tradingview-watchlist.md
├── references/universe.md
├── scripts/screen.py
├── scripts/tradingview-watchlist-sync.mjs
└── scripts/watchlist.py

The package intentionally excludes __pycache__ and local runtime state.

Agent Installation

If the target environment is Codex, install into ~/.codex/skills. If the target is Claude Code or another skill runner, adapt the skill root but keep the internal directory name unchanged.

mkdir -p ~/.codex/skills ~/.codex/state/tw-precision-stock-screener
curl -L "https://vault-pub.pages.dev/tw-precision-stock-screener-agent-onboarding/tw-precision-stock-screener-v2.tar.gz" \
  -o /tmp/tw-precision-stock-screener-v2.tar.gz
shasum -a 256 /tmp/tw-precision-stock-screener-v2.tar.gz
tar -xzf /tmp/tw-precision-stock-screener-v2.tar.gz -C ~/.codex/skills

Install Python dependencies:

python3 -m venv ~/.codex/state/tw-precision-stock-screener/.venv
source ~/.codex/state/tw-precision-stock-screener/.venv/bin/activate
python -m pip install yfinance pandas numpy beautifulsoup4

Smoke test:

python3 ~/.codex/skills/tw-precision-stock-screener/scripts/screen.py --help
python3 ~/.codex/skills/tw-precision-stock-screener/scripts/watchlist.py add 1815 5536 2327 8299
python3 ~/.codex/skills/tw-precision-stock-screener/scripts/screen.py \
  --as-of 2026-05-18 \
  --include 1815,5536,2327,8299 \
  --output-dir /tmp/tw-screener-smoke

Expected behavior:

Optional TradingView Sync

TradingView sync is optional and user-specific. Do not assume Marcus's browser profile exists in another environment.

The original Marcus setup uses:

Browser profile: ~/.clawdbot/browser/clawd/user-data
CDP URL: http://127.0.0.1:9223
TradingView lists: TW, Red list

If the friend wants TradingView sync, configure their own authenticated Chrome profile and then run:

node ~/.codex/skills/tw-precision-stock-screener/scripts/tradingview-watchlist-sync.mjs \
  --lists "TW,Red list"

The sync writes:

~/.codex/state/tw-precision-stock-screener/tradingview-watchlists.json
~/.codex/state/tw-precision-stock-screener/watchlist.json

tradingview-watchlists.json is the source-of-truth mirror. watchlist.json is only the Taiwan-stock cache consumed by the screener.

Never print TradingView cookies or session tokens.

Original Skill Context

The original public reference was himself65/finance-skills. Marcus's local skill is not a verbatim copy. It maps selected finance-skills ideas into a Taiwan-specific high-precision screener.

Mapped primitives:

Added by Marcus's skill:

Canonical Statuses

Use the exact status semantics from the skill:

QUALIFIED       All five gates pass and no veto. Screen-qualified, not guaranteed buy.
INFO_CONFIRMED Baseline WATCH plus cutoff-safe company-specific evidence and no overlay veto.
WATCH           Interesting enough to monitor, but not actionable now.
PASS            Setup is not high precision.
VETO            False-positive risk is too high.
DATA_GAP        User-requested/watchlist stock cannot be evaluated due to missing data.

Never treat WATCH as a direct buy. A WATCH result often means "good company, wrong entry" or "good thesis, not enough precision."

Frozen Filter Policy

Do not tune thresholds during a run. If the result feels wrong, report the weakness and propose a future versioned policy change.

Gate 1: Liquidity

Pass when both are true:

Gate 2: SEPA Trend Quality

Pass when:

The eight trend conditions:

  1. Price > 150MA and Price > 200MA.
  2. 150MA > 200MA.
  3. 200MA rising for roughly one month.
  4. 50MA > 150MA and 50MA > 200MA.
  5. Price > 50MA.
  6. Price >= 30% above 52-week low.
  7. Price within 25% of 52-week high.
  8. 12-month relative strength beats TAIEX.

Gate 3: Revenue and Earnings Momentum

Primary pass, when Q financial data is available:

Fallback, when Q financials are unavailable but revenue exists:

Revenue-only fallback can qualify a stock for WATCH, but not QUALIFIED.

Gate 4: Growth-Adjusted Valuation

Pass when:

Use sustained growth, not whichever single month looks best. Prefer YTD revenue YoY capped at 80%. Do not use latest monthly revenue YoY alone for valuation.

Gate 5: Extension Risk

Pass when:

This is the gate that separates "good company" from "high precision entry."

Veto Layer

Veto or downgrade when any applies:

Data Cutoff Rules

Historical as_of runs must not use future information.

Price and volume:

Monthly revenue:

Cutoff rule:

Quarterly financials:

Information overlay:

Information Overlay

Apply after the mechanical screen, not before.

Only baseline WATCH names are eligible for promotion to INFO_CONFIRMED.

Never promote:

Promote a WATCH name only when:

Good evidence:

Bad evidence:

Output Contract

Human reports should lead with:

  1. as_of date, data vintage, benchmark close.
  2. QUALIFIED candidates.
  3. INFO_CONFIRMED candidates.
  4. WATCH candidates.
  5. Watchlist/user-specified status.
  6. Veto/pass/crowding warnings.
  7. Caveats and data gaps.

Minimum table columns:

When information overlay is applied, also include:

Default Universe

The default universe is Taiwan AI and upstream supply-chain equities.

Categories:

Watchlist and one-run --include tickers are always merged into this universe.

Add stocks only when they plausibly connect to AI infrastructure, semiconductors, PCB/CCL, memory/storage, thermal/power, cleanroom/equipment, networking/optics, connectors, or related upstream inputs.

Progressively Reverse Training

Progressively Reverse Training is the new interactive mode.

It is designed for strategy learning, not one-off stock picking. The agent asks the user for a strategy idea, freezes it into a versioned hypothesis, then evaluates it on historical snapshots where the future answer is masked.

Core Mechanism

For each training round:

  1. Select a past as_of date, usually three months before the evaluation date.
  2. Build the stock state exactly as it was known on as_of.
  3. Hide all future returns, future revenue, future filings, future news, and future social discussion.
  4. Run the frozen policy and commit predicted positives.
  5. Reveal the forward three-month outcome.
  6. Compute precision and recall.
  7. Diagnose false positives and false negatives.
  8. Discuss changes with the user.
  9. Freeze the next policy version before the next round.

Initial Questions

Before running the mode, ask the user:

Then summarize:

policy_version: prt-YYYYMMDD-vN
universe:
as_of_dates:
prediction_statuses:
forward_window:
positive_label:
gates:
vetoes:
manual_overlay_allowed:
excluded_data:

If the policy includes new subjective criteria, ask the user to approve the frozen version before testing.

Masking Rules

Allowed before prediction:

Forbidden before prediction:

Metrics

The primary target is precision.

TP = predicted positive and future outcome is positive
FP = predicted positive but future outcome is not positive
FN = not predicted positive but future outcome is positive
TN = not predicted positive and future outcome is not positive

precision = TP / (TP + FP)
recall = TP / (TP + FN)
false_discovery_rate = FP / (TP + FP)
coverage = (TP + FP) / evaluated_universe_count

The system should optimize precision first. Recall is useful for understanding what the strategy misses, but the stated goal is: when the system says "this will likely rise," the hit rate should be high.

Recommended targets:

Failure Review

For false positives, classify:

For false negatives, classify:

Only promote a lesson into the next policy version if it explains multiple examples or a high-conviction edge. Do not add one-off exceptions to beautify the last score.

Progressively Reverse Training Report

Each report should include:

  1. Frozen policy version.
  2. as_of dates and cutoff rules.
  3. Prediction table before outcomes.
  4. Revealed outcome table.
  5. Precision/recall metrics.
  6. False-positive review.
  7. False-negative review.
  8. Proposed next policy version.
  9. Whether the result is provisional or sample-backed.

Use direct language:

Example Agent Prompts

Screen today:

Use tw-precision-stock-screener to screen Taiwan stocks for high-precision candidates as of today. Include the persistent watchlist and explain QUALIFIED, INFO_CONFIRMED, and WATCH separately.

Historical cutoff-safe screen:

Use tw-precision-stock-screener as of 2026-03-31. Do not use any April or later data. Include 5536, 2308, and 3443. Explain which data was available by the cutoff.

Add tracked stocks:

Add 1815, 5536, 2327, and 8299 to the screener watchlist, then run the current screen.

Progressively Reverse Training:

Use Progressively Reverse Training. I want to test a strategy: find Taiwan AI supply-chain stocks that are not yet crowded but have strong revenue acceleration and acceptable entry risk. Use a three-month forward window and optimize for precision.

Setup Checklist for the Friend's Agent

Before saying the skill is ready:

Common Mistakes

Handoff Summary

This skill is best understood as a precision-first research harness:

If the friend wants to adapt it to another market, create a new skill fork. Do not quietly reuse Taiwan-specific MOPS/TWSE/TPEX assumptions for non-Taiwan equities.