SuperAPI AI Directory

tuige-shortline-trading

General & other

View repository

Updated 10-16 06:52

About this skill

Tuige Shortline Trading

Scope of Application

This skill is used to organize the short-term rules in Tui Ge's system into a reusable decision-making framework, focusing on answering 4 types of questions:

  • What is suitable to do in the current market environment
  • Which stocks are worth entering the watchlist and candidate pool
  • Trigger conditions and invalidation conditions under different trading scenarios
  • How position, discipline, and exit rules are uniformly constrained

Capability Boundaries

  • What is output is decision-making reference, not a promise of returns
  • Prioritize the use of structured rules, do not directly repeat slogans
  • Do not place orders automatically, do not replace backtesting, do not replace investment advisory
  • When encountering ambiguous concepts, first return to glossary.md

Recommended Order of Use

  1. First read market-regime.md
  2. Then read stock-selection.md
  3. Enter the following documents according to the scenario:
  4. Finally use exit-failure-rules.md and position-discipline.md to review
  5. If unified terminology is needed, check glossary.md

Scenario Map

  • api-reference/market-regime.md
    • First determine whether aggressive short-term trading is allowed today, only pullback confirmation is allowed, or one should stay in cash
  • api-reference/stock-selection.md
    • Unify stock pool construction, strong stock screening, and avoidance rules
  • api-reference/trend-setups.md
    • Handle trend continuation, pullback to moving averages, and restart after consolidation on reduced volume
  • api-reference/limit-up-pullback-setups.md
    • Handle the consolidation structure after a limit-up, such as three bearish candles not breaking a bullish candle, kneading lines, and pullback on reduced volume
  • api-reference/relay-setups.md
    • Handle high-risk relays such as one-to-two, two-to-three, and 2+2
  • api-reference/washout-breakout-setups.md
    • Handle end-of-washout confirmation such as golden pits, false breakdowns, and volume breakout after extreme volume contraction
  • api-reference/exit-failure-rules.md
    • Unify take-profit realization, trend invalidation, structural failure, and risk exit
  • api-reference/position-discipline.md
    • Unify position levels, trial-and-error discipline, and frequency reduction rules

Standard Output Template

The output should uniformly include the following structure:

  1. Current market environment
  2. Scenario modules allowed for use today
  3. Candidate pool grading
  4. Current structure type
  5. Trigger conditions
  6. Invalidation conditions
  7. Sell observation points
  8. Position recommendation
  9. Reasons for explicit avoidance

For a single target, it is recommended to organize using the following fields:

  • Target
  • Theme it belongs to
  • Current structure
  • Entry basis
  • trigger
  • invalidation
  • Sell reference
  • risk
  • position_grade

Usage constraints

  • Write all conclusions as much as possible in the form of "condition / risk / invalidation"
  • If there is no trigger, it does not count as a buy point
  • The market environment is the master switch; when the environment does not support it, do not force an upgrade of the conclusion
  • If the same target simultaneously matches multiple scenarios, prioritize retaining the scenario explanation with lower risk and clearer definition

Engineering Transformation

The current directory already provides executable scripts, using a unified daily_decisions / realtime_quotes / strategy_lab structure:

  • scripts/daily_decisions.py
    • Main board liquidity pool scan + trend_pullback signal
    • Output two types of buy references:from_previous_day_close and from_last_close
    • Support sell signal checks for holdings files
    • Default maximum holdings limit 8(can be lowered via --max-holdings )
  • scripts/realtime_quotes.py
    • Batch-fetch current price snapshots for the specified codes
  • scripts/strategy_lab/strategy_params.py
    • Parameters and position limit configuration
  • scripts/strategy_lab/strategies.py
    • Rule engine core (current version: trend pullback + RSI range + invalidation exit)

Run

SKILL_DIR="<本 skill 绝对路径>"
python3 "$SKILL_DIR/scripts/daily_decisions.py" --json

Common parameters:

  • --top-n: stock pool size, default 120
  • --max-holdings: maximum position limit, default 8
  • --max-buys: buy output limit, default 8 (will ultimately be further constrained by max-holdings )
  • --holdings: position file path, one code per line
  • --roundtrip-cost-bps: cost filter, default 45
  • --entry-consensus-min: robust consistency threshold, default 0.67
  • --disable-robust-check: disable robustness check (debug only)

Notes

  • The current engineered version is tuige_shortline_v1, prioritizing the implementation of the parts that are "quantifiable and reproducible".
  • Thematic semantics, announcement semantics, order book sealing-order game theory, etc. still belong to the next-stage enhancement items.