Algorithmic Trading Signals Tutorial

Algorithmic trading or Algo trading or Black box trading refers to the process of trading the global financial markets using computer algorithms

What is Algorithmic Trading?: Algorithmic trading or Algo trading or Black box trading refers to the process of trading the global financial markets using computer algorithms which follow a defined set of rules and instructions for analyzing demand/supply and placing trades without any human intervention.


Quantitative Analysis

Quantitative analysis uses a wide variety of data in order to build trading models and trading strategies capable of generating trading signals. The forecasting models include several fundamental and statistical data (mean reversion, etc.). Before these models can be used for building strategies, they must be highly back-tested with historical data.

The Algorithmic Approach

Algorithmic trading includes several sets of instructions containing parameters such as time, price, and quantity. Actually, algorithmic trading uses common techniques of classic financial mathematics (asset pricing theory, etc.).

Basic assumptions of Algorithmic Trading

These are some fundamental assumptions of quantitative finance:

(i) Historic results have at least some predictive ability [Sharpe 1994]

(ii) Financial Markets are not perfectly efficient in the short-term

(iii) Financial Markets have a finite depth

(iv) Regularities in financial data do exist, but only for short periods of time, a window of opportunity may open, and then at some future time it will close

(v) The financial data (price and quantity) are driven by human psychology and societal decisions, and therefore are random and unstable


Components of an Algorithmic Signaling Machine

An algorithmic system incorporates two basic components:

  1. The Forecasting Module

The forecasting module analyzes the dynamics of the market, and especially what concerns potential changes in the dynamics of demand/supply

  1. The Action Module

The action module suggests and/or executes a specific trading action at a specific price and time (opens, modifies, and closes a series of trading orders)

Common modules for creating forecasting indicators:

  1. Intermarket Correlations (correlations between different markets)
  2. Volume Clustering (important changes in trading volumes can predict upcoming price movements)
  3. Imbalances of Demand/Supply (changes in the volume of orders on one side may forecast upcoming price movements)
  4. Asset Pricing Inefficiencies (comparing asset pricing to linked variables -such is the sectoral indexes for shares)
  5. News Effect (the market’s reaction to news may create a predictable pattern)

