Inspiration

When we first started dabbling in Algorithmic Trading, tutorials were sparse, documentation was non-existent, and a community to support our learning was nowhere to be found. Nowadays, every algorithmic trading library has APIs, documentation, and communities that maintain and develop the software, yet getting into Algorithmic Trading is harder than ever. We realized that a playground to learn the basic principles of Algorithmic Trading would have been a godsend when we started our journey, so we decided to make ByOnePercent!

What it does

ByOnePercent's main function is a playground, where users can select different indicators and see how algorithms based on those indicators make trades. These indicators can be broadly categorized into overlap, momentum, and pattern identifiers, 3 pillars of every modern algorithmic trading system. Once a user selects an algorithm to play with, they are given full range over all of the algorithm's variables to explore how modifying specific variables changes the efficiency and results therefore learning while playing. Users have control over every aspect of the trading journey, so they can fully understand the significance of every factor.

How we built it

Backend: We used the Alpaca API to get stock data based on user requests. After parsing through the data we send it to a custom BackTrading environment where all a strategy to buy and sell based on user input is created and run on the historical data. We used TaLib to get indicators for our algorithms, and numpy/pandas from there forth to run tests and derive results on the algorithm. The results are graphed and then sent to the User's interface. The playground also has a ChatGPT model in the corner to help answer any questions that users might have while playing. We then integrated the financial models to our Flask web server in order to pass data back to our Next.js frontend.

Frontend: We used Next.js to build our application. The framework allows us to have server-side rendering, so we had the chance to implement more complex state management as well as being able to request large amounts of data from our backend server without much latency. UI-wise, we used both tailwind and Chakra UI to design our interface; this workflow gave a good balance between development speed and customizability.

Challenges we ran into

Most of these libraries while well maintained are still littered with bugs, forcing us to create a lot of software in-house due to the lack of reliability in these Trading libraries. Fetching the data, processing it, and displaying results happen very quickly within the backend, but our Frontend next.js page was not able to efficiently keep up so we had to optimize our code and add some sneaky loopholes to make our file transfer quicker.

Accomplishments that we're proud of

We are proud of the playground environment since it is very intuitive instructive, and industrious. Were also proud of the level of control we were able to give users, especially considering how low the barrier of entry is for testing stuff in our environment.

What we learned

We learned how to use the alpaca API, how to design our trading environment, and how to backtest efficiently. We also learned how to quickly display rapidly updating data on websites.

What's next for ByOnePercent

We want to connect our software with actual trading environments, like Alpaca's paper environment, or the NYSE that way users can start algorithmic trading without the need to code the scripts themselves.

Built With

Share this project:

Updates