• What is an Algorithm?
  • What is Algorithmic Trading?
  • Types of Algorithmic Strategies
  • Advantages and Disadvantages

 

What is an Algorithm?

  • An algorithm is a detailed series of instructions for carrying out an operation or solving a problem
  • Algorithm was originally born as part of mathematics but is currently associated with computers and computer science
  • In a non-technical approach, we use algorithms in everyday tasks, such as a recipe to bake a cake or a do-it-yourself handbook
  • Similarly, computers use algorithms to list the detailed instructions of how to carry out a certain operation

Elements of an Algorithm?

  • To create an algorithm you need three main things:
  • A problem to solve or task to complete 
  • A series of clear and consecutive steps that allows you to solve this problem or complete this task
  • A method that allows you to measure the performance  and quality of the end result

What is Algorithmic Trading?

  • Algorithmic trading is also known as automated trading, black-box trading or algo-trading
  • It is a method of executing trades with the use of mathematical formulas run by powerful computers
  • It is done using pre-programmed trading instructions that accounts for variables such as time, price, and volume
  • It makes use of complex formulas, mathematical models and human oversight to buy and sell financial securities
  • Algorithmic traders often make use of high-frequency trading technology

Algorithmic Trading Example

  • Suppose a trader follows this simple trading method:
  • Buy 50 shares when the 50-day simple moving average crosses above the 200-day simple moving average
  • Sell 50 shares when the 50-day simple moving average crosses below the 200-day simple moving average
  • It is easy to write a computer program that will monitor the stock price and the moving averages and place the buy and sell orders
  • The trader no longer needs to watch the chart and put in the orders manually

Algorithmic Trading Strategies

  • Any strategy requires an identified opportunity in terms of improved earnings or cost reduction. The most commonly used strategies are:
  • Trend-following Strategies
  • Arbitrage Strategies
  • Index Fund Rebalancing
  • Volume and Time Weighted Average Price (VWAP) & (TWAP)

Trend-following Strategies

  • Trend-following strategies follow price trends using moving averages, channel breakouts, price level movements and other indicators
  • These are the easiest and simplest strategies to implement because they do not rely on predictions or price forecasts
  • Trades are initiated based on the occurrence of desired trending traits which are easy to implement through algorithmic coding
  • The previously mentioned example of the 50-day and 200-day moving averages is a simple yet very popular trend-following strategy

Arbitrage Strategies

  • Buying a dual-listed stock in one market and simultaneously selling it at a higher price in another market offers risk-free profit
  • The same operation can be replicated for stocks vs. futures contracts as price differentials do exist from time to time
  • Implementing an algorithm to identify such price differentials and place the orders allows for efficient profitable opportunities

Index Fund Rebalancing

  • An index fund is a mutual or exchange-traded fund designed to follow  preset rules so that it can track a specified basket of investments
  • Tracking can be achieved by trying to hold all the securities in the index in the same proportions as the index
  • Other methods include statistically sampling the market and holding “representative” securities only
  • Index funds rely on computer models in the decision as to which securities are purchased or sold and thus follow passive management
  • The main advantage of index funds for investors is they don’t require a lot of time to manage
  • Index funds have defined periods of rebalancing to bring their holdings to par with their respective benchmark indices
  • This creates profitable opportunities for algorithmic traders who capitalize on expected trades before the rebalancing process
  • Such trades are initiated via algorithmic trading systems for timely execution and best prices

 

Volume Weighted Average Price (VWAP)

  • VWAP strategy breaks up a large order and releases smaller chunks of the order to the market using stock-specific historical volume profiles
  • The aim is to execute the order close to the Volume Weighted Average Price

Time Weighted Average Price (TWAP)

  • TWAP strategy breaks up a large order and releases smaller chunks of the order using evenly divided time slots between a start and end time
  • The aim is to execute the order close to the average price between the start and end times, thereby minimizing market impact

