Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
broomva avatar

Investment Management

  • 3 installs
  • 3 repo stars
  • Updated August 5, 2026
  • broomva/skills

investment-management is a Claude Code skill for portfolio construction, quantitative analysis, and trade execution across stocks, ETFs, bonds, and crypto using built-in investing frameworks.

About

investment-management is a Claude skill for portfolio construction, analysis, and execution across traditional and alternative assets. It screens securities, runs deep research, factor analysis, and backtests, applies philosophy-driven scoring frameworks, and executes and tracks trades through APIs like Alpaca, Coinbase, and Polymarket. A developer uses it to research, decide, execute, and rebalance investments with structured frameworks. It sits atop a finance-substrate accounting layer and a wealth-management planning layer.

  • Screens stocks/ETFs/crypto and runs factor models, backtests, and risk metrics
  • Embeds decision frameworks from Buffett, Dalio, Bogle, Munger, Marks, and Taleb
  • Executes and tracks trades via Alpaca, Coinbase, and Polymarket

Investment Management by the numbers

  • 3 all-time installs (skills.sh)
  • Ranked #847 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

investment-management capabilities & compatibility

Needs broker/exchange API keys (Alpaca, Coinbase, Polymarket) for execution; data sources include free tiers.

Capabilities
stock screening · factor analysis · backtesting · trade execution · portfolio tracking
Works with
stripe
Use cases
trading · data analysis · research
Pricing
Bring your own API key
From the docs

What investment-management says it does

Full-stack investment management: from philosophy to execution.
SKILL.md
EXECUTE: Trade via APIs (Alpaca, Coinbase, Polymarket)
SKILL.md
Search and filter stocks, ETFs, crypto, and other securities by criteria.
SKILL.md
npx skills add https://github.com/broomva/skills --skill investment-management

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3
repo stars3
Last updatedAugust 5, 2026
Repositorybroomva/skills

What it does

Screen, analyze, backtest, and execute a portfolio across stocks, ETFs, and crypto using structured investing frameworks.

Who is it for?

Building, analyzing, backtesting, and executing a multi-asset portfolio with structured investing frameworks.

Skip if: Users seeking a single click-to-buy consumer app; this is a programmatic analysis and execution toolkit needing platform APIs.

When should I use this skill?

You say 'portfolio', 'screen stocks', 'backtest', 'factor model', 'rebalance', 'Alpaca', or 'Polymarket'.

What you get

A researched, framework-scored portfolio that can be screened, backtested, executed, and rebalanced across platforms.

  • Screens, research reports, factor and backtest analyses, and executed/tracked portfolio positions

By the numbers

  • 6 skill modes (screen, research, factor, and more)
  • 6 investor frameworks (Buffett, Dalio, Bogle, Marks, Taleb, plus Munger)

Files

SKILL.mdMarkdownGitHub ↗

Investment Management

Full-stack investment management: from philosophy to execution. Research, analyze, decide, execute, track, and optimize across traditional and alternative asset classes.

Financial Management Stack

finance-substrate (Layer 1: Accounting & Tax)
  ├── Bank transaction import, certificate parsing
  ├── Form 210 tax projection, DIAN integration
  ├── Parafiscales, patrimonio, retenciones
  └── Gmail document collector
        ↓
wealth-management (Layer 2: Planning & Projections)
  ├── Compound growth projections
  ├── Goal-based planning, Monte Carlo
  ├── Portfolio summary & asset allocation
  └── Budget planning with tax savings
        ↓
investment-management (Layer 3: Analysis & Execution)  ← THIS SKILL
  ├── RESEARCH:   Market data, fundamentals, screening
  ├── ANALYZE:    Factor models, backtests, risk metrics
  ├── DECIDE:     Philosophy-driven frameworks, scoring
  ├── EXECUTE:    Trade via APIs (Alpaca, Coinbase, Polymarket)
  ├── TRACK:      Multi-platform position aggregation
  └── OPTIMIZE:   Rebalancing, tax-loss harvesting, lot management

Investment Philosophies (Built-in Frameworks)

The skill embeds decision frameworks from legendary investors. Each philosophy is a scoring lens that can be applied to any investment.

Value (Buffett/Graham/Munger)

PrincipleImplementation
Economic moat analysisScore competitive advantage: brand, network, switching cost, scale
Margin of safetyRequire 25%+ discount to intrinsic value (DCF, owner earnings)
Circle of competenceFlag unfamiliar sectors; require deeper research threshold
Owner earningsNet income + depreciation - capex (not GAAP earnings)
Quality over priceROIC > WACC, consistent ROE > 15%, low debt/equity

