About the project
What inspired us
The datathon asked us to start from a question, not a technology. Ours was: given my profile, which assets deserve a look, and when is an idea I like a bad fit for me?
The three personas became our tests. Amira takes a lot of risk but should still be diversified. Mateo cares about ESG, so his results should change because of it. Robert is cautious and wants a volatile stock, so the app should push back instead of agreeing.
Most AI finance tools sound sure of themselves and cite nothing. We wanted the opposite, so we followed one rule: the language models argue, and the code decides. EasyTrade is a simulator. It places no trades and gives no personal advice, so it talks about "leads to explore", never "recommendations".
What we learned
- Keep numbers out of the model. Models are good at searching, arguing and writing. They are not good at math. Every figure comes from plain Python, and every ranking comes from a rules-and-weights engine.
- Orchestrate AI with workflows you control. We ran the agents as Lambda functions in a Step Functions workflow instead of using a managed agent service. That kept the order of steps, the retries and the failure handling in our hands, and the workflow graph doubles as a live view of what the AI is doing.
- Match the model to the job. Bedrock gave us access to Claude models without any servers. We used a fast, cheap model for light steps and a stronger one for the hard ones, with permissions limited so only the steps that need a model can call one.
- Plan for latency and cost. A full analysis takes about two minutes and costs roughly 35 cents because of the many model calls. So we precompute the common analyses, and the app answers instantly.
How we built it
The pipeline
The steps run in order: weight the profile, check the numbers, research, debate (Bull, Realist and Bear), decide, then explain. Disagreements between the debaters are kept, not smoothed over.
The tech
- Backend: Python (FastAPI, pandas, pydantic).
- Cloud: AWS, deployed with CDK. Step Functions runs one Lambda per step, Bedrock provides the models, API Gateway is the entry point, and S3 and DynamoDB store data and results.
- Mobile app: Expo (React Native) with a dependency graph, a "Why?" screen for every number, and a "test an idea" feature.
- ESG data: public EPA and Environment Canada emissions files, plus 30 hand-entered facts from sustainability reports and fund sheets. We documented each source's licence.
The result
All 12 acceptance scenarios pass as automated tests, along with 366 tests in total. Mateo's case now works: the engine scores ESG, puts the ESG fund first, and rules out the biggest emitters, citing dated evidence.
Challenges we faced
Messy public data
The government files used an old text encoding, spread emissions over six Excel sheets, and gave false name matches. Searching for "Apple" found a property company.
Not enough information
Canada's data lists facility operators, not parent companies, so some company totals are minimums. We say so in the app instead of guessing.
Simulation for learning only. Not financial advice.
Built With
- amazon-api-gateway
- amazon-bedrock-(claude-haiku-5.5-and-sonnet-5.5)
- amazon-cloudwatch-logs
- amazon-web-services
- android
- aws-cdk
- aws-cloudformation
- aws-lambda
- aws-step-functions
- boto3
- csv
- expo.io
- fastapi
- finnhub
- ios
- json
- linux
- parquet
- pytest
- python
- react-native
- tanstack-query
- typescript
- web
- zustand