Skip to content

Commit ebaf321

Browse files
authored
Merge branch 'virattt:main' into main
2 parents 782a465 + 4c355d4 commit ebaf321

10 files changed

Lines changed: 7 additions & 67 deletions

File tree

src/skills/dcf/SKILL.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,14 @@ Call the `get_financials` tool with these queries:
4343

4444
**Fallback:** If `current_investments` missing, use 0
4545

46-
### 1.4 Analyst Estimates
47-
**Query:** `"[TICKER] analyst estimates"`
48-
49-
**Extract:** `earnings_per_share` (forward estimates by fiscal year)
50-
51-
**Use:** Calculate implied EPS growth rate for cross-validation
52-
53-
### 1.5 Current Price
46+
### 1.4 Current Price
5447
Call the `get_market_data` tool:
5548

5649
**Query:** `"[TICKER] price snapshot"`
5750

5851
**Extract:** `price`
5952

60-
### 1.6 Company Facts
53+
### 1.5 Company Facts
6154
Call the `get_financials` tool:
6255

6356
**Query:** `"[TICKER] company facts"`
@@ -70,11 +63,10 @@ Call the `get_financials` tool:
7063

7164
Calculate 5-year FCF CAGR from cash flow history.
7265

73-
**Cross-validate with:** `free_cash_flow_growth` (YoY), `revenue_growth`, analyst EPS growth
66+
**Cross-validate with:** `free_cash_flow_growth` (YoY), `revenue_growth`
7467

7568
**Growth rate selection:**
7669
- Stable FCF history → Use CAGR with 10-20% haircut
77-
- Volatile FCF → Weight analyst estimates more heavily
7870
- **Cap at 15%** (sustained higher growth is rare)
7971

8072
## Step 3: Estimate Discount Rate (WACC)

