Inspiration
GoalWealth: Multi-Channel Investment Planner Powered by Gemini
Inspiration
Living in Nigeria, I witnessed a gap: sophisticated investment advice (including emerging opportunities like Solana DeFi with 8-35% yields) remained inaccessible to everyday investors. Generic robo-advisors don't cut it - people need specific numbers, personalized strategies, and actionable steps.
The vision: An AI advisor that explains not just "invest in index funds" but exactly how much, when, where, and why - across traditional markets AND cutting-edge DeFi protocols.
How Gemini Powers GoalWealth
Gemini 3 pro is the intelligence engine behind every feature:
1. Investment Planner Agent
from google import genai
client = genai.Client(api_key=gemini_key)
response = client.models.generate_content(
model='gemini-2.5-flash',
contents=create_personalized_prompt(user_profile)
)
Generates comprehensive plans with:
- Exact dollar allocations across 10+ asset types
- Risk assessment scored 1-10 with reasoning
- 30-year wealth projections (conservative/moderate/aggressive)
- Week-by-week implementation timeline
- Solana DeFi integration (Jito, Raydium, Kamino)
Why Gemini 2.5 Flash? Fast response times (8-12s), cost-effective, and handles complex multi-part instructions perfectly.
2. Context-Aware Chat Advisor
@track(project_name="goalwealth", tags=["advisor"])
def get_investment_advice(question, user_context):
prompt = f"""
USER PROFILE:
- Age: {user_context['age']}
- Risk Tolerance: {user_context['risk_tolerance']}
- Timeline: {user_context['timeline']} years
QUESTION: {question}
Provide specific, actionable advice with:
- Exact numbers and percentages
- At least 2 risk warnings
- 2-3 clear next steps
"""
return client.models.generate_content(
model='gemini-2.5-flash',
contents=prompt
).text
Gemini remembers user context (age, risk level, goals) and provides personalized responses, not generic advice.
3. Educational Content Generator
def generate_guide(topic, user_level):
prompt = f"""
Create a {user_level} guide on {topic}:
Structure:
1. WHAT IS IT? (2-3 sentences)
2. WHY IT MATTERS (investment relevance)
3. HOW IT WORKS (3-5 bullet points)
4. KEY NUMBERS (specific APYs, risks)
5. GETTING STARTED (actionable steps)
6. COMMON MISTAKES (pitfalls)
"""
return client.models.generate_content(
model='gemini-2.5-flash',
contents=prompt
).text
Generates on-demand guides for 7 investment topics at 3 experience levels (Beginner/Intermediate/Advanced).
🛠️ What I Built
5 AI-Powered Features:
- Investment Planner - Personalized multi-channel strategies
- Portfolio Tracker - Live market data with real-time calculations
- AI Advisor Chat - Context-aware Q&A with Gemini
- Educational Resources - AI-generated learning guides
- Opportunity Alerts - Market condition monitoring
Multi-Channel Integration:
- Traditional: VTI, BND, VXUS, VNQ, GLD
- Crypto: BTC, ETH, SOL
- Solana DeFi: Jito (8-9% APY), Raydium (20-25%), Kamino (25-35%)
Live Visualizations:
- 30-day price history charts
- DeFi yield comparison
- 30-year wealth projections with 3 scenarios
📊 Why Gemini 2.5 Flash Was Perfect
Speed: 8-12 second response times for complex investment plans
Cost-Efficiency: Free tier enabled rapid prototyping and testing
Quality: Handles complex, multi-part instructions:
prompt = """
Create an investment plan that:
1. Assesses risk (1-10 scale with reasoning)
2. Allocates across 10+ assets with EXACT dollar amounts
3. Explains each allocation (2-3 sentences)
4. Projects 30-year growth (3 scenarios)
5. Provides week-by-week implementation steps
6. Integrates Solana DeFi (Jito, Raydium, Kamino)
7. Stays under 800 words
"""
Gemini consistently delivers structured, comprehensive responses.
Reliability: When gemini-2.5-flash hit rate limits, easy fallback to gemini-1.5-flash:
try:
response = client.models.generate_content(model='gemini-2.5-flash', contents=prompt)
except:
response = client.models.generate_content(model='gemini-1.5-flash', contents=prompt)
🧗 Challenges & Solutions
Challenge 1: Ensuring Specific Advice
Problem: Generic AI responses like "invest in diversified portfolio"
Solution: Engineered prompts requiring exact numbers:
prompt = """
CRITICAL: Include specific dollar amounts, tickers, and percentages.
Example: "$3,000 in VTI (30%)" NOT "some money in stocks"
"""
Result: 8.8/10 specificity score via systematic evaluation.
Challenge 2: API Rate Limits
Problem: Hit 20 requests/day on free tier during testing
Solution:
- Implemented response caching
- Created mock responses for offline development
- Switched to
gemini-1.5-flashfor stability
Challenge 3: Balancing Detail vs Readability
Problem: Investment plans were too technical or too vague
Solution: Structured prompting with clear sections and word limits:
prompt = f"""
Create plan in this EXACT structure:
## RISK ASSESSMENT (50 words)
## ASSET ALLOCATION (200 words, table format)
## IMPLEMENTATION GUIDE (150 words, numbered steps)
## 30-YEAR PROJECTIONS (100 words, 3 scenarios)
Total: ~500 words
"""
📈 Results & Impact
Quality Metrics:
- Investment Planner: 8.8/10 quality score
- Chat Advisor: 7.5/10 quality score
- Response Time: 8-12 seconds average
- User Satisfaction: Users report plans are "more specific than my financial advisor"
Real-World Value:
- Multi-currency support: 8 currencies (USD, EUR, GBP, NGN, JPY, CAD, AUD, INR)
- Solana DeFi education: First platform explaining Jito/Raydium/Kamino alongside traditional investing
- Accessibility: Free, instant, personalized advice vs $200+/hour financial advisors
Innovation:
- Only investment planner integrating Solana DeFi (Jito, Raydium, Kamino) with traditional assets
- Systematic evaluation framework proving AI quality
- Context-aware chat that remembers user profile
💡 What I Learned
About Gemini:
- ✅ Excellent at following complex, multi-part instructions
- ✅ Consistent structured output with proper prompting
- ✅ Fast enough for real-time chat experiences
- ✅ Free tier sufficient for MVP development
About AI Development:
- Prompt engineering is 80% of quality
- Structured output requires structured prompts
- Fallback models are essential for reliability
- User context dramatically improves responses
About Investment Advice:
- People need specifics: dollar amounts, percentages, tickers
- Risk warnings must be prominent, not buried
- Traditional + crypto + DeFi together = compelling value
- Education alongside tools = better adoption
🚀 Technical Architecture
# Multi-Agent Architecture
class GoalWealth:
def __init__(self):
self.gemini = genai.Client(api_key=key)
def planner_agent(self, profile):
"""Creates comprehensive investment plans"""
return self.gemini.models.generate_content(
model='gemini-2.5-flash',
contents=self._build_planner_prompt(profile)
)
def advisor_agent(self, question, context):
"""Answers investment questions with context"""
return self.gemini.models.generate_content(
model='gemini-2.5-flash',
contents=self._build_advisor_prompt(question, context)
)
def education_agent(self, topic, level):
"""Generates learning guides"""
return self.gemini.models.generate_content(
model='gemini-2.5-flash',
contents=self._build_education_prompt(topic, level)
)
Tech Stack:
- AI: Google Gemini 2.5 Flash (primary), Gemini 1.5 Flash (fallback)
- Framework: Streamlit
- Evaluation: Opik by Comet
- Data: yfinance (stocks), CoinGecko (crypto)
- Visualization: Plotly
- Deployment: Streamlit Cloud
🎯 Why This Matters
For Users: Professional-grade investment advice, instantly, for free, with specific Solana DeFi integration.
For Developers: Demonstrates how Gemini can power complex financial applications with proper prompt engineering.
For the Ecosystem: Bridges traditional finance and crypto/DeFi, making sophisticated strategies accessible.
🔮 Future with Gemini
Next Steps:
- Gemini Pro for Complex Analysis - Portfolio optimization, tax strategies
- Multimodal Features - Upload portfolio screenshots, analyze charts
- Gemini Function Calling - Direct integration with DeFi protocols
- Long Context Window - Analyze entire investment history
Vision: An AI investment advisor that's not just knowledgeable, but truly intelligent - understanding context, learning preferences, and providing genuinely personalized guidance.
🙏 Acknowledgments
Thank you to Google for Gemini - its speed, quality, and accessibility made this project possible. The free tier enabled rapid iteration and testing, and the API design made integration seamless.
Live Demo: https://goalwealth.streamlit.app/
Source Code: https://github.com/vancube2/GoalWealth
Built by: Evans Chibuike Nwaozuzu (Nigeria)
Log in or sign up for Devpost to join the conversation.