Logo de Capital Reallocation Based On Live Performance

Capital Reallocation Based On Live Performance

Comunidade
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.

Visão geral

Publicado porHimanshuJ16
RepositórioAlgo-Trading-Skills
Nome da habilidadecapital-reallocation-based-on-live-performance
Estrelas
50
Forks
7
Arquivos incluídos
5
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 5

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por HimanshuJ16 no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Capital Reallocation Based On Live Performance no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/capital-reallocation-based-on-live-performance
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Capital Reallocation Based On Live Performance em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Capital Reallocation Based On Live Performance automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Capital Reallocation Based On Live Performance não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Capital Reallocation Based On Live Performance faz?

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.

Por que usar Capital Reallocation Based On Live Performance no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Capital Reallocation Based On Live Performance é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Capital Reallocation Based On Live Performance no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/capital-reallocation-based-on-live-performance. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Capital Reallocation Based On Live Performance?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Capital Reallocation Based On Live Performance?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Capital Reallocation Based On Live Performance com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Capital Reallocation Based On Live Performance é gratuita?

Sim. A habilidade é publicada no GitHub por HimanshuJ16 sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