09. 06 Components to Build a Complete Trading Algorithm

Published at 1650470201.428

In addition to two main components of position entry points and take-profit points, a trading algorithm also decides stop-loss points, target markets, position sizing, and trading tactics. 

1. Position Entry Point

The entry point is the minimum requirement of any trading algorithm. Note that having an entry point does not mean the order is successfully executed. In many trading strategies, the fill rate can be under 10% in real trading.

2. Take-Profit Point

After the entry point, the timing or condition to take profits and rebalance portfolios is the next required condition for all algorithms. In certain special cases, the algorithm can take profits according to the time function, not the profit function. The profit would be more random in these cases.

3. Stop-Loss Point

Most algorithmic trading strategies should have stop-loss points while a few do not require them. In reality, it’s likely hard to accept losses as a prevailing sentiment is “not cutting losses is not losing”. However, with this mindset, investors can fall into the trap of winning lots of small pots but ultimately losing money in the entire process. This phenomenon is common in the mean-reversion and scalping strategies.

4. Target Market – Which Stocks to Buy/Sell 

Experienced traders mostly trade in their familiar sectors. Every security has its own characteristics, formed by the impact of stakeholders. Since it attracts different groups of investors, funds, and traders, we never assume different securities work in similar ways. Any algorithmic trading strategy can follow this philosophy instead of a one-size-fits-all approach.

5. Position Sizing – How Much to Buy/Sell

In Vietnam, 95% of algorithm execution does not consider position sizing but buys or sells the entire account as soon as a position is opened. This may be due to small account size, or technical limitations of third-party software that do not allow position sizing to be adjusted. However, to allow multi-algorithm trading on the same account, it’s necessary to take position sizing into account. Otherwise, buying or selling the entire account likely leads to systematic collapse within 03 years.

6. Trading Tactics – How to Buy/Sell

It’s an enhanced version of using market orders in all situations to limit slippage costs. They greatly affect system-wide performance, especially for large accounts. Instead of using market orders, algorithms such as VWAP, TWAP, or POV can be used. In our system, ALGOTRADE uses an enhanced POV algorithm that allows high-frequency trading when there is a price advantage.