feature-f3-position-sizing

Convert per-trade investment amounts into integer lot quantities using limit-up pricing.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/13g7895123/littile-bao --skill feature-f3-position-sizing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-f3-position-sizing
Source: https://github.com/13g7895123/littile-bao/tree/main/.github/skills/feature-f3-position-sizing
Command: npx skills add https://github.com/13g7895123/littile-bao --skill feature-f3-position-sizing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents orders from exceeding the configured “per trade投入金額” by automatically converting a monetary amount into a valid whole-lot quantity based on the limit-up price, avoiding cases where the strategy would otherwise attempt an impossible or oversized purchase.

Core Features & Use Cases

  • Money-to-lots conversion (F3): Translates per_stock_amount into an integer number of lots using the formula qty = int(per_stock_amount // (limit_up * 1000)).
  • Safety guard when cost exceeds limit-up lot cost: Skips the trade when lot_cost = limit_up * 1000 is greater than per_stock_amount.
  • Whole-lot enforcement with edge-case handling: Blocks the trade for “not enough money to buy at least 1 lot” and disallows zero-lot/odd-lot purchases.

例子與使用情境

當你把 per_stock_amount 調低、或遇到漲停價上升導致單一張的成本變貴時,F3 會把「每檔投入金額」自動換算成可下的張數;如果不足以買到 1 張,則記錄提示並封鎖該檔當日進場,避免資金風險。

Quick Start

Ask the AI to enable the feature by setting per_stock_amount (e.g., 100000) and recalculating F3 lot quantity for limit-up entry candidates before placing orders.

Frequently Asked Questions about feature-f3-position-sizing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate position sizing to prevent exceeding my per trade investment amount?

Position sizing converts your per trade investment amount into an integer lot quantity using limit-up pricing. It uses the formula qty = int(per_stock_amount // (limit_up * 1000)) to ensure you only buy whole lots within budget.

What happens during lot calculation when the limit-up lot cost exceeds my configured per trade amount?

Lot calculation skips the trade entirely when the limit-up lot cost exceeds your configured per_stock_amount. This safety guard blocks impossible purchases and prevents overspending your available funds.

How does whole-lot enforcement handle zero-lot or odd-lot orders in trading strategies?

Whole-lot enforcement blocks zero-lot and odd-lot orders by computing qty as an integer floor division. If funds are insufficient for at least one lot, it blocks the trade and logs a prompt.

Why does my trading strategy attempt an oversized purchase when the limit-up price increases?

An increased limit-up price raises the single lot cost, which can exceed your fixed per Stock amount. Calculating lot cost using limit_up * 1000 adjusts the buyable lots downward to prevent oversized purchases.

Can I use limit-up pricing to compute order entry for trading strategies with insufficient funds for 1 lot?

Limit-up pricing computes order entry by checking if your per_stock_amount covers the lot cost. If funds are insufficient for 1 lot, the system blocks the daily entry for that stock to avoid risk.