Algorithmic Trading Requirements

  • Computer-programming knowledge to program the required trading strategy, hired programmers or pre-made trading software
  • Network connectivity and access to trading platforms for placing the orders
  • Access to market data feeds that will be monitored by the algorithm for signal generation
  • The ability and infrastructure to back test the system once it’s built and before it goes live on real market conditions
  • Available historical data for backtesting, depending upon the complexity of rules implemented in the algorithm

Back-Testing

  • Backtesting refers to testing a trading system on historical data to see how it would have performed during that time period
  • Today’s trading platforms have robust backtesting capabilities and traders can test their strategies without risking real money
  • Backtesting can be used to evaluate simple ideas or complex systems with a variety of inputs and triggers
  • A strategy can be coded, and then certain user defined input variables can be integrated that will allow testing for optimization
  • A MA crossover system could include inputs for the period of the averages and then tested to determine the optimal duration

Forward Testing

  • Forward performance testing provides another set of data on which to evaluate the trading strategy
  • It is a simulation of actual trading and involves applying the strategy in a live market – All trades are executed and documented for evaluation purposes
  • Many brokers provide simulated trading accounts where traders can place trades without risking real money
  • If the strategy shows positive results it may be ready to be applied on live market conditions with real money

Algorithmic Trading Advantages

  • Trades being executed at the best possible prices
  • Instant and accurate placement of trade orders
  • Multiple market conditions being simultaneously and automatically checked
  • Reduced risk of emotional and psychological errors as well as errors in order placement
  • The ability of strategy backtesting before live implementation

Algorithmic Trading Disadvantages

  • The technical sufficiency and the resources required
  • The required know-how to program in specific languages
  • The lack of control that comes with automation
  • The need of continuous testing, debugging and optimization

The Story of Desmond Leong

Desmond is your average trader. He started off blowing up 7 (or more.. lost count) accounts amounting to more than 500k, tested over 30 Expert Advisors (EAs) to no success and spent over 10k on stupid useless courses.

Today he runs an award winning trading team and provides market analysis and webinars to some of the largest brokers such as IC Markets, XM, Axi, Tickmill, FXCM, VantageFX, easyMarkets and more.

He now has a simple goal: Creating an army of traders who trade profitably together and keep each other accountable. Guiding them with the most comprehensive no-BS free tutorials so that no one ever needs to go through the pain he went through himself to become a profitable trader.

My Trading Strategy

GET IN TOUCH

TFA GLOBAL Pte Ltd
11 Collyer Quay
The Arcade
#11-05
Singapore 049317

CONTACT US

(t) +65 9336 1245
(e) hq@theforexarmy.com

All rights reserved. All other trademarks appearing on this Website are the property of their respective owners.

© Copyright TFA GLOBAL Pte. Ltd.

RISKS ASSOCIATED WITH FOREX TRADING

Trading in foreign exchange (“Forex”) on margins entails high risk and is not suitable for all investors. Past performance is not an indication of future results. In this case, as well, the high degree of leverage can act both against you and for you. Before you decide to invest in foreign exchange, you should carefully assess your investment objectives, experience, financial possibilities and willingness to take risks. There is a possibility that you will lose your initial investment partially or completely. Therefore, you should not invest any funds that you cannot afford to completely lose in a worst-case scenario. You should also be aware of all the risks associated with foreign exchange trading and contact an independent financial advisor in case of doubt.

Trading Derivatives carries a high level of risk to your capital and you should only trade with money you can afford to lose. Trading Derivatives may not be suitable for all investors, so please ensure that you fully understand the risks involved and seek independent advice if necessary.

Leverage enables traders, using a relatively small amount of money, to take a position that is many times the initial investment. This leverage effect can work both in your favour and to your detriment. The Forex market opens up the possibility to utilize this leverage effect to a high degree; at the same time, however, it also opens up the risk of experiencing high losses. Please trade with caution when you use leverage in trading or investing. Your risk is particularly not limited to the initial investment, but can quickly fall into a negative range in the event of strong movements, meaning you may be obligated to pay far more than your initial wager.