{"passport":{"unfragile":{"@version":"1.0","version":"2026-05","artifact":{"id":"github_mcp-whchien-ai-trader","slug":"mcp-whchien-ai-trader","name":"ai-trader","type":"mcp","url":"https://github.com/whchien/ai-trader","page_url":"https://unfragile.ai/mcp-whchien-ai-trader","categories":["model-training"],"tags":["ai","ai-agents","algorithmic-trading","backtrader","cli","mcp","mcp-server","portfolio-management","quantitative-finance","stock-price-prediction","trading"],"pricing":{"model":"open_source","free":true,"starting_price":null},"status":"active","verified":false},"capabilities":[{"id":"github_mcp-whchien-ai-trader__cap_0","uri":"capability://automation.workflow.event.driven.backtesting.engine.orchestration","name":"event-driven backtesting engine orchestration","description":"Wraps Backtrader's Cerebro event loop to manage the complete backtesting lifecycle, including broker initialization, data feed registration, strategy attachment, and execution sequencing. The AITrader class abstracts Backtrader's complexity by handling calendar-based event dispatch, order management callbacks, and portfolio state tracking across multiple trading days without requiring developers to interact directly with Cerebro's lower-level APIs.","intents":["I want to run a complete backtest of a trading strategy without learning Backtrader's full API","I need to execute multiple strategies sequentially and compare their performance metrics","I want to configure broker parameters (commission, slippage, margin) once and apply them across all backtests"],"best_for":["quantitative traders prototyping strategies quickly","financial engineers building strategy research pipelines","teams migrating from manual Excel-based backtesting to automated frameworks"],"limitations":["Single-threaded execution — backtests run sequentially, not in parallel","No distributed backtesting support — limited to single-machine resources","Backtrader's event model assumes daily or intraday bars; tick-level simulation requires custom data feeds"],"requires":["Python 3.8+","Backtrader library installed","OHLCV market data in pandas DataFrame or CSV format","Strategy class inheriting from BaseStrategy"],"input_types":["OHLCV time-series data (pandas DataFrame)","CSV files with date, open, high, low, close, volume columns","Strategy class definitions"],"output_types":["Portfolio metrics (Sharpe ratio, max drawdown, total return)","Trade log (entry/exit prices, dates, P&L)","Equity curve visualization","Performance statistics dictionary"],"categories":["automation-workflow","quantitative-finance"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_1","uri":"capability://data.processing.analysis.technical.indicator.driven.signal.generation","name":"technical indicator-driven signal generation","description":"Implements a library of 15+ technical indicators (SMA, RSI, Bollinger Bands, RSRS, ROC, etc.) that inherit from Backtrader's Indicator base class, computing real-time signals during backtesting by processing OHLCV bars sequentially. Each indicator encapsulates its calculation logic and exposes output lines (e.g., signal, upper_band, lower_band) that strategies reference to generate buy/sell decisions without manual formula implementation.","intents":["I want to use standard technical indicators without implementing the math myself","I need to combine multiple indicators (e.g., RSI + Bollinger Bands) to generate composite signals","I want to create custom indicators by extending existing ones with additional logic"],"best_for":["technical traders building rule-based strategies","quantitative researchers validating indicator-based hypotheses","developers extending the framework with domain-specific indicators"],"limitations":["Indicators compute on historical data only — no forward-looking or future data leakage protection built-in","Custom indicators require understanding Backtrader's Indicator API and line mechanics","Some indicators (e.g., RSRS) are custom implementations not validated against industry-standard libraries"],"requires":["Python 3.8+","Backtrader library","OHLCV data with sufficient history for indicator warmup (e.g., 50+ bars for 20-period SMA)"],"input_types":["OHLCV bars from Backtrader data feed","Indicator parameters (periods, thresholds)"],"output_types":["Indicator lines (numeric arrays indexed by bar)","Signal values (buy/sell/hold as numeric codes or booleans)"],"categories":["data-processing-analysis","technical-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_10","uri":"capability://image.visual.equity.curve.visualization.and.trade.annotation","name":"equity curve visualization and trade annotation","description":"Generates matplotlib-based visualizations of portfolio equity curves with overlaid trade markers (entry/exit points) and indicator signals, allowing traders to visually inspect strategy behavior and identify periods of underperformance. The visualization integrates with Backtrader's plotting module and automatically scales axes, formats dates, and annotates trades without manual matplotlib configuration.","intents":["I want to see a chart of my strategy's equity curve with buy/sell points marked","I need to visually identify why my strategy underperformed in a specific period","I want to generate publication-quality charts for strategy documentation"],"best_for":["traders analyzing strategy behavior visually","researchers documenting strategy performance","teams presenting backtests to stakeholders"],"limitations":["Visualization is static (matplotlib) — no interactive charts or drill-down capability","Large backtests (5+ years of daily data) produce cluttered charts with overlapping trade markers","No customization of colors, fonts, or layout without modifying source code","Charts are saved to disk — no real-time streaming visualization"],"requires":["Python 3.8+","matplotlib library","Backtrader library with plotting support","Completed backtest with trade history"],"input_types":["Backtrader strategy object after run()","Optional: indicator lines to overlay on chart"],"output_types":["PNG/PDF file with equity curve and trade markers","matplotlib Figure object for further customization"],"categories":["image-visual","analysis-visualization"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_11","uri":"capability://code.generation.editing.custom.indicator.development.and.extension","name":"custom indicator development and extension","description":"Provides a framework for developers to create custom technical indicators by subclassing Backtrader's Indicator class and defining calculation logic in the __init__ method. Custom indicators integrate seamlessly into the backtesting event loop, compute incrementally on each bar, and expose output lines that strategies can reference for signal generation.","intents":["I want to implement a proprietary indicator that combines RSI and Bollinger Bands","I need to create a custom pattern recognition indicator for my trading rules","I want to validate a new indicator idea by backtesting it against historical data"],"best_for":["quantitative researchers developing novel indicators","traders implementing proprietary trading logic","teams building domain-specific indicator libraries"],"limitations":["Indicator development requires understanding Backtrader's Indicator API and line mechanics","No built-in validation or unit testing framework for indicators","Indicators compute on historical data only — no forward-looking validation","Performance optimization requires manual profiling — no automatic caching or memoization"],"requires":["Python 3.8+","Backtrader library","Understanding of Backtrader's Indicator class and line operations"],"input_types":["Custom indicator class definition","Input data (OHLCV bars)","Indicator parameters (periods, thresholds)"],"output_types":["Indicator instance with output lines","Numeric values for each bar","Signal values (buy/sell/hold)"],"categories":["code-generation-editing","technical-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_12","uri":"capability://data.processing.analysis.trade.log.extraction.and.analysis","name":"trade log extraction and analysis","description":"Automatically extracts detailed trade information (entry date, entry price, exit date, exit price, P&L, duration, return percentage) from completed backtests into a pandas DataFrame, enabling post-backtest analysis of trade quality, win rate, average win/loss, and trade duration statistics without manual data extraction.","intents":["I want to analyze which trades were profitable and which lost money","I need to calculate win rate, average win, and average loss for my strategy","I want to identify the longest-duration trades and their performance"],"best_for":["traders analyzing trade-level performance","researchers studying strategy behavior at trade granularity","teams building trade analytics dashboards"],"limitations":["Trade log extraction requires completed backtest — no real-time trade tracking","No built-in filtering or grouping — requires pandas knowledge for custom analysis","Trade P&L does not account for commissions or slippage beyond Backtrader's simulation","No correlation analysis between trades and market conditions"],"requires":["Python 3.8+","pandas library","Completed backtest with trade history"],"input_types":["Backtrader strategy object after run()"],"output_types":["pandas DataFrame with columns: entry_date, entry_price, exit_date, exit_price, pnl, return_pct, duration","Summary statistics: win_rate, avg_win, avg_loss, profit_factor"],"categories":["data-processing-analysis","trade-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_2","uri":"capability://automation.workflow.single.stock.strategy.template.library","name":"single-stock strategy template library","description":"Provides 10+ pre-built strategy classes (SMA, RSI, Bollinger Bands, ROC, Double Top, Turtle, VCP, Risk Averse, Momentum, Buy and Hold) that inherit from BaseStrategy and implement complete entry/exit logic using technical indicators. Developers instantiate these strategies with parameters (e.g., fast_period=10, slow_period=20) and attach them to the backtester, eliminating the need to write signal generation and order placement code from scratch.","intents":["I want to quickly test a moving average crossover strategy without coding it myself","I need to compare performance across 5+ different single-stock strategies on the same data","I want a reference implementation to understand how to build my own custom strategy"],"best_for":["traders evaluating strategy ideas before investing development time","students learning algorithmic trading concepts","researchers benchmarking against baseline strategies"],"limitations":["Strategies are single-stock focused — no cross-asset correlation logic","Parameter optimization requires manual grid search or external hyperparameter tuning tools","Some strategies (e.g., Turtle) use fixed parameters not adapted to market regime changes","No machine learning-based strategies fully implemented (marked as 'under development')"],"requires":["Python 3.8+","Backtrader library","OHLCV data for a single stock","Strategy parameters (periods, thresholds) as constructor arguments"],"input_types":["Strategy class name and parameters","Single stock OHLCV data"],"output_types":["Trade log with entry/exit prices and dates","Performance metrics (total return, Sharpe ratio, max drawdown)","Equity curve"],"categories":["automation-workflow","trading-strategies"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_3","uri":"capability://automation.workflow.portfolio.rotation.strategy.execution","name":"portfolio rotation strategy execution","description":"Implements multi-asset portfolio strategies (ROC rotation, RSRS rotation, Triple RSI rotation, Multi Bollinger Bands rotation) that dynamically allocate capital across a basket of stocks based on relative strength or momentum rankings. The framework rebalances the portfolio at fixed intervals (e.g., monthly), selling underperformers and buying outperformers, with position sizing determined by indicator rankings rather than equal weighting.","intents":["I want to backtest a strategy that rotates between the top N stocks based on momentum","I need to compare equal-weight vs momentum-weighted portfolio allocation strategies","I want to test if rotating out of weak performers improves risk-adjusted returns"],"best_for":["portfolio managers building tactical asset allocation strategies","quantitative researchers testing momentum/rotation hypotheses","traders managing multiple positions with limited capital"],"limitations":["Rebalancing frequency is fixed (e.g., monthly) — no dynamic rebalancing based on signal strength","No transaction cost modeling for frequent rotations — actual slippage may be higher","Ranking logic is deterministic; no tie-breaking for stocks with identical scores","Limited to stock universe defined at backtest start — no dynamic universe expansion"],"requires":["Python 3.8+","Backtrader library","OHLCV data for 5+ stocks with aligned dates","Portfolio strategy class and rebalancing parameters"],"input_types":["Multiple stock OHLCV data feeds","Rebalancing frequency (e.g., 'monthly')","Ranking indicator (e.g., ROC, RSI)","Number of positions to hold"],"output_types":["Portfolio composition over time (which stocks held each period)","Rebalancing trades (sells and buys at each rebalance date)","Portfolio-level metrics (return, Sharpe, drawdown)","Individual stock contribution to portfolio return"],"categories":["automation-workflow","portfolio-management"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_4","uri":"capability://data.processing.analysis.ohlcv.data.loading.and.normalization","name":"ohlcv data loading and normalization","description":"Provides a StockLoader utility that downloads historical OHLCV data from Yahoo Finance or CSV files, normalizes column names and data types, handles missing values, and converts data into Backtrader-compatible DataFrames. The loader abstracts data source differences, allowing strategies to work with data from multiple providers without custom parsing logic.","intents":["I want to download 5 years of stock data without writing web scraping code","I need to load data from a CSV file and ensure it's formatted correctly for backtesting","I want to handle missing trading days (weekends, holidays) automatically"],"best_for":["traders building backtests quickly without data engineering overhead","researchers working with public market data","teams standardizing data loading across multiple strategy development projects"],"limitations":["Yahoo Finance data may have delays or gaps for delisted stocks","No support for alternative data sources (crypto, forex, commodities) beyond stocks","Missing data is forward-filled, which can introduce look-ahead bias in some strategies","No data validation for outliers or corporate actions (splits, dividends)"],"requires":["Python 3.8+","pandas library","yfinance library (for Yahoo Finance downloads)","Internet connection (for live data downloads)"],"input_types":["Stock ticker symbols (e.g., 'AAPL', '2330.TW')","Date range (start_date, end_date)","CSV file path with OHLCV columns","Data frequency (daily, weekly, monthly)"],"output_types":["pandas DataFrame with columns: Date, Open, High, Low, Close, Volume","Backtrader-compatible PandasData feed object","Data quality report (missing values, date range)"],"categories":["data-processing-analysis","data-loading"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_5","uri":"capability://data.processing.analysis.performance.metrics.computation.and.reporting","name":"performance metrics computation and reporting","description":"Automatically computes portfolio-level performance statistics (total return, annualized return, Sharpe ratio, Sortino ratio, max drawdown, win rate, profit factor) from backtest results using Backtrader's built-in analyzers. Results are aggregated into a structured dictionary and optionally visualized as equity curves, allowing traders to compare strategies quantitatively without manual calculation.","intents":["I want to see Sharpe ratio, max drawdown, and total return for my strategy in one call","I need to compare performance metrics across 10 different strategies to pick the best one","I want to export backtest results to a CSV or JSON file for reporting"],"best_for":["traders evaluating strategy quality objectively","portfolio managers reporting performance to stakeholders","researchers comparing strategy variants systematically"],"limitations":["Metrics assume daily rebalancing or bar-close execution — intraday slippage not captured","Sharpe ratio calculation uses simple returns, not log returns (minor difference for low-volatility strategies)","No risk-adjusted metrics like Calmar ratio or Information ratio built-in","Metrics are computed on backtest period only — no out-of-sample validation"],"requires":["Python 3.8+","Backtrader library with analyzers module","Completed backtest with trade history"],"input_types":["Backtrader strategy object after run()","Optional: risk-free rate for Sharpe calculation"],"output_types":["Dictionary with keys: total_return, sharpe_ratio, max_drawdown, win_rate, profit_factor","Matplotlib figure with equity curve","Trade log DataFrame with entry/exit details"],"categories":["data-processing-analysis","performance-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_6","uri":"capability://tool.use.integration.mcp.server.integration.for.ai.agent.orchestration","name":"mcp server integration for ai agent orchestration","description":"Exposes the AI-Trader backtesting engine as a Model Context Protocol (MCP) server, allowing LLM-based agents (Claude, GPT-4, etc.) to invoke backtesting operations, retrieve strategy results, and modify parameters through standardized tool calls. The MCP server translates natural language requests into Python function calls, enabling non-technical users to run backtests via conversational AI without writing code.","intents":["I want to ask an AI agent to backtest a moving average strategy on Apple stock","I need an AI assistant to compare 5 strategies and recommend the best one","I want to modify strategy parameters and re-run backtests through a chat interface"],"best_for":["non-technical traders using AI agents for strategy research","teams integrating AI-Trader into larger LLM-based trading platforms","developers building conversational trading assistants"],"limitations":["MCP server runs synchronously — long backtests block the agent until completion","No authentication or rate limiting — requires trusted execution environment","Agent may misinterpret strategy parameters or generate invalid configurations","No persistent state between MCP calls — each backtest is independent"],"requires":["Python 3.8+","MCP server implementation (provided in ai_trader/mcp_server.py)","LLM client with MCP support (Claude, GPT-4 with tool calling)","Network connectivity between LLM client and MCP server"],"input_types":["Natural language requests from LLM agent","Tool call parameters (strategy_name, ticker, start_date, end_date, parameters)"],"output_types":["Backtest results as structured JSON","Performance metrics dictionary","Error messages or validation feedback"],"categories":["tool-use-integration","automation-workflow"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_7","uri":"capability://automation.workflow.cli.tool.for.batch.backtesting.and.parameter.sweeps","name":"cli tool for batch backtesting and parameter sweeps","description":"Provides command-line interface (CLI) commands for running backtests, sweeping strategy parameters across ranges, and generating comparison reports without writing Python code. The CLI parses YAML/JSON configuration files defining strategy, data, and parameter ranges, executes backtests in batch mode, and outputs results to CSV or JSON files for further analysis.","intents":["I want to run 100 backtests with different parameter combinations and find the best one","I need to backtest the same strategy on 20 different stocks and export results to a spreadsheet","I want to schedule daily backtests via cron without writing Python scripts"],"best_for":["traders running parameter optimization workflows","teams automating backtesting in CI/CD pipelines","researchers conducting systematic strategy comparisons"],"limitations":["Parameter sweeps are grid-based (all combinations) — no Bayesian optimization or genetic algorithms","No parallelization — backtests run sequentially, making large sweeps slow","Configuration files must be manually edited — no GUI for parameter selection","Results are written to disk — no real-time progress monitoring"],"requires":["Python 3.8+","AI-Trader library installed","YAML or JSON configuration file with strategy and parameter definitions","Command-line shell (bash, zsh, PowerShell)"],"input_types":["YAML/JSON config file with keys: strategy, ticker, date_range, parameters","Parameter ranges as lists (e.g., fast_period: [5, 10, 15, 20])"],"output_types":["CSV file with one row per backtest (strategy, parameters, metrics)","JSON file with detailed results","Summary report with top N parameter combinations"],"categories":["automation-workflow","tool-use-integration"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_8","uri":"capability://code.generation.editing.basestrategy.inheritance.framework.for.custom.strategy.development","name":"basestrategy inheritance framework for custom strategy development","description":"Defines an abstract BaseStrategy class that all trading strategies inherit from, providing shared methods for order placement (buy, sell, close), logging, and Backtrader integration. Developers subclass BaseStrategy, override the next() method to implement signal logic, and leverage inherited utilities for order management without duplicating boilerplate code across strategies.","intents":["I want to build a custom strategy without understanding Backtrader's full API","I need to implement consistent logging and order tracking across multiple strategies","I want to reuse common order placement logic across different strategy variants"],"best_for":["developers building custom trading strategies","teams standardizing strategy development patterns","traders extending the framework with proprietary logic"],"limitations":["Inheritance hierarchy is single-level — no multi-level strategy composition","Order methods (buy, sell, close) are synchronous — no async order management","No built-in risk management (position sizing, stop-loss, take-profit) — must be implemented per strategy","Logging is text-based — no structured logging or metrics collection"],"requires":["Python 3.8+","Backtrader library","Understanding of Backtrader's Strategy class and next() method"],"input_types":["Strategy class definition inheriting from BaseStrategy","Implementation of next() method with signal logic"],"output_types":["Strategy instance ready for backtesting","Order log with entry/exit details","Performance metrics"],"categories":["code-generation-editing","framework-extension"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"github_mcp-whchien-ai-trader__cap_9","uri":"capability://data.processing.analysis.us.and.taiwan.stock.market.data.support","name":"us and taiwan stock market data support","description":"Supports backtesting on both US stocks (via NASDAQ/NYSE tickers) and Taiwan stocks (via TWSE tickers like '2330.TW'), with automatic market calendar handling for trading days and holidays. The framework downloads data from Yahoo Finance, which provides both markets, and applies market-specific trading hours and holiday calendars during backtesting.","intents":["I want to backtest a strategy on Taiwan semiconductor stocks alongside US tech stocks","I need to compare strategy performance across different markets and time zones","I want to build a global portfolio strategy that rotates between US and Taiwan stocks"],"best_for":["international traders managing multi-market portfolios","researchers studying market-specific strategy performance","teams building global trading platforms"],"limitations":["No explicit market calendar configuration — relies on Yahoo Finance data which may have gaps","No currency conversion — US and Taiwan prices are in different currencies (USD vs TWD)","No support for other Asian markets (Japan, Hong Kong, Singapore)","Trading hours are not explicitly modeled — assumes daily bar data"],"requires":["Python 3.8+","Backtrader library","yfinance library with support for both markets","Ticker symbols in correct format (e.g., 'AAPL' for US, '2330.TW' for Taiwan)"],"input_types":["US stock tickers (e.g., 'AAPL', 'MSFT')","Taiwan stock tickers (e.g., '2330.TW', '2454.TW')"],"output_types":["OHLCV data for both markets","Backtests with mixed US/Taiwan positions","Portfolio metrics across markets"],"categories":["data-processing-analysis","market-support"],"confidence":0.5,"matches":0,"success_rate":0}],"trust":{"score":46,"verified":false,"data_access_risk":"high","permissions":["Python 3.8+","Backtrader library installed","OHLCV market data in pandas DataFrame or CSV format","Strategy class inheriting from BaseStrategy","Backtrader library","OHLCV data with sufficient history for indicator warmup (e.g., 50+ bars for 20-period SMA)","matplotlib library","Backtrader library with plotting support","Completed backtest with trade history","Understanding of Backtrader's Indicator class and line operations"],"failure_modes":["Single-threaded execution — backtests run sequentially, not in parallel","No distributed backtesting support — limited to single-machine resources","Backtrader's event model assumes daily or intraday bars; tick-level simulation requires custom data feeds","Indicators compute on historical data only — no forward-looking or future data leakage protection built-in","Custom indicators require understanding Backtrader's Indicator API and line mechanics","Some indicators (e.g., RSRS) are custom implementations not validated against industry-standard libraries","Visualization is static (matplotlib) — no interactive charts or drill-down capability","Large backtests (5+ years of daily data) produce cluttered charts with overlapping trade markers","No customization of colors, fonts, or layout without modifying source code","Charts are saved to disk — no real-time streaming visualization","builder identity is not verified yet","no observed match outcomes yet"],"rank_breakdown":{"adoption":0.38885495262072794,"quality":0.5,"ecosystem":0.6000000000000001,"match_graph":0.25,"freshness":0.75,"weights":{"adoption":0.25,"quality":0.25,"ecosystem":0.15,"match_graph":0.23,"freshness":0.12}},"observed_outcomes":{"matches":0,"success_rate":0,"avg_confidence":0,"top_intents":[],"last_matched_at":null},"maintenance":{"status":"active","updated_at":"2026-05-24T12:16:22.065Z","last_scraped_at":"2026-05-03T14:23:44.761Z","last_commit":"2026-03-28T11:16:18Z"},"community":{"stars":634,"forks":94,"weekly_downloads":null,"model_downloads":null,"model_likes":null}},"distribution":{"claim_url":"https://unfragile.ai/submit?claim=mcp-whchien-ai-trader","compare_url":"https://unfragile.ai/compare?artifact=mcp-whchien-ai-trader"}},"signature":"b1I6La2xW2lVnQwNrVgNhGFLwozU7QCP7zoCfCpuijdSI5N+AUlbCyx6DQZhMiq6R9Bjx2EFgeclzOx9hq2GAQ==","signedAt":"2026-06-22T17:30:43.889Z","signedBy":"unfragile.ai","version":1},"_links":{"self":"https://unfragile.ai/api/v1/passport/mcp-whchien-ai-trader","artifact":"https://unfragile.ai/mcp-whchien-ai-trader","verify":"https://unfragile.ai/api/v1/verify?slug=mcp-whchien-ai-trader","publicKey":"https://unfragile.ai/api/v1/trust-passport-public-key","spec":"https://unfragile.ai/trust","schema":"https://unfragile.ai/schema.json","docs":"https://unfragile.ai/docs"}}