Tools for Creating and Evaluating Algorithmic Trading Signals

  • Pattern Recognition (machine learning)
  • Order/Volume Breakout Analysis
  • Time Series Analysis
  • Intermarket Correlations Analysis
  • Market Sentiment Measures (data mining metrics of positivity/negativity of the language used in particular entities or events)
  • Historical Back-Testing
  • Monte-Carlo Simulation (using random sampling to solve deterministic problems)
  • Hamilton–Jacobi–Bellman (HJB) Equation (central to optimal control theory)
  • Queuing theory (mathematical study based on predicting the time and length of waiting lines or queues)
  • Sharpe/Sortino Ratios (differentiate harmful volatility from overall volatility by using the downside deviation or else the asset's standard deviation of negative asset returns)



Algorithmic Strategies

There are tens of different algorithmic trading strategies. You can even combine two or more strategies to build a multi-trading system.

(1) Trend-Following Algorithmic Strategies

This is the most popular algorithmic trading strategy. It includes following strong price trends using:

(i) Historical Support & Resistance

(ii) Price channel breakouts

(iii) Technical analysis indicators

(iv) Moving Averages (for example 50-day and 200-day moving average)

A trend-following algorithmic strategy may use historical data to evaluate any new trend.

(2) Mean-Reversion Algorithmic Strategies

The Mean-Reversion strategy assumes that the price of a financial asset will revert to its mean price of 80% of all times. In other words, 80% of all times the markets are ranging. That means extreme highs and lows create good opportunities to sell or buy the market and wait for the price to return to its mean. The strategy uses:

(i) Historical data to generate an average asset price

(ii) Calculation of the current price range (breaking this range will trigger a long/short trade)

(3) News-Based Algorithmic Strategies

Algorithmic trading can prove very useful when trading the news. A news-based algorithmic strategy generates and executes trading signals based on the difference between actual data and market consensus.

(4) Market Sentiment Algorithmic Strategies

A Market-sentiment algorithmic system may use a wide variety of data sources:

(i) COT report (CBOE)

(ii) Put/Call Ratio

(iii) Social Media Measures (data-mining)

(iv) Online Trading Sentiment Mesures

There are many more algorithmic trading strategies such as arbitrage strategies, statistical arbitrage strategies, Volume Weighted Average Price (VWAP) strategies, Time Weighted Average Price (TWAP) strategies, Mathematical Model-Based Strategies, and many more.


StrategyQuant for Algorithmic TradersStrategyQuant Algorithmic Platform -Find and Build Complex Algorithmic Strategies

StrategyQuant is a state-of-the-art platform for building and testing automated trading strategies. Any trader can use the StrategyQuant without the need for programming skills. What makes the platform unique is its ability to evaluate hundreds of strategies at the same time by fully randomizing the market conditions.

StrategyQuant Main Features

The platform can generate algorithmic strategies for trading Fx currencies, Stocks, Indices, ETFs, etc.

StrategyQuant offer two options:

(a) Build your automated strategy from scratch

(b) Find and modify a ready-to-use automated trading strategy

The finalized strategy can be exported and used for various platforms including MetaTrader-4:

(1) MetaTrader-4 | (2) NinjaTrader| (3) TradeStation

► StrategyQuant Platform's Website | ► Full Review on ExpertSignal


Programming Language for Building Algorithmic Trading Systems

These are the most commonly used programming languages for building algorithmic strategies:

  1. Microsoft Visual C++/C# (Ideal for Maximum Trading Speed)

C++ is commonly used in High-Frequency Trading (HFT). It includes advantages such as speed, advanced code debugging, high volumes of data management, code completion (IntelliSense), and easy project overview.

  1. Python (Open Source -Ideal for Back-testing and Researching)

Python is a high-level language commonly used in Algorithmic trading. It includes advantages such as high-performing libraries, advanced back-testing capabilities, and a very easy to use interface.

  1. MatLab (Mathematical Language)

Matlab is designed to deal with extensive algebra operations, but it is also used for researching historical financial data.

  1. R Language (Free Statistical Language)

R is a statistical programming language that can create trade signaling machines.

  1. Java (Free Programming Language)

Java is a programming language used for low latency data operations, modeling, and trade simulations.

  1. MQL (Free Coding Language for MetaTrader Platforms)

MQL is a free coding language, built-in on every MetaTrader platform. It is extremely easy to use and offers a user-friendly editor/compiler. On the other hand, it has limitations.


Creating a Simple Algorithmic Trade System on MetaTrader-4

MetaTrader 4 (MT4) is the Forex industry’s standard electronic trading platformMetaTrader 4 (MT4) is the Forex industry’s standard electronic trading platform. The platform is free and includes the MQL-4 language for programming indicators and Expert Advisors (EAs). Depending on your Forex broker, MT4 trades a wide variety of financial classes including bonds, equities, commodities, and cryptocurrencies.

Creating Automated Systems using EA Builder Software

For those who are lacking programming skills, online apps such as the EA Builder can provide a user-friendly interface for transforming ideas into fully automated systems.

EA Builder Features (for MT4, MT5, or TradeStation)

-Free for creating indicators, $97 one-off for creating automated systems

-Full set of built-in functions (including even trendlines and time)

-Including full Money-Management system modules

-The outcome is a single compiled MQL4/MQL5 file, ready to trade

» EA Builder for MT4 and MT5


□ G. Protonotarios, financial analyst

for (c)

(February 2018)




(1) Algorithmic Trading Quantitative Research

Michael G. Sotiropoulos

Bank of America Merrill Lynch, Princeton Quant Trading Conference, 31-Mar-2012

(2) Automated Finance: The Assumptions and Behavioral Aspects of Algorithmic Trading

Andrew Kumiega Illinois Institute of Technology, Ben Van Vliet Illinois Institute of Technology

(3) Recorded Future Blog

White Paper - News Analytics for Quantitative Trading Strategies

(4) Wikipedia –The Free Encyclopedia

(5) MetaQuotes MetaTrader4