get_signal_history
Retrieve historical financial signals with regimes, postures, and risk scores to track market condition evolution over time.
Instructions
[BETA] View Fathom's signal log. Shows recent signals with their regimes, postures, and risk scores. Useful for tracking how conditions evolved over time. Accuracy scoring is under development.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of recent signals to return (default: 20) |
Implementation Reference
- src/tools/get-signal-history.ts:20-66 (handler)The main handler function for the `get_signal_history` tool. It fetches signals, computes accuracy statistics, formats the output, and includes error handling.
export function getSignalHistory(limit = 20): SignalHistoryOutput | ErrorOutput { try { const signals = getRecentSignals(limit); // Recompute accuracy stats const accuracy = signals.length > 0 ? computeAccuracyStats() : getAccuracyStats(); const recent = signals.map(s => ({ timestamp: s.timestamp, tool: s.tool, regime: s.regime, posture: s.posture, risk_score: s.risk_score, fear_greed: s.fear_greed, accuracy_verdict: s.accuracy?.verdict, })); let guidance = `${signals.length} signals logged. `; if (accuracy && accuracy.evaluated_signals > 0) { guidance += `Accuracy: ${accuracy.win_rate_pct}% win rate across ${accuracy.evaluated_signals} evaluated signals. `; if (accuracy.win_rate_pct > 65) { guidance += 'Fathom signals have been historically reliable. Weight them in your decision-making.'; } else if (accuracy.win_rate_pct > 50) { guidance += 'Fathom signals show positive edge but use them as one input among many.'; } else { guidance += 'Accuracy data is still building. More signals needed for reliable statistics.'; } } else { guidance += 'Accuracy tracking requires 2+ weeks of signal history to evaluate outcomes. Keep calling Fathom to build your proprietary track record.'; } return { recent_signals: recent, accuracy, total_signals_logged: signals.length, agent_guidance: guidance, }; } catch { return { error: true, error_source: 'get_signal_history', agent_guidance: 'Signal history temporarily unavailable.', last_known_data: null, data_warnings: ['Signal history service temporarily unavailable.'], }; } } - src/tools/get-signal-history.ts:5-18 (schema)Interface defining the expected structure of the tool output.
export interface SignalHistoryOutput { recent_signals: { timestamp: string; tool: string; regime?: string; posture?: string; risk_score?: number; fear_greed?: number; accuracy_verdict?: string; }[]; accuracy: AccuracyStats | null; total_signals_logged: number; agent_guidance: string; }