Be a Data Driven Investor Without Having to Code

Introducing Hawksight, a simple yet powerful investment analysis platform for data driven investors

Lorenzo Ampil
Geek Culture
8 min readJun 23, 2021

--

Photo by Martin Adams on Unsplash

Coming from a data science background, I’ve always believed that being “data-driven” with your investments is important if you want to get returns that can potentially beat the market. This typically involves performing quantitative analysis, and executing trades using algorithmic strategies, that utilize programming languages like Python, and R.

The main point of data-driven investing is that you choose your trades based on strategies that have measurable evidence of actually working in the past, in such a way that you expect them to continue to work in the future.

Historically, this is already being done successfully by “quant hedge funds” like Renaissance Technologies, and Two Sigma, who trade using hundreds of billions of US dollars in capital combined.

This tells us that using algorithms, and analytics for investment decisions works, but is this accessible for most of us regular people? Not exactly …

For individuals, data-driven investing is possible, but it’s still limited to those who know how to code, and understand advanced financial math. This leaves out the vast majority of retail investors who don’t have the technical background necessary.

To level the playing field, my co-founder, and I built Hawksight, which allows everyone to be data driven with their trades, without having to write a single line of code. It does this mainly by allowing users to easily “backtest” their trading strategies in as few as 2 clicks!

The idea of backtesting, and why it’s important for data driven investing is that it’s a systematic way to measure the historical performance of any trading strategy. In other words, it answers the question: “How much money would I have gained had I followed this strategy for this asset (e.g. Bitcoin)?”.

This is an incredibly important question to answer because of course, you would want to follow the strategies that have been shown to work as much as possible. Using Hawksight, you can easily experiment with different strategies, so that you can choose the best one for yourself!

Let’s backtest our first strategy!

For those not familiar, the simple moving average crossover (SMAC) strategy is a very simple yet powerful trading strategy that involves plotting two moving average lines based on the asset’s closing price: 1) the fast moving average (which is averaged across less days), and 2) the slow moving average (which is averaged across more days).

From here, the idea is that the signal to “buy” occurs when the fast moving average (e.g. 10 day moving average) crosses over from below to go above the slow moving average (e.g. 30 day moving average). Then similarly, the signal to “sell” occurs when the fast moving average crosses over from above to go below the slow moving average.

You can check out the line chart below (lower plot) to see how these moving averages would look for the price of Bitcoin from June 19, 2020, to June 19, 2021 (1 year).

You’ll see that the crossovers would have occurred multiple times in the past year, triggering multiple buy & sell signals (upper plot).

Now from here, the natural question is: “How much returns would I have gotten if I followed this strategy for the past year?”. To answer this question, we can use Hawksight’s Strategy Analyzer (also known as HawkTest) to backtest this strategy (shown below).

As you can see, there are many options you can set, but we will mainly focus on changing the investment type to Crypto, and changing the symbol to BTC/USDT, which is the symbol for Bitcoin denominated in (essentially) US dollars. Note that as of writing the last 1 year is June 19, 2020 to June 19, 2021, so to replicate this analysis, you can just set this as a “custom date range” yourself, or you can run it automatically through this link.

Then from here, we’ll choose the SMAC strategy, which stands for “Simple Moving Average Crossover”, which also happens to be the strategy that we want to test. Lastly, we can just click “Analyze” to start backtesting the strategy!

You can view the analysis above automatically through this analysis link.

Now you’ll see that the analysis was run for the strategy, and the results are shown on the screen. These include the strategy’s performance, and charts that plot the historical buy & sell signals, the price, and the moving average lines that were used in the strategy.

Let’s focus on the performance metrics shown at the top of the results.

Analyzing our strategy’s results

From the results table above you can see your % Total Return on investment in the last year had you followed your SMAC strategy. This means you would have earned 220.53% in the last year had you followed this strategy for Bitcoin. You can also see the absolute metrics like Total Return, and Portfolio Value.

