Inspiration
People with irregular income often have difficulty planning how much cash they need for the near future. We wanted to build a system that uses historical financial behavior and uncertainty to help users plan their liquidity for the next 30 days.
What it does
Ginseng is a probabilistic liquidity planning system for variable-income investors.
- Simulates 5,000 possible 30-day financial futures
- Calculates a 95% liquidity reserve
- Identifies potential cash shortfalls and their severity
- Compares funding strategies such as credit, investment liquidation, and spending cuts
- Uses CVaR optimization to find a lower-cost funding strategy
- Uses Gemini to explain the quantitative results in plain language
- Integrates Capital One Nessie for financial data
How we built it
We built Ginseng as an end-to-end pipeline: Financial data → Simulation → Risk analysis → Optimization → Recommendation
- Historical daily financial data is processed into time-series features
- Stationary block bootstrap generates 5,000 possible 30-day scenarios while preserving temporal patterns
- Risk metrics measure cash exhaustion, shortfall severity, and time below the liquidity buffer
- CVXPY and the Rockafellar–Uryasev CVaR formulation optimize funding decisions
- Gemini API explains the model's results to users instead of replacing the underlying quantitative model
- Capital One Nessie provides sandbox financial data such as accounts, transactions, merchants, and bills
Challenges we ran into
- Modeling irregular and unpredictable income
- Preserving time-series patterns in simulated financial futures
- Turning uncertainty into actionable funding decisions
- Balancing liquidity needs with investment assets
- Making quantitative results understandable to non-technical users
- Integrating multiple APIs and systems into one workflow
Accomplishments that we're proud of
- Built an end-to-end financial simulation and optimization system
- Generated 5,000 simulated futures for each planning scenario
- Implemented a 95% liquidity reserve framework
- Applied CVaR optimization to funding decisions
- Compared multiple liquidity strategies instead of producing a single estimate
- Connected quantitative outputs to a Gemini-powered explanation layer
What we learned
- Financial planning needs to account for uncertainty, not just averages
- The severity and cost of a financial shortfall matter as much as its probability
- CVaR can connect simulated risk to practical decisions
- Time-series structure is important when generating financial scenarios
- AI is most useful when it explains and communicates real model outputs
What's next for Ginseng
- Connect to real financial accounts
- Support longer planning horizons
- Add portfolio-aware market scenarios
- Add tax-aware investment liquidation
- Improve income and market stress modeling
- Provide proactive liquidity alerts
- Support more personalized funding strategies
Built With
- arch
- clarabel
- cvxpy
- fastapi
- numpy
- pandas
- python
- supabase
- sveltekit
- typescript
Log in or sign up for Devpost to join the conversation.