How I More Than 2x’d my Quant Fund in a Year by Building a Trading Bot

Sebastian Peterlin
3 min readJun 30, 2021

I first began my introduction into medium and high — frequency trading in December 2019. I decided to enter the space because I was doing well with my long-term investments and wanted to broaden my portfolio into short and medium — term investments. I knew I would be at a disadvantage to Hedge Funds that had been in this space for quite some time and had advantages of manpower, computing power, exchange connection speeds, data, and data download speeds, but based on articles I was convinced that it was possible to have some advantage from my position as an independent investor. Therefore I began my venture into this crowded space by reading articles on Medium, talking to friends and relevant profiles on Linkedin, studying all-time greats (Renaissance Technologies, etc.), watching YouTube videos, reading research papers, and more.

After 2 months researching and learning about the space, I signed up for a crypto trading service Cryptohopper and stock trading service Quantopian. While backtesting and implementing algorithms, I read articles from past traders who used these services on best algorithms / parameters to use, signed up for Discord forums, talked to other users of the service, talked to the support teams, compared my statistics to other users, in general learning the ins and outs of each platform and why certain parameters existed (such as minimum trade amount).

After 3 months trading with an online service, I built my trading bot, that I called Q, which would automate everything for me, from downloading data to running the algorithm. While trading on Cryptohopper I realized that I didn’t want a system that alerted me of positions (and then I would decide to buy or not) since my logic, reasoning, and sometimes emotion would interfere with the algorithm and these factors often made me frustrated and resulted in little to no positive influence and a lot of missed opportunities. I also decided not to analyze relevant news since the complexity and the number of unforeseen variables made errors likely, instead focusing only on technical and fundamental analysis.

For brokerages and exchanges, I decided to go with Binance, the largest in terms of trading volume with a great selection of coins, and Alpaca, which is a small brokerage which trades all U.S. assets listed on the main U.S. exchanges (NYSE, NASDAQ). Despite some issues with delisting coins from the Binance API, I was very impressed with Binance, especially that trade orders were always completed at specified price (on limit orders), and easy API integration. I was also happy with Alpaca, however when trading on margin (which is the only option if your initial investment is below a certain amount), it requires you to constantly update buying power based on market movements (if your portfolio gains value you have more buying power and if your portfolio decreases below a certain amount you have to make a margin call). Further prices have to be updated since trades are rarely filled at limit price. However, despite these shortcomings and not being able to trade options (and futures, Forex, international assets), I prefer Alpaca over brokerages such as Robinhood because there are no reported dark pools where high frequency traders can exploit your trades, zero commission, in-house and third-party (Polygon) data integration, and fairly easy API integration.

At the end of the 2020 tax year Q had more than 2x’d my Quant Fund, and I had set up Q to work well into the future with flexible data downloading, algorithms, and backtesting.

--

--