top of page

Stock Notification System/Robot

This is by far the project I am most proud of. However, I am skipping over details because I plan to turn this project into something larger and potentially start a business with it.

I have been interested in investing for about 2 years, and after I finished undergrad (2019) I really wanted to make a robot that would do my investing for me. I started by finding a broker that has API support, then I built a Python project that could execute and manage trades using the existing API. This worked well other than I did not have a winning strategy, I built the functionality to automate a stock trading strategy but I did not have a winning strategy. Another downside is that this Python project, or robot, had access to all of the money I put in my brokerage account and could make trades in seconds and that scared me so I decided to shift my focus.

So my new goal was to develop a strategy that can make money and then eventually automate this strategy, over the next year I started to learn more about investment strategies and at this point I still don't have a perfect strategy but I am getting close. As I learned more about strategies I realized that in order to win I needed to always be watching what was going on in the market, this was a problem for me as I have other career goals and invest my time into other things.

That is where this project was born, I created a system/robot that watches 'stock' data 24/7 and sends out email notifications when a predetermined event happens. I say 'stock' because I am actually investing in and monitoring the Foreign Currency Exchange Market, or Forex market. Example emails below, the robot sends an email when the blue and red lines cross:

example.PNG

I achieved this by using Node.js and writing custom server code that grabs 'stock' data every 30 seconds, stores the data in database (I am using MongoDB), and sends emails notifications if the notification criteria is met. The server is running this process on 25 different 'stocks'. Realistically there is no way a human can check 25 stocks in 30 seconds and repeat this process for 24/7, which was the main motivation for this system. So far this system has been working well for me, I really like getting emails rather than a robot having access to my bank account.

I am using Amazon Web Services to run the server code in the cloud 24/7 and have had great success, no crashes and I always get accurate email notifications throughout the day. I am also using git version management so I can easily edit the code on my local computer and push the new software to the cloud easily.

Python is my preferred language and normally I would use Python for a project like this. However, I learned Node.js for this because I plan on building a web app/mobile app to interface with the robot/server. Working towards that I have built a REST API to interface with the robot using express. Right now the API does not have much functionality, just plotting different stock data and notification events on a website. I plan to incorporate users and allow the users to set custom notification criteria. To build the front end I am using React JS, I don't have much experience with front end development so I have been taking time to learn. Also it is worth mentioning that this functionality already exists within stock broker's software but there is usually a large fee associated with using it.

I am open to feedback or partners on this project. If you have any ideas please reach out!

bottom of page