Inspiration

Let's say you are a random dude, and you are interested in getting into investing. You realize you need something called a stock portfolio! A stock portfolio is basically collection of assets that you invest money into. How do we build this stock portfolio? There is literally infinite ways to allocate stocks, there are different types of stocks, bonds, etc. and I have no idea how to choose the best one. Our program basically does this for you. We call this Finpal!

What it does

Finpal creates an optimized personalized stock portfolio for you, and manages it over time. This allows any person to get into investing without the huge learning curve! A big factor in determining your stock portfolio is risk factors and personalized preferences. We felt like using a chatbot would be the best way to extract these features and provide a natural way to interface with the portfolio. The chatbot helps determine your risk factor by either guiding you to take a 13 question survey (used by Rutger's University) or manually enter your desired risk factor. The chatbot then decides what proportion of stocks, bonds, and cash to to allocate. In addition, the chatbot allows you to input companies that you specifically want to invest in. As time progresses, the chatbot monitors your portfolio and will adjust your portfolio for you based on the overall volatility of the market. It will also notify you through a SMS api of returns and changes.

How we built it

Magic We used Google Cloud's DialogFlow to build a conversational model that allows for a greater variety of conversations using NLP. The BlackRock API was very helpful as it allowed us to have our portfolios rated and would compute the returns for us. In addition, we sourced VIX data from the Yahoo Finance API. We used Google's SMTP server and many carrier's (AT&T, Verizon, Sprint, T-Mobile) ability to email phone numbers in order to send updates to our clients. Our DialogueFlow conversational model was connected to a Flask server in order to facilitate all of the apis we were running. The Flask server was supervised by an ngrok tunneling service. To access the bot we made a landing page using Bootstrap and hosted it with Github Pages.

Challenges we ran into

Initially a major challenge we faced was understanding DialogFlow, and how to extend it to a Python backend. We received many 504 Internal Errors when connecting DialogFlow with Flask. Another challenge was determining the optimal way to allocate assets, and a similar adjustment strategy.

Accomplishments that we're proud of and What we learned

We are incredibly proud of our new-found knowledge of apis, and of the financial knowledge we gained.

What's next for FinPal

We would like to extend FinPal to select assets based off of the client's interested sector. In addition, we want to improve the allocation and adjustment algorithm. In particular, we want to investigate policy gradient models. Finally, we want to add to the landing page to track a client's current portfolio

Built With

Share this project:

Updates