Why long and flash fiction both deserve our attention.
The end result of developing and backtesting any trading strategy is typically a set of statistics that indicate how well the strategy has performed in the past. However, I have found that whilst helpful, seeing raw statistics doesn’t give you the full picture.
A simple technique I have used to understand the performance of a strategy is to create simple visualisations. For example, by plotting the equity curve as a function of time and shading the regions where the strategy produces winning and losing trades.
Here is an example for a simple Moving Average Convergence Divergence strategy applied to the BTC-USD trading pair:
In my opinion, charts such as the above make it more straightforward to see the overall picture of strategy performance. For example, I can quickly see that:
And that was a super quick analysis — a longer stare will surely reveal more!
In this article I will share how these charts can be made rather easily in Python using the plotly
library. I will include the base code in this article which will create the above image; you can afterwards fine-tune that code to your liking.
Side note: The excellent feature of plotly
is that it creates an interactive chart in your browser, so you can zoom in, turn on/off different chart elements and download screenshots!
For the purpose of demonstration, we are going to consider a simple strategy based on the MACD technical analysis indicator.
Dominic is the Founder and Director of Monkhouse & Company, a Business Coaching company for high-growth tech firms. If you’re passionate about growth, email him at dom@monkhouseandcompany.com. You’re…
This sweatshirt is Made To Order, one by one printed so we can control the quality. We use newest DTG Technology to print on to Sweatshirt Color variant is black, gray, white , and Many More…
HIV adalah pendek untuk Human Immunodeficiency Virus. Virus menyerang sistem imun. Virus ini melemahkan keupayaan tubuh untuk melawan jangkitan dan penyakit. Virus ini menyerang manusia dan menyerang…