Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NEWSAPI_KEY | No | Your NewsAPI key for news aggregation (optional) | |
| ALPACA_API_KEY | Yes | Your Alpaca API key for paper trading | |
| ALPACA_SECRET_KEY | Yes | Your Alpaca secret key for paper trading |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| health_check | Returns the health status of the MonteWalk server. |
| get_account_info | Get detailed Alpaca account information including equity, buying power, and day trade status. |
| get_price | Retrieves historical price data (OHLCV) for a given symbol.
Args:
symbol: The ticker symbol (e.g., 'AAPL', 'BTC-USD').
interval: Data interval. Valid values: "1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1wk", "1mo", "3mo".
period: Data period to download. Valid values: "1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max".
visualize: If True, returns a candlestick chart instead of raw data.
Returns:
JSON string of OHLCV data or base64-encoded candlestick chart. |
| get_fundamentals | Retrieves core financial and fundamental data.
Args:
symbol: The ticker symbol.
Returns:
Dictionary containing fundamental data. |
| get_orderbook | Fetches the current order book.
NOTE: yfinance does not provide Level 2 data. This is a placeholder to demonstrate tool registration.
Args:
symbol: The ticker symbol.
Returns:
Message indicating unavailability. |
| place_order | Submits a market or limit order to Alpaca paper trading.
Args:
symbol: Ticker symbol.
side: 'buy' or 'sell'.
qty: Quantity to trade.
order_type: 'market' or 'limit'.
limit_price: Required if order_type is 'limit'.
Returns:
Confirmation message or error |
| cancel_order | Cancels a specific open order.
Args:
order_id: The Alpaca order ID to cancel
Returns:
Confirmation message |
| get_positions | Retrieves the current state of all held positions and cash balance.
Returns:
Dict with 'cash' and 'positions' keys |
| flatten | Immediately closes all open positions.
Returns:
Summary of closed positions |
| get_order_history | Get order history from Alpaca.
Args:
status: "all", "open", or "closed"
Returns:
Formatted order history |
| portfolio_risk | Returns annualized volatility of the portfolio. |
| var | Calculates Value at Risk (VaR). |
| max_drawdown | Calculates Maximum Drawdown. |
| monte_carlo_simulation | Runs a Monte Carlo simulation using Geometric Brownian Motion (Log Returns).
Args:
simulations: Number of paths to simulate.
days: Number of days to project forward.
visualize: If True, returns a histogram of final outcomes. |
| run_backtest | Backtests a Moving Average Crossover strategy.
Args:
symbol: Ticker symbol
fast_ma: Fast moving average period
slow_ma: Slow moving average period
start_date: Backtest start date
end_date: Backtest end date
visualize: If True, returns equity curve chart |
| walk_forward_analysis | Performs Walk Forward Analysis on MA Crossover. Optimizes (Fast, Slow) on Train, tests on Test. |
| compute_indicators | Calculates technical indicators for a symbol.
Args:
symbol: Ticker symbol.
indicators: List of indicators (e.g., ['RSI', 'MACD', 'BBANDS']). |
| rolling_stats | Computes rolling mean and volatility. |
| get_technical_summary | Performs a technical analysis summary (RSI, MACD, Moving Averages). Returns a 'Buy', 'Sell', or 'Neutral' signal based on aggregated indicators. |
| mean_variance_optimize | Calculates optimal portfolio weights using Mean-Variance Optimization (Max Sharpe). |
| risk_parity | Calculates weights based on Inverse Volatility (Naive Risk Parity). |
| log_action | Logs an agent action or reasoning step for audit purposes.
Args:
action_type: Category (e.g., 'REASONING', 'TRADE_DECISION', 'ERROR').
details: Description of the action. |
| get_news | Retrieves recent news headlines for a given symbol.
Args:
symbol: Ticker symbol.
max_items: Maximum number of news items to return.
Returns:
JSON string of news articles with titles and publishers. |
| analyze_sentiment | Analyzes the sentiment of a given text using FinBERT on Modal (via Public Endpoint).
Args:
text: Text to analyze (e.g., news headline, article).
Returns:
Dictionary with polarity, confidence, and classification. |
| get_symbol_sentiment | Fetches recent news for a symbol and calculates aggregate sentiment.
Args:
symbol: Ticker symbol.
Returns:
Aggregate sentiment analysis of recent news. |
| add_to_watchlist | Adds a symbol to the monitoring watchlist. |
| remove_from_watchlist | Removes a symbol from the watchlist. |
| get_crypto_price | Gets the current price of a cryptocurrency.
Args:
coin_id: CoinGecko ID (e.g., 'bitcoin', 'ethereum', 'solana')
vs_currency: Currency to compare against (default: 'usd')
Returns:
Dictionary with price information |
| get_crypto_market_data | Gets comprehensive market data for a cryptocurrency.
Args:
coin_id: CoinGecko ID (e.g., 'bitcoin', 'ethereum')
Returns:
Formatted string with market data |
| get_trending_crypto | Gets the top trending cryptocurrencies in the last 24 hours.
Returns:
Formatted string with trending coins |
| search_crypto | Searches for cryptocurrencies by name or symbol.
Args:
query: Search term (e.g., 'bitcoin', 'BTC', 'ethereum')
Returns:
Formatted string with search results |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| morning_briefing | Generates a morning briefing prompt with Portfolio and Watchlist context. |
| analyze_ticker | Deep dive analysis prompt for a specific ticker. |
| risk_analysis | Comprehensive risk analysis prompt for the current portfolio. |
| backtest_strategy | Backtesting workflow prompt. |
| crypto_market_update | Cryptocurrency market analysis prompt. |
| portfolio_rebalance | Portfolio rebalancing workflow prompt. |
| sync_watchlist | Intelligent watchlist synchronization with portfolio holdings. Agent automatically adds owned symbols and optionally removes sold symbols. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_portfolio_summary | Returns a live summary of the portfolio from Alpaca (Cash, Positions, Equity). |
| get_watchlist_resource | Returns a live view of the watchlist with current prices. |
| get_news_resource | Returns the latest news headlines for the watchlist. |
| get_crypto_resource | Returns the top trending cryptocurrencies. |