src/tools/finance/earnings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const EarningsInputSchema = z.object({
1313
export const getEarnings = new DynamicStructuredTool({
1414
name: 'get_earnings',
1515
description:
16-
'Fetches the most recent earnings snapshot for a company, including key income statement, balance sheet, and cash flow figures from the 8-K earnings release, plus analyst estimate comparisons (revenue and EPS surprise) when available.',
16+
'Fetches the most recent earnings snapshot for a company, including key income statement, balance sheet, and cash flow figures from the 8-K earnings release.',
1717
schema: EarningsInputSchema,
1818
func: async (input) => {
1919
const ticker = input.ticker.trim().toUpperCase();

src/tools/finance/estimates.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/tools/finance/formatters.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,6 @@ export function formatInsiderTrades(data: unknown): string {
187187
return lines.join('\n');
188188
}
189189

190-
export function formatAnalystEstimates(data: unknown): string {
191-
const items = Array.isArray(data) ? data : [];
192-
if (items.length === 0) return 'No analyst estimates available.';
193-
const lines = ['Analyst Estimates', ''];
194-
lines.push('| Period | Est. Revenue | Est. EPS | # Analysts |');
195-
lines.push('|--------|-------------|----------|------------|');
196-
for (const row of items as Rec[]) {
197-
lines.push(`| ${fmtDate(row.report_period ?? row.date)} | ${fmtNum(row.estimated_revenue_avg ?? row.revenue_estimate)} | ${fmtPrice(row.estimated_eps_avg ?? row.eps_estimate)} | ${row.number_of_analysts ?? '—'} |`);
198-
}
199-
return lines.join('\n');
200-
}
201-
202190
export function formatEarnings(data: unknown): string {
203191
const d = (data && typeof data === 'object') ? data as Rec : {};
204192
if (Object.keys(d).length === 0) return 'No earnings data available.';
@@ -287,7 +275,6 @@ export const FINANCIAL_FORMATTERS: Record<string, (data: unknown, args?: Rec) =>
287275
get_all_financial_statements: formatAllFinancials,
288276
get_key_ratios: formatKeyRatios,
289277
get_historical_key_ratios: formatHistoricalKeyRatios,
290-
get_analyst_estimates: formatAnalystEstimates,
291278
get_earnings: formatEarnings,
292279
get_financial_segments: formatFinancialSegments,
293280
};

src/tools/finance/get-financials.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Intelligent meta-tool for retrieving company financial data. Takes a natural lan
2121
- Company financials (income statements, balance sheets, cash flow statements)
2222
- Financial metrics and key ratios (P/E ratio, market cap, EPS, dividend yield, enterprise value, ROE, ROA, margins)
2323
- Historical metrics and trend analysis across multiple periods
24-
- Analyst estimates and price targets
2524
- Financial segment breakdowns (revenue, margins, etc. by product / geography)
2625
- Earnings data (EPS/revenue beat-miss, earnings surprises)
2726
- Multi-company comparisons (pass the full query, it handles routing internally)
@@ -54,7 +53,6 @@ function formatSubToolName(name: string): string {
5453
// Import all finance tools directly (avoid circular deps with index.ts)
5554
import { getIncomeStatements, getBalanceSheets, getCashFlowStatements, getAllFinancialStatements } from './fundamentals.js';
5655
import { getKeyRatios, getHistoricalKeyRatios } from './key-ratios.js';
57-
import { getAnalystEstimates } from './estimates.js';
5856
import { getFinancialSegments } from './segments.js';
5957
import { getEarnings } from './earnings.js';
6058

@@ -67,10 +65,9 @@ const FINANCE_TOOLS: StructuredToolInterface[] = [
6765
getAllFinancialStatements,
6866
// Earnings
6967
getEarnings,
70-
// Key Ratios, Snapshots & Estimates
68+
// Key Ratios & Snapshots
7169
getKeyRatios,
7270
getHistoricalKeyRatios,
73-
getAnalystEstimates,
7471
// Other Data
7572
getFinancialSegments,
7673
];
@@ -135,7 +132,6 @@ export function createGetFinancials(model: string): DynamicStructuredTool {
135132
- Company financials (income statements, balance sheets, cash flow)
136133
- Financial metrics and key ratios (P/E ratio, market cap, EPS, dividend yield, ROE, margins)
137134
- Historical metrics and trend analysis
138-
- Analyst estimates and price targets
139135
- Earnings data and financial segments`,
140136
schema: GetFinancialsInputSchema,
141137
func: async (input, _runManager, config?: RunnableConfig) => {

src/tools/finance/get-market-data.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Intelligent meta-tool for retrieving market data including prices, news, and ins
3333
3434
- Company financials like income statements, balance sheets, cash flow (use get_financials)
3535
- Financial metrics and key ratios (use get_financials)
36-
- Analyst estimates (use get_financials)
3736
- SEC filings (use read_filings)
3837
- Stock screening by criteria (use stock_screener)
3938
- General web searches (use web_search)

src/tools/finance/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export { getIncomeStatements, getBalanceSheets, getCashFlowStatements, getAllFinancialStatements } from './fundamentals.js';
22
export { getFilings, get10KFilingItems, get10QFilingItems, get8KFilingItems } from './filings.js';
33
export { getKeyRatios, getHistoricalKeyRatios } from './key-ratios.js';
4-
export { getAnalystEstimates } from './estimates.js';
54
export { getFinancialSegments } from './segments.js';
65
export { getStockPrice, getStockPrices, getStockTickers, STOCK_PRICE_DESCRIPTION } from './stock-price.js';
76
export { getCryptoPriceSnapshot, getCryptoPrices, getCryptoTickers } from './crypto.js';

src/tools/finance/read-filings.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Intelligent meta-tool for reading SEC filing content. Takes a natural language q
2828
- Stock prices (use get_market_data)
2929
- Financial statements data in structured format (use get_financials)
3030
- Company news (use get_financials)
31-
- Analyst estimates (use get_financials)
3231
- Non-SEC data (use web_search)
3332
3433
## Usage Notes

src/tools/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function getToolRegistry(model: string): RegisteredTool[] {
4545
name: 'get_financials',
4646
tool: createGetFinancials(model),
4747
description: GET_FINANCIALS_DESCRIPTION,
48-
compactDescription: 'Financial statements, metrics, and analyst estimates. Handles multi-company/multi-metric queries in one call.',
48+
compactDescription: 'Financial statements and metrics. Handles multi-company/multi-metric queries in one call.',
4949
concurrencySafe: true,
5050
},
5151
{

src/tools/search/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Search the web for current information on any topic. Returns relevant search res
1616
1717
## When NOT to Use
1818
19-
- Structured financial data (company financials, SEC filings, analyst estimates, key ratios - use get_financials instead)
19+
- Structured financial data (company financials, SEC filings, key ratios - use get_financials instead)
2020
- Pure conceptual/definitional questions ("What is a DCF?")
2121
2222
## Usage Notes

0 commit comments

Comments
 (0)