Systematic (Dalio/AQR)

PrincipleImplementation
All-Weather allocationRisk-parity: equal risk contribution from growth, inflation, deflation
Factor exposureDecompose returns into market, value, momentum, quality, size
Risk parityWeight by inverse volatility, target equal risk contribution
Regime awarenessDetect growth/inflation quadrant, adjust allocation
Correlation regimeMonitor rolling correlations; diversification fails in crises

Passive/Index (Bogle)

PrincipleImplementation
Three-fund portfolioTotal market + international + bonds; rebalance annually
Minimize costsFlag any fund with expense ratio > 0.20%
Tax efficiencyIndex funds in taxable, bonds in tax-deferred
Stay the courseReject market timing; dollar-cost average
Simple beats complexBaseline comparison for every active strategy

Second-Level Thinking (Marks)

PrincipleImplementation
Consensus vs realityFlag positions where market consensus is priced in
Risk is not volatilityFocus on permanent capital loss, not price fluctuation
Market cyclesTrack Shiller CAPE, yield spreads, sentiment indicators
Asymmetric outcomesSeek situations where upside >> downside
Know what you don't knowConfidence-weighted recommendations

Barbell (Taleb)

PrincipleImplementation
85% ultra-safe + 15% high-convexitySplit portfolio into safe (CDTs, treasuries) + optionality (crypto, VC, prediction markets)
Antifragile positionsIdentify investments that benefit from volatility
Avoid the middleSkip mediocre risk-return profiles
Small bets, big payoffsPosition size by max loss tolerance, not expected return

Skill Modes

1. screen — Security Screening

Search and filter stocks, ETFs, crypto, and other securities by criteria.

Script: scripts/screener.py

Screening criteria:

  • Fundamental: P/E, P/B, EV/EBITDA, FCF yield, ROIC, ROE, debt/equity, dividend yield
  • Technical: RSI, MACD signal, price vs 200-day MA, 52-week range position
  • Quality: earnings consistency, revenue growth, margin stability
  • Momentum: 1/3/6/12-month returns, relative strength
  • Value composite: Piotroski F-Score, Greenblatt Magic Formula rank
  • Size: market cap filters

Data sources: yfinance, Financial Modeling Prep, OpenBB

2. research — Deep Investment Research

In-depth analysis of a specific security or market.

Script: scripts/research.py

Analysis includes:

  • Company overview and business model
  • Financial statement analysis (3-5 year trends)
  • Valuation: DCF, comparable companies, dividend discount
  • Competitive landscape and moat assessment
  • Risk factors and bear case
  • Catalyst identification
  • Philosophy alignment score (which frameworks support/oppose)

Data sources: yfinance fundamentals, SEC EDGAR (edgartools), news sentiment (FinBERT)

3. factor — Factor Analysis

Decompose portfolio returns into systematic factor exposures.

Script: scripts/factor_analysis.py

Factors analyzed:

  • Fama-French 5 factors: Market, Size (SMB), Value (HML), Profitability (RMW), Investment (CMA)
  • Momentum (UMD)
  • Quality (QMJ from AQR)
  • Alpha: residual return not explained by factors

Output: Factor loadings, R², alpha significance, factor exposure drift over time

4. backtest — Strategy Backtesting

Test investment strategies against historical data.

Script: scripts/backtest.py

