---
name: trader-portfolio-69c399ce9cd3
description: Optimize portfolio allocation using npx neural-trader mean-variance engine with risk constraints and rebalancing plan
allowed-tools: Bash Read mcp__claude-flow__memory_store mcp__claude-flow__memory_retrieve mcp__claude-flow__memory_search mcp__claude-flow__neural_predict mcp__claude-flow__agentdb_pattern-search
argument-hint: "[--risk-target NUMBER]"
---
Optimize portfolio allocation using neural-trader's portfolio engine.

Steps:
1. Ensure neural-trader is available:
   `npm ls neural-trader 2>/dev/null || npm install neural-trader`
2. Load current portfolio:
   `mcp__claude-flow__memory_search({ query: "current portfolio holdings", namespace: "trading-portfolio" })`
3. Run portfolio optimization:
   ```bash
   npx neural-trader --portfolio optimize
   ```
   With risk target:
   ```bash
   npx neural-trader --portfolio optimize --risk-target <number>
   ```
4. Get risk metrics:
   ```bash
   npx neural-trader --risk assess --portfolio current
   npx neural-trader --var --portfolio current
   npx neural-trader --correlation --portfolio current --flag-threshold 0.8
   ```
5. Use SONA for expected return prediction:
   `mcp__claude-flow__neural_predict({ input: "expected returns for [HOLDINGS] given current regime" })`
6. Generate rebalancing plan:
   ```bash
   npx neural-trader --portfolio rebalance
   ```
   Output: trades needed, current vs target weights, estimated costs
7. Search for similar allocations in history:
   `mcp__claude-flow__agentdb_pattern-search({ query: "optimized portfolio Sharpe > 1", namespace: "trading-portfolio" })`
8. Store optimized allocation:
   `mcp__claude-flow__memory_store({ key: "portfolio-optimal-TIMESTAMP", value: "ALLOCATION_JSON", namespace: "trading-portfolio" })`


---
Source attribution: wodeh
Original project: https://github.com/wodeh/ruflo-kimi/blob/257ccb7e80a2619f8af236554ae6f0ca362abfa6/plugins/ruflo-neural-trader/skills/trader-portfolio/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2024-2026 ruvnet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: wodeh
Original project: https://github.com/wodeh/ruflo-kimi/blob/257ccb7e80a2619f8af236554ae6f0ca362abfa6/plugins/ruflo-neural-trader/skills/trader-portfolio/SKILL.md
Attribution basis: Source repository record

Fields of work: Finance & Accounting
Roles: Accountant, CFO / FP&A, Financial Analyst
Specialties: API
Tools: Neural Trader
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: b78698fcb9b2e9828ac4fb55e24cb6f06b6be1d5b61a0b8f60184cbb58be8135
