trader-portfolio

Optimize portfolio allocation using neural-trader mean-variance engine with risk constraints and rebalancing plans.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill trader-portfolio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trader-portfolio
Source: https://github.com/ruvnet/claude-flow/tree/main/plugins/ruflo-neural-trader/skills/trader-portfolio
Command: npx skills add https://github.com/ruvnet/claude-flow --skill trader-portfolio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires neural-trader.

What problem does it solve?

Manually balancing a trading portfolio against risk targets is error-prone and slow. This Skill automates mean-variance portfolio optimization, risk assessment, and rebalancing plan generation using the neural-trader CLI.

Core Features & Use Cases

  • Portfolio Optimization: Runs mean-variance optimization with an optional risk-target parameter to compute target allocations.
  • Risk Metrics: Assesses portfolio risk, value-at-risk (VaR), and correlation flags above a configurable threshold.
  • Rebalancing Plan: Generates the trades needed to move from current to target weights, including estimated costs.
  • Memory Integration: Stores optimized allocations and retrieves historical high-Sharpe portfolios via ruflo memory and AgentDB pattern search.
  • Use Case: A trader with an existing holdings portfolio wants to rebalance toward a 10% risk target; the Skill loads current holdings, optimizes allocation, predicts expected returns with SONA, and outputs the exact trades required.

Quick Start

Ask the agent to optimize my current portfolio with a risk target of 0.1 and generate a rebalancing plan.

Frequently Asked Questions about trader-portfolio

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

FAQPage Schema
How do I optimize a portfolio with a risk target using neural-trader?

Run npx neural-trader --portfolio optimize --risk-target <number> after loading your current holdings. The engine computes target weights under the mean-variance framework constrained by your specified risk level.

How to generate a portfolio rebalancing plan?

Use npx neural-trader --portfolio rebalance after optimization. It outputs the trades needed to move from current to target weights along with estimated transaction costs.

What risk metrics does neural-trader provide for portfolios?

It provides risk assessment, value-at-risk (VaR), and correlation analysis. The correlation command supports a flag threshold (e.g., 0.8) to highlight highly correlated holdings.

Does this Skill require any packages to be installed?

Yes, it requires the neural-trader npm package, which the Skill checks for and installs with npm install --ignore-scripts if missing. It also uses ruflo MCP memory tools for storing and retrieving portfolio data.

Can I retrieve past optimized portfolios for comparison?

Yes, optimized allocations are stored in the trading-portfolio memory namespace, and AgentDB pattern search can query historical portfolios matching criteria such as Sharpe ratio greater than 1.