Logo Capital Reallocation Based On Live Performance

Capital Reallocation Based On Live Performance

Cộng đồng
HimanshuJ16
capital-reallocation-based-on-live-performance

Use when capital must be re-weighted across active strategies from their trailing live trade statistics, using fractional Kelly bounded by per-strategy capacity ceilings. It sizes each strategy independently of the others.

Tổng quan

Nhà phát hànhHimanshuJ16
Kho mãAlgo-Trading-Skills
Tên kỹ năngcapital-reallocation-based-on-live-performance
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 Capital Reallocation Based On Live Performance 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/capital-reallocation-based-on-live-performance
  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/capital-reallocation-based-on-live-performance .claude/skills/capital-reallocation-based-on-live-performance
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 Capital Reallocation Based On Live Performance 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 Capital Reallocation Based On Live Performance 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 Capital Reallocation Based On Live Performance 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 managing a multi-strategy fund or portfolio where capital is limited and needs to be distributed among competing algorithms. Instead of static, equal-weight allocations, the engine converts each strategy's trailing live trade statistics (win rate, average win, average loss) into a fractional Kelly exposure target, then resolves those targets against each strategy's capacity ceiling and the size of the fund.

The engine sizes each strategy from its own edge. It is a position-sizing rule, not a ranking rule: two strategies with identical edge get identical capital regardless of how many other strategies exist, and a portfolio with weak aggregate edge deliberately leaves capital in cash.

When NOT to Use

  • Strongly correlated strategies. The engine sizes each strategy independently and sums the results. The true multi-asset Kelly solution is $f^* = \Sigma^{-1}\mu$, which accounts for covariance. Summing independent Kelly fractions overstates safe gross exposure when strategies are positively correlated — two strategies running the same trade are one bet, not two. Use a lower kelly_fraction plus an external gross-exposure cap, and see cross-strategy-correlation-monitoring.
  • Thin trade samples. Kelly is exquisitely sensitive to estimation error in the win rate. A strategy with 20 live trades has a win-rate standard error near 10 percentage points, which swings the Kelly weight far more than the underlying edge does. Do not reallocate on a sample too small to distinguish edge from variance.
  • Non-binary payoff profiles. The implemented formula is the discrete binary-bet Kelly. Strategies whose returns are heavily skewed or fat-tailed (short options, carry trades with rare large losses) are poorly summarised by a single win rate and average win/loss pair.
  • As a risk control. This engine allocates capital; it does not enforce limits. Drawdown circuit breakers and kill switches must sit downstream and independently — see kill-switch-and-drawdown-circuit-breakers.

Prerequisites

  • Multiple independent trading strategies reporting closed-trade PnL.
  • A centralized fund/portfolio controller capable of adjusting per-strategy buying power.
  • A trailing trade sample per strategy large enough to estimate win rate, average win and average loss with meaningful precision.
  • A per-strategy capacity estimate (max_capacity) derived from liquidity, not from performance — see strategy-capacity-estimation-before-scaling-capital.

Workflow

  1. Aggregate trailing statistics: At the reallocation boundary (EOD or weekly), compute each strategy's win rate and average win/loss magnitudes over a fixed trailing trade window. Use closed trades only; including open positions marks a strategy on unrealised PnL that may reverse.
  2. Compute fractional Kelly targets: The engine computes $f^* = W - (1-W)/R$ per strategy, where $R$ is the reward/risk ratio, floors it at zero, and scales it by kelly_fraction. A strategy with no measurable edge targets zero capital rather than a small position.
  3. Resolve against constraints: The engine applies two ceilings per strategy — its capacity limit and its own fractional Kelly target — and one fund-level constraint: total targets never exceed total fund capital. If gross Kelly demand exceeds the fund, all targets scale down proportionally; the engine never levers.
  4. Read the cash reserve, don't fight it: If gross Kelly demand is below 1.0, the undeployed remainder is intentional. Do not redistribute it to fill the fund — forcing it into the remaining strategies bets them above their own Kelly optimum, which is precisely the over-betting the fractional multiplier exists to prevent.
  5. Enact deltas as risk-limit changes: delta_capital instructs the OMS to change a strategy's buying power. A negative delta means stop granting new risk and let existing positions exit naturally; it is not a liquidation order.

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

Common Pitfalls

  • Normalising the Kelly fraction away: If you convert Kelly weights into portfolio weights by dividing each by their sum, the fractional multiplier cancels out algebraically and Quarter-Kelly allocates exactly as much as Full-Kelly. The safeguard silently stops existing while still appearing in the config. Verify it bites: halving kelly_fraction must halve deployed capital.
  • Chasing noise: Reallocating too frequently (intraday, or on tick-by-tick PnL) causes whipsawing — capital arrives at a strategy exactly as it peaks and mean-reverts.
  • Full Kelly recklessness: Full Kelly maximises long-run growth given known parameters; with estimated parameters it reliably produces severe drawdowns. Under the standard quadratic growth approximation, betting $c\times$ Kelly retains $2c - c^2$ of the optimal growth rate — Half-Kelly keeps ~75% of the growth for half the exposure, and growth turns negative beyond $2\times$ Kelly. The engine rejects kelly_fraction > 1.0.
  • Ignoring capacity: Allocating $100M to a micro-cap strategy because its Kelly weight is high, when it cannot absorb more than $5M without destroying its edge through market impact. Capacity must be an independent input, never inferred from returns.
  • Order-dependent allocation: If the capping pass mutates its running weight total while iterating the strategy set, the same inputs produce different allocations depending on dictionary order, and capital can be silently stranded while other strategies still have headroom. Allocation must be a pure function of the inputs.
  • Minimum allocation floors: A "no strategy drops below 5%" floor is incompatible with edge-based sizing — it forces capital into a strategy the model has just judged to have no edge. Use a cash reserve instead of a floor.
  • Treating an unbeaten strategy as infinite edge: A strategy with zero average loss has an undefined reward/risk ratio. That is an unestimable edge, not an unbounded one; the engine allocates zero and logs a warning.

Verification

  • Run python -m unittest discover -s skills/capital-reallocation-based-on-live-performance/scripts.
  • Confirm kelly_fraction governs exposure: run the same portfolio at 1.0, 0.5 and 0.25 and check deployed capital scales proportionally.
  • Confirm order independence: shuffle the strategy dict and check the allocation is unchanged.
  • Confirm no target exceeds min(max_capacity, fund × fractional Kelly), and that the sum of targets never exceeds total fund capital.
  • Simulate two strategies, one with steady wins and one on a losing streak, and verify capital re-weights toward the winner while remaining bounded by capacity.

Related Skills

  • multi-strategy-capital-allocation-limits
  • incremental-capital-deployment-for-new-strategies
  • strategy-capacity-estimation-before-scaling-capital
  • cross-strategy-correlation-monitoring
  • kill-switch-and-drawdown-circuit-breakers

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 Capital Reallocation Based On Live Performance làm được gì?

Use when capital must be re-weighted across active strategies from their trailing live trade statistics, using fractional Kelly bounded by per-strategy capacity ceilings. It sizes each strategy independently of the others.

Vì sao nên dùng Capital Reallocation Based On Live Performance 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. Capital Reallocation Based On Live Performance 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 Capital Reallocation Based On Live Performance 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/capital-reallocation-based-on-live-performance. 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 Capital Reallocation Based On Live Performance?

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 Capital Reallocation Based On Live Performance 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 Capital Reallocation Based On Live Performance 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 Capital Reallocation Based On Live Performance 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 👇