Although, note that this is for the case that we set 100K USD as the initial cash. For simplicity sake, I recommend that you keep that value at 100K since we don’t support fractional trades yet, so you’ll need at least that much to be able to buy Bitcoin. Don’t worry though, we will support fractional trading soon enough!

Lastly, you can also see that we have a Buy and Hold Return % on the right, with a value of 261.3%. This is meant as a benchmark so that you can immediately compare the performance of timing your entries and exits, vs simply buying and holding that asset (in this case Bitcoin). In our case, you’ll see that the SMAC strategy actually would have performed a bit worse than the Buy & Hold strategy.

However, if you look at the historical signals (shown below) it would have told us to sell off our Bitcoin right before the crypto market crash last May 2021, which means that while the strategy may not have had a similar upside, it looks like it avoids large drawdowns (drops in value) more effectively, compared to simply buying and holding Bitcoin.

Now from here, there’s a lot more that you can do to experiment with the strategy that you’re testing. The simplest thing to try out is you can play around with the strategy parameters (the sliders at the top), so you can try different combinations of “slow period”, and “fast period”, and see how these changes affect your strategy’s return %. Note that “slow period” refers to the period for the “slow moving average”, while “fast period” refers to the period for the “fast moving average.

As an example, let’s try changing the “Fast Period” to 20, and the “Slow Period” to 45 (results shown below). You can also try this yourself through this analysis link!.

You can view the updated analysis above through this analysis link

As you can see from the results above, the return % actually went up from 220.53% to 369.33%. Such is because our SMAC strategy would have held Bitcoin through most of the recent increase in prices, while selling it off right before the market crash last May 2021. Lastly, you’ll notice that the strategy would have significantly outperformed a simple buy & hold strategy (+369.33% vs +259.38). Pretty impressive!

Getting automated trading signals for baskets of assets

The last feature I wanted to share is our Signal Screener, where you can receive daily trading signals on specific baskets of assets straight to your inbox. To subscribe you simply have to go to the homepage and choose your basket of choice from the Signal Screener!

The daily trading signals report looks like the one below:

How are these signals generated? Well, Hawksight basically has an AI engine that stores the best performing strategies for each of the assets listed in each basket. The idea is that you only receive the signals on the top performing strategies for each of the assets.

When interpreting these signals, it’s important to remember that these are based on strategies that have performed relatively well historically (e.g. in the past year), but this does not necessarily mean these will continue to work in the future. I highly encourage you to click the links of the symbols, which lead directly to the analysis that was used as basis for the signal. This way, you can judge for yourself on whether to act on it.

In other words, use this as a starting point so that you have an idea about what are some potential positions in the market that you could be taking right now, and use this information to supplement other information you have about an asset before making trades.

Conclusion

Congratulations! You are now a “data-driven” investor, having backtested your own strategy, while also analyzing its results. Wasn’t hard at all was it?

Now, this is a great start for your journey towards being more data driven with your investments, but remember that this is just the beginning. There are many more strategies for you to experiment with, and there is alway much more to learn in the space.

Also, it’s important to note that backtesting has its own set of limitations as well, such as being prone to issues such as overfitting, and look ahead bias. If you want to learn more, I have a section discussing these more in a previous article.

Do watch out for future articles where I’ll discuss some of the more advanced features of Hawksight, like strategy optimization, setting your own alerts, and custom strategy creation. Make sure to also stay tuned for more of my articles about general topics in data science, finance, crypto, and DeFi!

Lastly, we would love to have you join our Hawksight communities on Discord, Telegram, and Facebook! Do join if you wanna stay in the loop about weekly product updates, and feel free to give feedback, feature requests, or ask any questions that you may have through these channels.

--

--

Lorenzo Ampil
Geek Culture

Co-Founder @ Hawksight.co | Creator of the fastquant python package https://github.com/enzoampil/fastquant | AI Products for Finance with #ML, and #NLProc