Inspiration
📖 About the Project
💡 What Inspired This Project
The inspiration for this Personal AI Investment Advisor came from observing the complexity and intimidation factor that many people face when starting their investment journey. While robo-advisors like Wealthfront and Betterment have made investing more accessible, I wanted to create an educational tool that not only provides recommendations but also explains the reasoning behind each decision in plain language.
Having witnessed friends and family struggle with questions like "How much should I invest in stocks vs bonds?" or "What's a reasonable asset allocation for my age?", I realized there was a need for a transparent, educational platform that demystifies investment planning. The goal was to build something that combines the convenience of automated advice with the educational value of understanding why certain recommendations are made.
🎓 What I Learned
Building this project was a deep dive into several domains:
Full-Stack Application Development:
- Mastered Streamlit's multi-page architecture and state management
- Developed reusable component systems for consistent UI/UX
- Implemented session state management for seamless user experiences
- Created responsive layouts with CSS grid systems and modern styling
Data Visualization & User Experience:
- Built interactive charts using Plotly for portfolio allocation and growth projections
- Designed intuitive user interfaces that make complex financial concepts accessible
- Learned to balance information density with usability
- Implemented educational features like glossaries and tooltips
AI Integration & Natural Language Processing:
- Integrated Google Gemini AI for personalized advice generation
- Developed template-based systems for consistent, helpful explanations
- Created educational content that adapts to user's specific situations
- Learned to balance automated advice with human-readable explanations
🔨 How I Built This Project
The development process followed an iterative approach:
1. Research & Planning Phase:
- Studied existing robo-advisors to understand their approaches
- Researched financial planning best practices and asset allocation strategies
- Designed the user flow from questionnaire to recommendations
2. Core Engine Development:
- Built the
AdvisorEngineclass implementing rule-based allocation logic - Created the
PortfolioSimulatorfor growth projections and scenario analysis - Developed template systems for generating natural language explanations
3. User Interface Creation:
- Started with a single-page Streamlit app for the investment planner
- Expanded to a multi-page architecture with Homepage, Portfolio Analyzer, Quiz, and Case Studies
- Implemented consistent styling with CSS gradients and modern UI elements
4. Feature Enhancement:
- Added real-time portfolio analysis with market data integration
- Created an interactive investment quiz for financial education
- Built case study scenarios with AI-powered feedback
- Implemented session state management for persistent user data
5. Polish & Optimization:
- Refined the UI/UX with consistent emoji-based navigation
- Added comprehensive educational content and glossaries
- Optimized performance and user experience across all pages
- Implemented responsive design for various screen sizes
🚧 Challenges I Faced
Technical Challenges:
State Management Complexity: Streamlit's session state can be tricky with multi-page apps. I had to carefully design how user data persists across pages and ensure forms don't reset unexpectedly. The solution involved creating a comprehensive session state initialization system.
Real-time Data Integration: Incorporating live market data through yfinance while maintaining app performance required careful error handling and data caching strategies. Network timeouts and API rate limits needed graceful handling.
AI Integration Reliability: Making the Google Gemini integration robust required implementing fallback systems and error handling for cases where the AI service is unavailable or returns unexpected responses.
Design Challenges:
Balancing Simplicity with Functionality: The biggest challenge was making sophisticated financial concepts accessible without oversimplifying them. This required multiple iterations on the UI design and explanation systems.
Educational vs. Advisory Balance: Walking the fine line between providing helpful educational content and avoiding giving actual financial advice required careful wording and clear disclaimers throughout the application.
Cross-Page Consistency: Ensuring a consistent user experience across multiple pages while maintaining unique functionality for each section required developing a shared component system and styling framework.
Built With
- gemini
- streamlit
- yfinance
Log in or sign up for Devpost to join the conversation.