Inspiration

We are trying to solve one of the problems provided in the hackathon, "Construct a trading bot", and there are many automated trading bot tutorials online that are very interesting

What it does

the trading bot performs the following functions:

  1. periodically filters out tweets and news related to stocks according to user preference
  2. keeps check on market price movement at every second across multiple financial instruments
  3. determines whether a stock price on a certain day is a good entry or exit point for the stock based on analysis on the stock's past history

How we built it

We wrote the whole program using python. We first get stock price data through the API of Yahoo Finance. Then, we use dataFrame, numpy array, python list operations to operate on and analyze data so that we can extract useful data from the stock price data. In particular, we calculated the average increasing interval and the average decreasing interval of the stock specified by the user. then, we use these useful information to evaluate the stock prices the user specifies and determine whether the user should buy or sell at the price specified.

Challenges we ran into

One teammate is exhausted from their previous hackathon which happened not long ago. Others were very busy during hackathon time and have to do homework. We were very unfamiliar with fintech, so we have to do a lot of research on the topic. For our specific trading strategy, we want to determine the local extrema of the stock data. At first, we tried to convert the discrete stock data into continuous functions and smoothen it into polynomials. Then, take the derivative and determine its zeros to find the extrema. However, we soon realized that it's much simpler to just check if a stock price on a certain date is higher or lower than both its neighbors. Other than that, our unfamiliarity with the python language led to some unexpected problems but we were able to solve them all

Accomplishments that we're proud of

We are very proud of our project as a whole because we created our own unique trading strategy and implemented it with elegance. We also took the time to optimize our user interface, so in the end, it feels pretty user friendly

What we learned

we learned a lot about python, data analysis, and fintech

What's next for Python Trading Bot

We plan on completing all the functionalities we promised. We will also improve our user interface into a graphical user interface so it's more user friendly We will probably host it on a website so it's easily accessible

Built With

Share this project:

Updates