SPay - Let Your Stocks Do the Paying

Inspiration

SPay started from a simple idea during our Capital One hackathon brainstorming session: what if we could turn underperforming stocks into something useful, like paying for everyday purchases? This question sparked our curiosity, even though most of us had limited experience with finance. Ahmad, our finance minor, stepped up and guided us through the basics, patiently explaining stock concepts and strategies to help us all get on board. His insights were key to bringing SPay to life.

What It Does

SPay is a payment platform that automatically sells low-performing stocks at checkout, allowing users to pay with those funds instead of a credit card. SPay analyzes the portfolio in real-time, picks stocks with low forecasted performance, and sells them instantly to cover purchases.

How We Built It

Building SPay was a learning journey for all of us. Ahbab handled much of the backend routing with FastAPI, ensuring that our product ran smoothly and efficiently, providing the real-time responses needed at checkout. For the rest of us, it was our first time working with React and diving into Git version management. Learning to manage branches and work collaboratively without overwriting each other’s code was a whole experience in itself, and we shared plenty of laughs while figuring it out. Ahmad’s finance background also helped us understand stock fundamentals and apply LSTM time series forecasting and RAG-based LLM optimization.

Key Technologies Used

  • Capital One Nessie API: For generating customer data and transaction history.
  • Time Series Forecasting: To predict stock performance over the coming months.
  • RAG-based LLM Framework: Powered by Gemini, this helped optimize which stocks to sell based on real-time data.
  • FastAPI: Ensured efficient, real-time routing and transactions at checkout.

Challenges We Ran Into

Balancing the technical requirements with our learning curves was challenging but rewarding. For most of us, finance was new, so getting a grasp on stock basics while coding the product kept things interesting. Making sure real-time stock assessment worked seamlessly and figuring out LSTM time series forecasting were tough, but each challenge brought new “aha!” moments. Working together on Git also gave us a few memorable (and sometimes funny) lessons in teamwork.

Prompt Engineering Issues

One of the biggest challenges we faced was the prompt engineering of the LLM. We utilized Gemini, but it often tended to overshoot the recommendations, suggesting the sale of far more stock than necessary. This required us to refine our approach meticulously, selecting our words with care to obtain accurate outputs.

Accomplishments We're Proud Of

We’re proud to have built a system that lets people use their underperforming stocks as a new form of payment. The combination of predictive analysis, real-time optimization, and smooth backend routing is something we’re excited to share. On a personal level, the skills we gained, from finance basics to mastering Git and FastAPI, make this project feel like a big accomplishment.

What We Learned

Creating SPay taught us so much—predictive modeling, backend routing, and handling real-time APIs. Ahbab’s FastAPI work set the foundation for a responsive backend, while the whole team became more confident with Git and collaborative coding. We all walked away with new knowledge, both in tech and finance, and the project brought us together as a team.

What's Next for SPay

We’d love to improve forecasting accuracy and add features that let users choose which assets to liquidate. Expanding SPay’s options and making it more customizable is something we’re excited to work on.

Built With

  • Python
  • FastAPI
  • Gemini's RAG-based LLM framework
  • React
  • Capital One Nessie API
  • Time Series Forecasting

Built With

Share this project:

Updates