Logo Close Auction Participation Strategy

Close Auction Participation Strategy

Cộng đồng
HimanshuJ16
close-auction-participation-strategy

Dùng khi cung cấp thanh khoản ở phía đối ứng trong phiên khớp lệnh đóng cửa tại Mỹ dựa trên nguồn dữ liệu mất cân bằng lệnh đã công bố, hoặc thực hiện tái cân bằng theo giá đóng cửa chính thức có bảo vệ giá. Với phiên khớp lệnh mở cửa, hãy dùng opening-auction-imbalance-based-execution.

Add to TypingMind

Tổng quan

Nhà phát hànhHimanshuJ16
Kho mãAlgo-Trading-Skills
Tên kỹ năngclose-auction-participation-strategy
Sao
50
Bản fork
7
Tệp đi kèm
5
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được HimanshuJ16 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Close Auction Participation Strategy trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/close-auction-participation-strategy
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/close-auction-participation-strategy .claude/skills/close-auction-participation-strategy
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Close Auction Participation Strategy trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Close Auction Participation Strategy ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Close Auction Participation Strategy với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

When to Use

Use this skill when participating in a US equity closing auction (Nasdaq Closing Cross, NYSE Closing Auction) to provide contra-side liquidity against a published imbalance, or to execute a rebalance order at the official closing price with price protection. The strategy consumes closing-auction imbalance data (paired shares, imbalance shares, imbalance side, near/far indicative clearing prices) and derives a Limit-On-Close (LOC) order that is legal to enter at the intended submission time.

When NOT to Use

Do NOT use it for the opening cross (see opening-auction-imbalance-based-execution), for halt/IPO crosses or the Extended Trading Close (different order types and cutoffs — the strategy rejects those NOII cross types), or as a way to take liquidity in the same direction as an imbalance. It is also not a substitute for a venue order-entry gateway: it produces order parameters, it does not submit or cancel orders.

Prerequisites

  • A closing-auction imbalance feed: Nasdaq TotalView-ITCH NOII message (type I, Cross Type C) or the NYSE closing imbalance publication.
  • Timezone-aware timestamps. The module converts everything to America/New_York and rejects naive datetimes — a naive UTC timestamp compared against an ET cutoff is how orders get sent after the deadline.
  • System clock synchronized (PTP/NTP), because every gate in this skill is a wall-clock deadline (see clock-synchronization-ptp-for-trading-hosts).
  • Knowledge of which venue's rules apply — the listing venue's cutoffs, not your broker's, govern acceptance.

Workflow

  1. Feed ingestion: Parse the imbalance message into NoiiMessage. Discard anything whose cross_type is not C; an opening or halt-cross NOII carries different semantics.
  2. Imbalance analysis: Compute the ratio with imbalance_ratio(paired_shares, imbalance_shares) = imbalance / (paired + imbalance). It returns 0.0 on an empty book rather than dividing by zero. Screen with min_imbalance_shares / min_imbalance_ratio so noise imbalances do not trigger orders.
  3. Entry-window gate — this is venue-specific, not a single "3:55 cutoff":
    • Nasdaq: MOC entry ends at 15:55 ET, LOC entry at 15:58 ET. An LOC entered from 15:55 onward may be re-priced to the 15:50/15:55 Reference Price, and is rejected outright if no 15:55 Reference Price exists — the returned order flags this as late_entry_reprice_risk.
    • NYSE: unconditional MOC/LOC entry ends at 15:50 ET. From 15:50 to 16:00 only orders contra to a published MOC/LOC Significant Imbalance are accepted, so set significant_imbalance_published=True only when the venue has actually published one.
    • Both venues freeze cancel/modify of on-close orders at 15:50 ET. Check can_cancel_or_modify(now) before assuming an order can be pulled.
    • Gate on the submission time, not the feed timestamp: pass submission_time so feed lag plus safety_buffer_seconds cannot push the order past the cutoff. An observation older than max_message_age_seconds at submission is refused as stale.
  4. Pricing: Derive the limit from the chosen price_basis. The Far price is the clearing price of the auction-only book; the Near price includes the continuous book. A non-positive far/near price means the venue has not disseminated one — Nasdaq publishes no indicative clearing price for the closing cross before 15:55 ET — and the strategy refuses to price an order rather than submitting a $0.00 limit. price_concession_bps trades price improvement for fill probability, and limits are rounded away from the aggressive side at tick_size.
  5. Sizing: Quantity is the floor of the smallest of max_participation_pct × imbalance_shares, max_auction_volume_pct × (paired + imbalance), and the caller's target_qty.
  6. Post-cross reconciliation: Match execution reports after the 16:00 cross against the official closing price (NOCP / NYSE Official Closing Price) and attribute any unfilled LOC quantity as opportunity cost.

