mcpField
T
trader-portfolio

trader-portfolio

github.com/ruvnetOther80.0k741 installsUpdated today
Repository

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

  1. 01Optimize portfolio allocations
  2. 02Set a risk target
  3. 03Assess risk and correlation
  4. 04Predict expected returns
  5. 05Generate rebalancing plans
  6. 06Search and store past allocations

Use cases

  1. 01Adjust asset weights to a risk target
  2. 02Review risk metrics for current holdings
  3. 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-portfolio

After installing, type/trader-portfolioin Claude Code to confirm it loaded.

Details

From the project README

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 --ignore-scripts neural-trader
  2. Load current portfolio: mcp__plugin_ruflo-core_ruflo__memory_search({ query: "current portfolio holdings", namespace: "trading-portfolio" })
  3. Run portfolio optimization:
    npx neural-trader --portfolio optimize
    
    With risk target:
    npx neural-trader --portfolio optimize --risk-target <number>
    
  4. 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
    
  5. Use SONA for expected return prediction: mcp__plugin_ruflo-core_ruflo__neural_predict({ input: "expected returns for [HOLDINGS] given current regime" })
  6. Generate rebalancing plan:
    npx neural-trader --portfolio rebalance
    
    Output: trades needed, current vs target weights, estimated costs
  7. Search for similar allocations in history: mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search({ query: "optimized portfolio Sharpe > 1", namespace: "trading-portfolio" })
  8. Store optimized allocation: mcp__plugin_ruflo-core_ruflo__memory_store({ key: "portfolio-optimal-TIMESTAMP", value: "ALLOCATION_JSON", namespace: "trading-portfolio" })

Comments

Markdown supported