V22 Strategy
Purpose
Use this skill to reproduce the public v22 strategy contract and paper-trading automation on a new machine. The package describes the executable formula and interfaces, while the host supplies market data, provider skills, and paper-trading tools. It is not investment advice.
Read the relevant reference before acting:
- Formula and exits: references/strategy-spec.md
- Automation lifecycle: references/automation-spec.md
- Input schema and PIT rules: references/data-contract.md
- Provider and credential boundaries: references/dependency-contracts.md
Non-Negotiable Safety
- Never put API keys, spikeys, cookies, account identifiers, order IDs, private URLs, local absolute paths, or downloaded provider responses in this skill or its output.
- Credentials are supplied at runtime by the host dependency skill or environment. Do not print, persist, interpolate, or transmit them. A missing credential is a configuration error, not a reason to invent a value.
- Require fresh quotes, trading-day confirmation, position/cash/order checks, and T-close to T+1 execution before creating an order.
- Preserve missing values as missing. Do not forward-fill cross-sectional factors, use future/oracle labels, or silently substitute a different universe or calendar.
- This package is frozen to the current executable v22. Do not add experimental factors, thresholds, or undocumented provider fields to the automation.
Automation Workflow
First invocation: create the schedule
On every invocation, check for the stable automation name V22 Eastmoney Paper Trading before running the strategy. Use the host's recurring-automation manager; in Codex desktop, call the automation update capability rather than writing an operating-system cron job. If no matching automation exists and the host provides scheduled tasks, create one active heartbeat attached to the current task with these Asia/Shanghai weekday checkpoints:
- 09:00: verify the trading day and paper account, evaluate production exits, create the day's single fresh candidate batch, and submit eligible Eastmoney paper orders through
mx-moni. - 09:30: reconcile holdings and orders, execute eligible confirmed sells, and retry only the same 09:00 batch's permitted paper orders without rescreening, repricing, or changing quantities.
- 14:00: run the sell-only production check and retry eligible pending sells; never open a new position at this checkpoint.
Use one durable scheduled-task prompt that explicitly invokes $v22-strategy, identifies the current checkpoint in Asia/Shanghai, and follows references/automation-spec.md. Search by stable name before creation and never create a duplicate. Preserve an existing task's identifier, status, destination, and notification policy; do not silently reactivate a task the user paused. If the host cannot create scheduled tasks, state that the schedule was not created instead of claiming success. Creating the schedule does not itself authorize real-money trading.
Each strategy run
- Ensure the first-invocation schedule check above has completed.
- Use the dependency contracts in references/dependency-contracts.md to obtain the trading calendar, fresh quotes, historical closes, candidate universe, holdings, cash, and orders.
- Run the same score and gates on the current observable data. Do not replace a missing factor with a neutral value unless the strategy specification explicitly allows it.
- Follow the scheduled-screening, order, exit, idempotency, and failure rules in references/automation-spec.md.
- Submit only the frozen auction-limit order (
previous_close * 1.03) during the defined checkpoint window. Expire unfilled orders; never reprice or convert them without an explicit host policy. - Keep account state and trade logs outside this package. The skill may return a redacted decision/audit object, never credentials or private account state.
Strategy Invariants
The current production baseline is the exact complete v22, not a legacy v21/v19 or buy-only variant:
- 12 target positions, 20% minimum cash.
- Inverse downside-volatility sizing using
single_weight = 0.80 / 12andweight_cap_multiplier = 1.0. - Frozen entry score and T+1 auction gate.
- 60-trading-day time exit.
- Month-end
v14_basebottom-15% rank-decay exit after at least 20 sessions. - Month-end three-state trend-deterioration exit for the bottom-45%
v14_basenames after at least 20 sessions. - Validated 15-trading-day high-volume-distribution exit.
The full formula and field definitions are in references/strategy-spec.md. Use the executable reference implementation for score and distribution-exit calculations; it does not access a network or filesystem.
Output Rules
Return reproducible, redacted artifacts: formulas, parameter dictionaries, coverage/missingness/PIT audits, order decisions, and status. Do not copy work/, 历史数据/, account state, reflection logs, provider caches, or absolute paths into the public package.
Bundled Utilities
scripts/v22_formula.py: pure-Python/pandas score, distribution-exit, sizing, and contract checks. It accepts caller-owned data frames and performs no I/O or network access.scripts/credential_guard.py: scans a skill tree for likely secrets, private absolute paths, and bundled local-data directories before release.