Full procedure: see references/workflows.md. Standards and rule citations: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Assuming one cutoff time for all venues: there is no universal 3:55 PM deadline. Nasdaq MOC 15:55 / LOC 15:58, NYSE 15:50 (contra-side to a published imbalance until 16:00). Hard-coding one number either rejects legal orders or sends rejected ones.
  • Pricing off a far/near price that was never disseminated: Nasdaq sends no Near/Far Indicative Clearing Price for the closing cross before 15:55 ET. A naive parser reads the unsigned ITCH price field as 0 and submits a limit of $0.00. Treat any non-positive indicative price as absent.
  • Comparing naive timestamps to an ET cutoff: a UTC-stamped feed at 20:56Z is 15:56 ET, but compared raw it looks like it is well past every cutoff (or, in the other direction, safely before one). Always convert.
  • Checking the cutoff against the feed timestamp: the deadline applies to when the exchange receives the order. Budget for feed lag, strategy latency and broker hops with safety_buffer_seconds.
  • Acting on a stalled feed: closing-cross imbalance data updates every 1–10 seconds. If the last observation is minutes old the book has moved on, and sizing against it commits capital to an imbalance that may no longer exist — max_message_age_seconds blocks that.
  • Forgetting the 15:50 cancel/modify freeze: after 15:50 the contra-side order cannot be pulled on either venue. Size it as capital you are committed to trading at an unknown cross price.
  • Trading an imbalance that isn't one: ITCH imbalance direction O means "insufficient orders to calculate" and P means the security is paused; neither is a tradable side.
  • Adding to the imbalance: an unpriced MOC on the same side as a large institutional imbalance takes the worst of the cross print. This strategy is deliberately contra-side and always limit-priced.

Verification

  • Run python -m unittest discover -s skills/close-auction-participation-strategy/scripts.
  • Feed a Nasdaq NOII with a 100,000-share buy imbalance and 500,000 paired shares at 15:56 ET: expect a SELL LOC for 10,000 shares (10% of the imbalance) priced at the far indicative price, with imbalance_ratio ≈ 0.1667.
  • Feed the same message at 15:52 ET: expect no order and reason INDICATIVE_PRICE_UNAVAILABLE (Nasdaq has not published a far price yet). At 15:58 ET expect PAST_ENTRY_CUTOFF.
  • Feed it with venue=AuctionVenue.NYSE at 15:52 ET: expect ENTRY_FROZEN_NO_PUBLISHED_IMBALANCE unless significant_imbalance_published=True.

Related Skills

  • auction-only-order-types-for-illiquid-names
  • opening-auction-imbalance-based-execution
  • clock-synchronization-ptp-for-trading-hosts
  • minimum-fill-size-and-lot-rounding-logic

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Close Auction Participation Strategy làm được gì?

Dùng khi cung cấp thanh khoản ở phía đối ứng trong phiên khớp lệnh đóng cửa tại Mỹ dựa trên nguồn dữ liệu mất cân bằng lệnh đã công bố, hoặc thực hiện tái cân bằng theo giá đóng cửa chính thức có bảo vệ giá. Với phiên khớp lệnh mở cửa, hãy dùng opening-auction-imbalance-based-execution.

Vì sao nên dùng Close Auction Participation Strategy trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Close Auction Participation Strategy là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Close Auction Participation Strategy trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/close-auction-participation-strategy. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Close Auction Participation Strategy?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Close Auction Participation Strategy với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Close Auction Participation Strategy với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Close Auction Participation Strategy có miễn phí không?

Có. Kỹ năng này được HimanshuJ16 phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