Black Swan
Inspiration
Black Swan was conceived to address a critical gap in personal investing: the need for accessible, advanced risk analysis tools that anticipate the unforeseen disruptions of today's rapidly evolving technological landscape. Rather than looking solely to past financial crises, our inspiration comes from the recent upheavals in the tech industry—where innovations like artificial intelligence, automation, and digital transformation have upended traditional business models and rendered established industries obsolete almost overnight. We recognized that these rapid, disruptive changes introduce unique risks into investment portfolios that conventional models often overlook. By focusing on future-oriented simulations and stress tests, Black Swan empowers everyday investors with the insights needed to navigate an era of constant technological disruption. Our goal is to level the financial playing field by making sophisticated quantitative risk management accessible to all.
What It Does
Black Swan is a cutting-edge web application that provides investors with comprehensive portfolio risk analysis through advanced quantitative modeling and stress testing. Users can manage and flag portfolios via an intuitive dashboard that displays detailed breakdowns of holdings by industry, share count, and portfolio percentage. The core feature is a stress testing module that leverages a tuned language model to select three historical Black Swan events most relevant to the user's portfolio—these events are chosen based on their potential impact in the context of current technological disruptions. Upon selecting an event, the system generates a simulated future scenario using Jump-Diffusion modeling and Monte Carlo simulations, producing key risk statistics (VaR, Expected Shortfall, maximum drawdown, etc.) for each stock and the portfolio as a whole. This rich simulation data is visualized through an interactive graph and used to generate actionable recommendations such as selling shares, hedging with options, or diversifying holdings.
How We Built It
We built Black Swan using a blend of modern web technologies and robust financial modeling techniques. The frontend was developed with Next.js, TailwindCSS, and shadcn UI components, integrated with Google authentication for secure access and hosted on Vercel. The backend is powered by Python and Flask, utilizing libraries such as yfinance, numpy, pandas, and matplotlib to retrieve, process, and visualize financial data. MongoDB stores user portfolios and risk metrics securely, while our stress testing engine combines real-time data with a fine-tuned language model to generate past disruptive events and simulate potential future scenarios using Jump-Diffusion modeling. By leveraging parallel computing, our system is able to run thousands of Monte Carlo iterations in seconds, ensuring accurate and efficient risk assessments.
Challenges We Ran Into
Building Black Swan came with its share of challenges. One significant hurdle was constructing robust, secure data pipelines that handle real-time financial data while managing edge-case inputs effectively. Developing the Jump-Diffusion model required fine-tuning mathematical parameters to accurately capture the extreme volatility characteristic of technological disruptions. Integrating the language model for event selection with our statistical simulation engine demanded careful orchestration to ensure seamless communication between multiple modules. Additionally, coordinating these time-intensive tasks into responsive API endpoints, all while maintaining a user-friendly interface, proved to be a complex but ultimately rewarding endeavor.
Accomplishments That We're Proud Of
We are proud that Black Swan delivers advanced quantitative risk analysis to individual investors—a capability once reserved for major financial institutions. Our team successfully developed a simulation engine capable of executing thousands of Monte Carlo iterations in seconds, accurately reflecting both normal market conditions and extreme disruptive events. The innovative integration of a tuned language model to identify impactful historical events and project future scenarios is a testament to our creative use of AI in finance. We built a comprehensive dashboard that not only visualizes complex simulation data but also provides clear, actionable recommendations for portfolio adjustments. This project demonstrates our ability to merge cutting-edge technology with practical financial insights, setting the stage for a future-ready fintech solution.
What We Learned
Throughout the development of Black Swan, we gained invaluable insights into both quantitative modeling and modern software engineering. We learned how to build robust data pipelines and ensure data security while handling real-time financial information from multiple sources. Our work with Monte Carlo simulations and Jump-Diffusion modeling deepened our understanding of risk quantification, especially in the context of rare, extreme market events. Integrating a fine-tuned language model with statistical analysis taught us the power of prompt engineering and the importance of blending AI with traditional quantitative methods. Additionally, we honed our skills in team collaboration, effective project management, and agile development practices.
What's Next for Black Swan
Looking ahead, Black Swan is poised to evolve into a comprehensive fintech product with even greater capabilities. Our next steps include integrating additional financial instruments such as options, derivatives, and cryptocurrencies to further enhance risk management strategies. We plan to refine our simulation parameters—potentially by training convolutional neural networks on historical disruptive events—to automate and improve parameter estimation. Future updates will expand our platform’s functionality by adding more robust portfolio analytics, enhanced user-specific recommendations, and support for a wider range of asset classes. Ultimately, we envision Black Swan as a real-time, data-driven risk management platform that empowers investors worldwide to navigate an era of constant technological disruption.
Built With
- alpha-vantage-api
- flask
- google-oauth
- html
- javascript
- llms
- mongodb
- nextjs
- openai-api
- prompt-engineering
- python
- react
- render
- shadcn
- tailwindcss
- typescript
- vercel
- yahoo-finance
Log in or sign up for Devpost to join the conversation.