About trader-portfolio
A workflow for traders using neural-trader to optimize portfolio allocations. It combines stored holdings, risk metrics, return predictions, and historical allocation searches to produce and save a rebalancing plan.
Key features
- 01Optimize portfolio allocations
- 02Set a risk target
- 03Assess risk and correlation
- 04Predict expected returns
- 05Generate rebalancing plans
- 06Search and store past allocations
Use cases
- 01Adjust asset weights to a risk target
- 02Review risk metrics for current holdings
- 03Estimate rebalancing trades and costs
MCP support
The workflow uses Ruflo memory search, neural prediction, pattern search, and storage tools, alongside neural-trader for portfolio optimization, risk assessment, and rebalancing.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ ruvnet/ ruflo --skill trader-portfolioAfter installing, type/trader-portfolioin Claude Code to confirm it loaded.
Details
From the project READMEOptimize portfolio allocation using neural-trader's portfolio engine.
Steps:
- Ensure neural-trader is available:
npm ls neural-trader 2>/dev/null || npm install --ignore-scripts neural-trader - Load current portfolio:
mcp__plugin_ruflo-core_ruflo__memory_search({ query: "current portfolio holdings", namespace: "trading-portfolio" }) - Run portfolio optimization:
With risk target:npx neural-trader --portfolio optimizenpx neural-trader --portfolio optimize --risk-target <number> - Get risk metrics:
npx neural-trader --risk assess --portfolio current npx neural-trader --var --portfolio current npx neural-trader --correlation --portfolio current --flag-threshold 0.8 - Use SONA for expected return prediction:
mcp__plugin_ruflo-core_ruflo__neural_predict({ input: "expected returns for [HOLDINGS] given current regime" }) - Generate rebalancing plan:
Output: trades needed, current vs target weights, estimated costsnpx neural-trader --portfolio rebalance - Search for similar allocations in history:
mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search({ query: "optimized portfolio Sharpe > 1", namespace: "trading-portfolio" }) - Store optimized allocation:
mcp__plugin_ruflo-core_ruflo__memory_store({ key: "portfolio-optimal-TIMESTAMP", value: "ALLOCATION_JSON", namespace: "trading-portfolio" })
Comments
Markdown supported