Built-in strategies:

  • Buy and hold (benchmark)
  • Equal-weight rebalanced
  • Risk parity (inverse vol)
  • Momentum (top N by 12-1 month return)
  • Value (top N by composite score)
  • All-Weather (Dalio's 4-quadrant allocation)
  • Custom (user-defined rules)

Metrics: CAGR, Sharpe, Sortino, max drawdown, Calmar, win rate, average gain/loss

5. optimize — Portfolio Optimization

Find optimal portfolio weights given constraints.

Script: scripts/portfolio_optimizer.py

Methods:

  • Mean-variance (Markowitz efficient frontier)
  • Black-Litterman (market equilibrium + personal views)
  • Hierarchical Risk Parity (HRP, no covariance inversion)
  • Risk budgeting (equal risk contribution)
  • Maximum Sharpe, minimum volatility, target return
  • CVaR optimization (tail-risk aware)

Constraints: Long-only, sector limits, position size caps, turnover limits, tax-awareness

Libraries: PyPortfolioOpt, Riskfolio-Lib, cvxpy

6. risk — Risk Analysis

Comprehensive risk assessment of current or proposed portfolio.

Script: scripts/risk_analysis.py

Metrics:

  • Value at Risk (parametric, historical, Monte Carlo)
  • Conditional VaR (Expected Shortfall)
  • Maximum drawdown analysis
  • Stress tests: 2008 GFC, 2020 COVID, 2022 rates, COP devaluation
  • Correlation regime analysis (rolling correlations)
  • GARCH volatility forecast
  • Concentration risk and single-name exposure

7. trade — Trade Execution

Execute trades via supported platform APIs.

Script: scripts/trade.py

Supported platforms:

PlatformAssetsAuthLibrary
AlpacaUS stocks, ETFsAPI key pairalpaca-trade-api
CoinbaseCryptoCDP API key + JWTcoinbase-advanced-py
PolymarketPrediction marketsWallet signaturepy-clob-client
Interactive BrokersEverythingTWS APIib_async

Features:

  • Paper trading mode (default) — no real money until explicitly confirmed
  • Order types: market, limit, stop-loss
  • Position sizing: Kelly criterion, fixed fractional, risk-budget
  • Pre-trade checks: liquidity, spread, portfolio impact

8. track — Multi-Platform Position Tracking

Aggregate positions across all investment platforms.

Script: scripts/tracker.py

Sources (in priority order): 1. API-connected platforms (Alpaca, Coinbase) — real-time 2. finance-substrate certificates (Skandia, Davivienda, etc.) — periodic 3. Browser-automated platforms (Tyba, Trii, Davivienda Corredores) — via agent-browser 4. Manual entries (portfolio.json) — user-maintained

Output: Unified position list with cost basis, current value, unrealized gain/loss, allocation %

9. rebalance — Intelligent Rebalancing

Generate and optionally execute rebalancing trades.

Script: scripts/rebalancer.py

Rebalancing modes:

  • Cash-flow (direct new contributions to underweight positions)
  • Threshold (trigger when drift exceeds band)
  • Tax-aware (prefer loss-harvesting sells, defer gains)
  • Calendar (monthly/quarterly/annual schedule)

Tax-loss harvesting:

  • Scan for positions with unrealized losses
  • Identify replacement securities (correlated but not identical)
  • Track wash sale windows (30 days US; no equivalent in Colombia)
  • Estimate tax savings

10. data — Market Data Retrieval

Fetch market data from multiple sources.

Script: scripts/market_data.py

Sources:

SourceDataCostLibrary
yfinanceUS/intl stocks, fundamentalsFreeyfinance
Financial Modeling PrepFinancial statements, ratiosFree tierfmpsdk
CoinGeckoCrypto prices, market dataFree tierpycoingecko
FREDMacro indicators (800K series)Freefredapi
datos.gov.coTRM (USD/COP)Freerequests
Banco de la RepúblicaCPI, interest ratesFreerequests
Alpha VantageTechnical data, forexFree tieralpha_vantage
PolymarketPrediction market oddsFreepy-clob-client

11. score — Investment Scoring

Score a security through multiple investment philosophy lenses.

Script: scripts/scorer.py

Scoring dimensions:

  • Value score (Graham/Buffett): P/E, P/B, FCF yield, moat rating
  • Quality score (Munger): ROIC, margin stability, debt discipline
  • Momentum score: price momentum, earnings momentum, analyst revisions
  • Risk score (Marks): downside volatility, max drawdown, tail risk
  • Growth score (Lynch): revenue growth, PEG ratio, addressable market
  • Composite score: weighted average across all dimensions

Output: 0-100 score per dimension, overall composite, philosophy alignment

Asset Class Coverage

Traditional

ClassScreeningResearchTradingTracking
US Stocksyfinance, FMPEDGAR, fundamentalsAlpaca, IBKRAPI
International StocksyfinanceLimited fundamentalsIBKRAPI
ETFsyfinanceHoldings analysisAlpaca, IBKRAPI
Bonds/Fixed IncomeFRED yield curvesDuration, creditIBKRManual
CDTs (Colombia)Superfinanciera ratesYield comparisonManualCertificates

Alternative

ClassScreeningResearchTradingTracking
CryptoCoinGecko, CMCOn-chain, sentimentCoinbase, BinanceAPI
Prediction MarketsPolymarket APIMarket analysisPolymarket CLOBAPI
Real EstateManualCap rate, appreciationManualExogena/manual
VC/StartupsManualDue diligence frameworkManualManual
Colombian EquitiesYahoo (BVC tickers)LimitedDavivienda Corredores (browser)Browser/manual

Tax-Advantaged (Colombia)

VehicleMax BenefitTracking
AFC (Davivienda)1,340 UVT capfinance-substrate certs
Pensión Voluntaria (Skandia)Combined w/ AFCfinance-substrate certs
CesantíasForced savingsfinance-substrate certs

Platform Integration Architecture

investment-management
  │
  ├── API-first (real-time)
  │   ├── Alpaca ──── US stocks, ETFs (paper + live)
  │   ├── Coinbase ── Crypto (BTC, ETH, SOL, etc.)
  │   ├── Polymarket ── Prediction markets
  │   ├── CoinGecko ── Crypto market data
  │   ├── FRED ──── Macro indicators
  │   └── yfinance ── Stock data, fundamentals
  │
  ├── Browser-automated (agent-browser)
  │   ├── Davivienda Corredores ── Colombian equities
  │   ├── Tyba ── Colombian robo-advisor
  │   ├── Skandia Portal ── Pension fund data
  │   └── MiDataCredito ── Credit profile
  │
  ├── File-based (finance-substrate)
  │   ├── certificates.jsonl ── Bank saldos, investment funds
  │   ├── exogena.jsonl ── Third-party reported assets
  │   └── salary-history.jsonl ── Income trajectory
  │
  └── Manual (portfolio.json)
      ├── Private investments
      ├── Real estate
      └── VC/startup positions

Quantitative Toolkit

Libraries Used

PurposeLibraryInstall
Portfolio optimizationPyPortfolioOptpip install pyportfolioopt
Advanced risk optimizationRiskfolio-Libpip install riskfolio-lib
Custom optimizationcvxpypip install cvxpy
Volatility modelingarchpip install arch
Technical indicatorspandas-tapip install pandas_ta
Factor datapandas-datareaderpip install pandas-datareader
BacktestingVectorBTpip install vectorbt
Sentimenttransformers (FinBERT)pip install transformers
Fundamental dataedgartoolspip install edgartools
Macro datafredapipip install fredapi

Key Formulas

FormulaExpressionUse
Sharpe Ratio(R_p - R_f) / σ_pRisk-adjusted return
Sortino Ratio(R_p - R_f) / σ_downsideDownside risk-adjusted
Kelly Fraction(bp - q) / bOptimal position size
Intrinsic Value (DCF)Σ FCF_t / (1+r)^t + TVValuation
WACCE/(E+D)×Re + D/(E+D)×Rd×(1-T)Discount rate
Black-ScholesC = S·N(d1) - K·e^(-rT)·N(d2)Option pricing
VaR (parametric)μ - z_α × σTail risk
CVaRE[L \L > VaR]
HHI (concentration)Σ w_i²Diversification

Data Directory

~/.investment-management/
├── portfolio.json              # Master holdings (all platforms)
├── targets.json                # Target allocation by strategy
├── watchlist.json              # Securities under observation
├── trades/                     # Trade history
│   └── trades.jsonl            # All executed trades
├── research/                   # Security research cache
│   └── research-{ticker}.json
├── backtests/                  # Backtest results
│   └── backtest-{strategy}-{date}.json
├── scores/                     # Investment scores
│   └── scores-{date}.json
├── market-data/                # Cached market data
│   ├── prices/                 # Historical price cache
│   └── fundamentals/           # Fundamental data cache
└── config/
    ├── api-keys.json           # Platform API keys (encrypted)
    ├── strategies.json         # Active strategy configurations
    └── rebalance-rules.json    # Rebalancing parameters

Compound: Autoany Integration (EGRI)

This skill is EGRI-aware. When a user's request implies iterative optimization or strategy search, the agent should scaffold a problem-spec from the templates below and delegate to /autoany for autonomous improvement.

Optimization Triggers

Invoke /autoany when the user asks to:

  • "Optimize" — allocation, weights, strategy parameters
  • "Find the best" — strategy, allocation, screening criteria
  • "Compare strategies" — systematic comparison across N variants
  • "Backtest variations" — test parameter sweeps
  • "What if I changed" — sensitivity analysis via mutations
  • "Stress test" — combined with optimization intent

EGRI Problem-Spec Templates

TemplateArtifactEvaluatorScoreUse When
strategy-optimizationstrategy.yaml (weights, rules)backtest.py --egriSharpe ratioOptimizing portfolio allocation
screen-evolutionscreen_criteria.yaml (thresholds)screener.py + eval_screen.pyForward returnEvolving stock selection criteria

Templates are at templates/egri/. The strategy artifact schema is at templates/egri/strategy-artifact.yaml.

Delegation Flow

1. User request → agent detects optimization intent
2. Load personal context from finance-substrate (patrimonio, salary, TRM)
3. Pull historical market data (market_data.py)
4. Scaffold problem-spec from template, fill in:
   - Starting allocation as baseline artifact
   - Period, constraints from policy.yaml
   - Goal metrics from user's request
5. Invoke /autoany with scaffolded problem-spec
6. EGRI loop runs: Proposer → Executor (backtest.py) → Evaluator → Selector
7. Return promoted strategy + ledger summary to user
8. Log results for cross-session strategy inheritance (autoany-lago)

EGRI Evaluator Bridge

scripts/eval_backtest.py wraps backtest.py for use as an EGRI evaluator:

  • Takes a strategy YAML artifact + period
  • Returns structured Outcome (score, constraints_passed, violations)
  • Applies constraint expressions from the problem-spec
  • Can be used standalone: python3 eval_backtest.py --strategy-file strategy.yaml --period 10y

Safety Constraints (enforced in EGRI loops)

  • EGRI loops over historical data are autonomous (sandbox mode)
  • EGRI loops that propose live trades require human gate (HumanGate selector)
  • Max drawdown constraint: -15% (from policy S6)
  • Position concentration: <= 25% (from policy S2)
  • Budget: 50 trials max, 1 hour total
  • All trials logged to ledger for audit and cross-run inheritance

Dependencies

  • Python 3.10+
  • finance-substrate skill (accounting, tax, certificates)
  • wealth-management skill (projections, goals, portfolio summary)
  • autoany (optional, for EGRI optimization loops)
  • Market data: yfinance, fredapi, pycoingecko (free)
  • Optimization: pypfopt, riskfolio-lib, cvxpy (optional, for advanced modes)
  • Trading: alpaca-trade-api, coinbase-advanced-py (optional, for execution)
  • Technical: pandas-ta, arch (optional, for quantitative modes)
  • No paid services required. All data stays local.

File Structure

investment-management/
├── SKILL.md                          # This file
├── skill.json                        # Schema definition (11 modes)
├── scripts/
│   ├── screener.py                   # Mode 1: security screening
│   ├── research.py                   # Mode 2: deep research
│   ├── factor_analysis.py            # Mode 3: factor decomposition
│   ├── backtest.py                   # Mode 4: strategy backtesting
│   ├── portfolio_optimizer.py        # Mode 5: portfolio optimization
│   ├── risk_analysis.py              # Mode 6: risk metrics
│   ├── trade.py                      # Mode 7: trade execution
│   ├── tracker.py                    # Mode 8: position tracking
│   ├── rebalancer.py                 # Mode 9: intelligent rebalancing
│   ├── market_data.py                # Mode 10: data retrieval
│   ├── scorer.py                     # Mode 11: investment scoring
│   └── eval_backtest.py              # EGRI evaluator wrapper (autoany bridge)
├── references/
│   ├── investment-philosophies.md    # Legendary investor frameworks
│   ├── platform-apis.md             # API reference for all platforms
│   ├── quantitative-toolkit.md      # Libraries, formulas, models
│   ├── colombian-markets.md         # BVC, CDTs, FICs, regulations
│   └── alternative-investments.md   # Crypto, prediction markets, RE, VC
├── templates/
│   ├── strategies.json               # Pre-built strategy configurations
│   ├── scoring-weights.json          # Philosophy scoring weights
│   └── egri/                         # EGRI problem-spec templates (autoany)
│       ├── strategy-optimization.yaml   # Portfolio strategy optimization
│       ├── screen-evolution.yaml        # Screening criteria evolution
│       └── strategy-artifact.yaml       # Strategy YAML schema (mutable artifact)
├── .control/
│   └── policy.yaml                   # Trading limits, risk gates
└── README.md

Related skills

FAQ

Which platforms can it execute trades on?

It integrates with Alpaca, Coinbase, and Polymarket, plus agent-browser for Colombian platforms.

What analysis does the factor mode do?

It decomposes portfolio returns into factors, and the skill also supports screening, deep research, backtests, and risk metrics.

Finance & Tradingfinancepayments

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.