0%

Cover image created through Copilot

Traditional grid trading systems, despite their popularity, face critical limitations with static price levels and poor performance in trending markets. Also, the vulnerability to sudden market gaps and the inability to adapt to changing market volatility is another huge obstacle. Given the promising and speedy advance in both hard and software of machine learning, Francesco Rundo, *Francesca Trenta, Agatino Luigi di Stallo, and Sebastiano Battiato* in the article Grid Trading System Robot (GTSbot): A Novel Mathematical Algorithm for Trading FX Market proposed a new type of Grid Trading System that solves the challenges of the traditional one. This system dynamically optimizes entry/exit points and adapts to market conditions in real-time, maximizing profit potential while managing risks. Join me as I break down the complete process, from data preparation to model training, and reveal how you can implement this advanced trading strategy yourself.

Read more »

Cover image created through Copilot

Have you ever struggled to understand Bayes’ Theorem? You’re not alone. I used to find the formal definitions and explanations of Bayes’ Theorem on Wikipedia confusing and hard to grasp. But after revisiting the basics of Venn Diagrams, everything suddenly became clear! Let me break down the complex formula into easy-to-digest parts using color coding and visual aids with Venn diagrams. Let’s dive in!

Read more »

Cover image created through Copilot

Ever wondered how to tell if the market is roaring like a bull or growling like a bear? This article will dive deep into how these indicators perform in different market conditions, comparing manual identification with indicator-based methods. By adding this market indicator, you’ll see how momentum strategies shine in bull markets, while mean reversion and pair trading strategies come into play during bear markets. Plus, we’ll uncover some insights that you might never have considered while applying market indicators in your own algorithm trading script. Now, let’s dive in and uncover the secrets of the market together!

Read more »

Cover image created through Copilot

Feature engineering is a make-or-break step in the machine learning pipeline, but even seasoned practitioners can fall victim to a subtle yet devastating mistake. While labeling or transforming data may seem like a straightforward task, a common pitfall lurks in the shadows, waiting to undermine your model’s performance in ways you might not expect. This often overlooked issue can lead to a phenomenon known as “look-ahead bias,” where your model inadvertently gains access to information it shouldn’t have during training. In this post, we’re going to talk about what this pitfall exactly is and how to address it.

Read more »

Cover image created through Copilot

Testing APIs with OAuth 2.0 authentication can be a complex task, but Postman simplifies the process by providing built-in support for various OAuth 2.0 flows. Postman seamlessly complements OAuth 2.0 authentication, allowing developers to easily configure settings, obtain access tokens, and manage token lifecycle. In this post, we will quickly go through this process by utilizing the Postman software.

Read more »

Cover image created through Copilot

In my previous How2 column Connecting My Trading Strategies To Interactive Brokers, I shared how to set up the Interactive Brokers API connection through the Trader Workstation (TWS) on the local machine. However, the enforced rules like daily auto restart and weekly log-out can be a hassle if you are away from your local machine for many days. In this article, we’ll leverage the power of docker to free you from managing your locally-run TWS attentively.

Read more »

Cover image created through Copilot

As is known to all, diversification is the key to managing the risk of your investment. However, it’ll take a lot of effort and time to hand-pick quality assets that have little correlation with each other. In the Hybrid Asset Allocation trading strategy, Wouter J. Keller and Jan Willem Keuning actually brought up an easier way to introduce diversification into the trading strategy. In this article, we’re going to first talk about HAA strategy and see how it boosts the diversification of our portfolio. Then, we’re also going to backtest the HAA (Hybrid Asset Allocation) trading strategy and several of its variations against the benchmark.

Read more »

Cover image created by Copilot

The best ideas are often inspired by or adapted from the work of others. Likewise, profitable quantitative trading strategies are not necessarily original, but they can be generated by adding personal insights regarding the market or strategy itself. In this post, I’m going to introduce the process that I usually do when discovering a prospering trading strategy.

Read more »

Photo by Priscilla Du Preez on Unsplash

Backtrader is a well-known Python open-source library to backtest your quantitative trading strategy. Most of its components can support trading against one single trading target. To step up the game to trade against multiple stocks, there are a few things that need to be fine-tuned to make sure the trading strategy would trade as you expected. In this post, I’m going to share my experience and crucial tips with you as a starting point to build your own.

Read more »