Skip to content

estimates

The estimates.* commands compare reported or provider fundamentals against consensus estimate data. Use this namespace when the user asks for beat/miss analysis or consensus context and the required provider credentials are available.

All examples use --output json so results are stable to parse in terminals, scripts, and automation workflows.

Compare user assumptions against explicit consensus inputs.

finance estimates.compare compares user assumptions against explicit consensus inputs. It returns ok, data, error, and warnings in JSON output. The result payload includes symbol, fiscal_year, period, comparisons, count, method.

Use this command when you already have reported or assumed revenue/EPS and matching consensus inputs and want deterministic beat/miss math without a network call.

Behavior details: No network calls. Compares only values explicitly supplied by the caller.

Terminal window
finance estimates.compare [SYMBOL] revenue=2.2B consensus_revenue=2.0B eps=0.50 consensus_eps=0.45 fiscal_year=2027 [--output json]
ArgumentRequiredDefaultAccepted valuesDescription
consensus_epsYesNoneNumberConsensus EPS input for the comparison.
consensus_revenueYesNoneStringConsensus revenue input. K/M/B suffixes are accepted.
epsYesNoneNumberReported, assumed, or user-supplied EPS input.
fiscal_yearYesNoneIntegerFiscal year label attached to the comparison.
revenueYesNoneStringReported, assumed, or user-supplied revenue input. K/M/B suffixes are accepted.
symbolNoNoneStringTicker symbol to query, such as AAPL or NVDA.
Terminal window
finance estimates.compare IOT revenue=2.2B consensus_revenue=2.0B eps=0.50 consensus_eps=0.45 fiscal_year=2027 --output json

This output was generated with finance estimates.compare IOT revenue=2.2B consensus_revenue=2.0B eps=0.50 consensus_eps=0.45 fiscal_year=2027 --output json.

{
"ok": true,
"data": {
"symbol": "IOT",
"fiscal_year": "2027",
"period": null,
"comparisons": [
{
"metric": "revenue",
"user_value": 2200000000.0,
"consensus_value": 2000000000.0,
"absolute_gap": 200000000.0,
"percent_gap": 0.1,
"percent_gap_pct": 10.0,
"valuation_input_hint": "above_consensus"
},
{
"metric": "eps",
"user_value": 0.5,
"consensus_value": 0.45,
"absolute_gap": 0.05,
"percent_gap": 0.1111111111,
"percent_gap_pct": 11.11111111,
"valuation_input_hint": "above_consensus"
}
],
"count": 2,
"method": "user_metric - consensus_metric"
},
"error": null,
"warnings": []
}
FieldTypeDescription
okbooleanWhether the command completed successfully.
dataobject or nullCommand-specific result payload. It is null when ok is false.
errorstring or nullHuman-readable error message when ok is false; otherwise null.
warningsarrayNon-fatal warnings returned by the command.
data.comparisonsarrayExplicit value-vs-consensus comparisons.
data.comparisons[]objectExplicit value-vs-consensus comparisons.
data.countintegerNumber of records included in the adjacent result array.
data.fiscal_yearstringFiscal year label.
data.methodstringCalculation or comparison method.
data.periodnullReporting or estimate period.
data.symbolstringTicker symbol attached to the comparison.
data.comparisons[].absolute_gapnumberDifference between user and consensus values.
data.comparisons[].consensus_valuenumberConsensus value after parsing.
data.comparisons[].metricstringMetric name.
data.comparisons[].percent_gapnumberDifference as a decimal percentage.
data.comparisons[].percent_gap_pctnumberDifference as a percentage value.
data.comparisons[].user_valuenumberUser-supplied value after parsing.
data.comparisons[].valuation_input_hintstringDirection label for valuation assumptions.

Fetch FMP analyst consensus estimates when configured.

finance estimates.consensus fetches FMP analyst consensus estimates when configured. It returns ok, data, error, and warnings in JSON output. The example below shows the structured failure envelope returned when a required provider credential or dependency is unavailable.

Use this command when you need consensus estimate rows from FMP and have FMP_API_KEY configured.

Behavior details: Requires FMP_API_KEY. Makes one short FMP request and returns a structured configuration error when unconfigured.

Terminal window
finance estimates.consensus SYMBOL [period=annual|quarter limit=10 page=0] [--output json]
ArgumentRequiredDefaultAccepted valuesDescription
symbolYesNoneStringTicker symbol to query, such as AAPL or NVDA.
limitNo10IntegerMaximum number of records returned.
pageNo0IntegerFMP result page offset.
periodNoNoneannual, quarterConsensus period requested from FMP.
Terminal window
finance estimates.consensus IOT period=annual limit=5 --output json

This output was generated with finance estimates.consensus IOT period=annual limit=5 --output json.

{
"ok": false,
"data": null,
"error": "FMP API key is required. Set FMP_API_KEY.",
"warnings": []
}
FieldTypeDescription
okbooleanWhether the command completed successfully.
dataobject or nullCommand-specific result payload. It is null when ok is false.
errorstring or nullHuman-readable error message when ok is false; otherwise null.
warningsarrayNon-fatal warnings returned by the command.