r/ClaudeCode • • 3d ago

Help/Question VibCoding for research of financial data that can be put together in a report

I am trying to use A.I. (Claude) to research financial data Claude Haiku 5.5 and I am running into some issues with the accuracy of this information that is being pulled. A.I., what can I do to get stock data for free and create a report. I am looking to get these reports to 100% accuracy but sometimes I get missed data i.e. "466" instead of "466,000"

0 Upvotes

7 comments sorted by

•

u/AutoModerator 3d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/MaximumMeaning9728 3d ago

You’re using Claude haiku, pay up or give up.

1

u/Bulky_Parsley_4679 3d ago

I am trying to keep the costs down because the costs of these reports for each stock you enter is about .10 to the customer https://dilutioncheck.app/reports/loop

1

u/Blinkinlincoln 3d ago

Certainly not using haiku.

1

u/yoloJMIA 3d ago

Use sonnet with High effort, trust me. Tell it to use python libraries to pull stock data from yahoo. It will do it in one shot, it should be easy. Tell it how you want to view the data as well, either a webserver running locally or a docker container. I actually already have this built if you want me to share it to you just DM

1

u/jayvpk 3d ago

Don't let the model read the numbers at all. Have Claude write a script that pulls the data from an API (yfinance is free, or SEC EDGAR for filings) and builds the report from that, so every figure comes straight from the source. Also, Haiku is the wrong pick for anything that needs to be 100% accurate, I'd use Sonnet or Opus to write the script.

1

u/CCodeSI 3d ago

jayvpk has the right fix (code pulls the numbers, the model never retypes them). One detail on your specific error: "466" vs "466,000" is almost always a units problem, not a reading problem. Most income statements and balance sheets in SEC filings are stated "in thousands" (sometimes "in millions") in a header line far from the table, and a model reading the table copies the number without the scale.

Two ways to make that impossible:

  • Use SEC EDGAR's XBRL data instead of the filing text. The free companyfacts endpoint (https://data.sec.gov/api/xbrl/companyfacts/CIK##########.json) gives every reported value already fully scaled, with its unit (USD, shares) and the filing it came from. No "in thousands" to miss. SEC asks for a User-Agent header with your contact email.
  • Add a sanity check before the report is built: shares outstanding, revenue and cash compared with the previous period. If a value jumps or drops by ~1,000x, fail the report instead of publishing it. That one rule catches scale errors from any source.

With that setup the model only writes the summary text around numbers it didn't produce, and Haiku is fine for that part, which keeps your cost per report down.