finyahoo — analyst consensus
Take one ticker and print its sell-side analyst consensus -- target price high / low /
mean / median, the recommendation (strong_buy / buy / hold / sell / strong_sell) and its
numeric mean, the analyst count, and the rating distribution across the last few months.
The fetching and parsing live in the finyahoo package (on PyPI); this skill is a thin
wrapper that calls its CLI and relays the result. An unknown ticker or a rate block comes
back as a one-line error -- relay it as-is. For the live price use quote, for the
fundamentals snapshot use profile.
Prerequisite
This plugin calls the finyahoo CLI, so the package must be installed first:
pipx install finyahoo # or: pip install finyahoo
That puts the finyahoo command on PATH. No API key or login is needed.
Running
finyahoo consensus "<SYMBOL>" [--json]
- Default output prints the consensus as aligned
name value(symbol, target_high/low/ mean/median, recommendation_mean, recommendation, analyst_count), then a short rating distribution -- this month (0m) back to-3m, counting strong_buy / buy / hold / sell / strong_sell. --jsonemits the full record.
This is the current sell-side consensus as of now -- targets and ratings aggregated
by Yahoo across the covering analysts. Note the target range can be very wide (a single
outlier high or low); the mean/median are the center, and recommendation_mean runs
1=strong_buy .. 5=strong_sell. For dated prices use history.
Procedure
- Get the symbol. Find a Yahoo ticker (US
AAPL; Korean005930.KS/.KQ). Indices and names with no analyst coverage return a 404 -- consensus is equities-only in practice. If there is no symbol, ask. Handle several requested symbols one at a time. - Run.
Addfinyahoo consensus MU--jsonwhen the user wants every field or machine-readable data. - Relay the result. Show the CLI's stdout as-is -- do not drop, reorder, or rewrite
rows. You may point to a field already in the output (the mean/median target, the
rating,
recommendation_mean, the analyst count, or the drift across the0m..-3mdistribution rows). To compare a target against the live price, runquote-- the price is not in this command's output. - Error handling. When the CLI exits non-zero, relay the one-line
finyahoo: <message>from stderr as-is:command not found: finyahoo-> not installed; point the user atpipx install finyahoo.- a
...quoteSummary/<sym> returned 404message -> a delisted/unknown ticker, an index, or a symbol with no analyst coverage (consensus is equities-only). - a 429 / refusing-this-client message -> Yahoo is rate-limiting; wait and retry.
What this skill does not do
- It does not re-implement fetching or parsing (the package does); it always calls the CLI.
- It is sell-side estimates, not fundamentals or price -- use
profilefor the fundamentals snapshot andquotefor the live price.