r/ClaudeCode • u/Bulky_Parsley_4679 • 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
•
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/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:
companyfactsendpoint (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.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.