https://www.investopedia.com/articles/active-trading/101014/basics-algorithmic-trading-concepts-and-examples.asp

Algorithmic trading (also called automated trading, black-box trading, or algo-trading) uses a computer program that follows a defined set of instructions (an algorithm) to place a trade. The trade, in theory, can generate profits at a speed and frequency that is impossible for a human trader.

 

The defined sets of instructions are based on timing, price, quantity, or any mathematical model. Apart from profit opportunities for the trader, algo-trading renders markets more liquid and trading more systematic by ruling out the impact of human emotions on trading activities.

 

Algorithmic Trading in Practice

Suppose a trader follows these simple trade criteria:

 
  • Buy 50 shares of a stock when its 50-day moving average goes above the 200-day moving average. (A moving average is an average of past data points that smooths out day-to-day price fluctuations and thereby identifies trends.)  
  • Sell shares of the stock when its 50-day moving average goes below the 200-day moving average.
 

Using these two simple instructions, a computer program will automatically monitor the stock price (and the moving average indicators) and place the buy and sell orders when the defined conditions are met. The trader no longer needs to monitor live prices and graphs or put in the orders manually. The algorithmic trading system does this automatically by correctly identifying the trading opportunity.

 
 
Sorry, the video player failed to load.(Error Code: 101104)

Basics Of Algorithmic Trading

 

Benefits of Algorithmic Trading

Algo-trading provides the following benefits:

 
  • Trades are executed at the best possible prices.
  • Trade order placement is instant and accurate (there is a high chance of execution at the desired levels).
  • Trades are timed correctly and instantly to avoid significant price changes.
  • Reduced transaction costs.
  • Simultaneous automated checks on multiple market conditions.
  • Reduced risk of manual errors when placing trades.
  • Algo-trading can be backtested using available historical and real-time data to see if it is a viable trading strategy.
  • Reduced the possibility of mistakes by human traders based on emotional and psychological factors.
 

Most algo-trading today is high-frequency trading (HFT), which attempts to capitalize on placing a large number of orders at rapid speeds across multiple markets and multiple decision parameters based on preprogrammed instructions.

 

Algo-trading is used in many forms of trading and investment activities including:

 
  • Mid- to long-term investors or buy-side firms—pension funds, mutual funds, insurance companies—use algo-trading to purchase stocks in large quantities when they do not want to influence stock prices with discrete, large-volume investments.
  • Short-term traders and sell-side participants—market makers (such as brokerage houses), speculators, and arbitrageurs—benefit from automated trade execution; in addition, algo-trading aids in creating sufficient liquidity for sellers in the market.
  • Systematic traders—trend followers, hedge funds, or pairs traders (a market-neutral trading strategy that matches a long position with a short position in a pair of highly correlated instruments such as two stocks, exchange-traded funds (ETFs) or currencies)—find it much more efficient to program their trading rules and let the program trade automatically.
 

Algorithmic trading provides a more systematic approach to active trading than methods based on trader intuition or instinct.

 

Algorithmic Trading Strategies

Any strategy for algorithmic trading requires an identified opportunity that is profitable in terms of improved earnings or cost reduction. The following are common trading strategies used in algo-trading:

 

Trend-following Strategies

 

The most common algorithmic trading strategies follow trends in moving averages, channel breakouts, price level movements, and related technical indicators. These are the easiest and simplest strategies to implement through algorithmic trading because these strategies do not involve making any predictions or price forecasts. Trades are initiated based on the occurrence of desirable trends, which are easy and straightforward to implement through algorithms without getting into the complexity of predictive analysis. Using 50- and 200-day moving averages is a popular trend-following strategy.

 

Arbitrage Opportunities

 

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

 

Index Fund Rebalancing

 

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 that offer 20 to 80 basis points profits depending on the number of stocks in the index fund just before index fund rebalancing. Such trades are initiated via algorithmic trading systems for timely execution and the best prices.

 

Mathematical Model-based Strategies

 

Proven mathematical models, like the delta-neutral trading strategy, allow trading on a combination of options and the underlying security. (Delta neutral is a portfolio strategy consisting of multiple positions with offsetting positive and negative deltas—a ratio comparing the change in the price of an asset, usually a marketable security, to the corresponding change in the price of its derivative—so that the overall delta of the assets in question totals zero.)

 

Trading Range (Mean Reversion)

 

Mean reversion strategy is based on the concept that the high and low prices of an asset are a temporary phenomenon that revert to their mean value (average value) periodically. Identifying and defining a price range and implementing an algorithm based on it allows trades to be placed automatically when the price of an asset breaks in and out of its defined range.

 

Volume-weighted Average Price (VWAP)

 

Volume-weighted average price strategy breaks up a large order and releases dynamically determined 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 (VWAP).

 

Time Weighted Average Price (TWAP)

 

Time-weighted average price strategy breaks up a large order and releases dynamically determined smaller chunks of the order to the market 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.

 

Percentage of Volume (POV)

 

Until the trade order is fully filled, this algorithm continues sending partial orders according to the defined participation ratio and according to the volume traded in the markets. The related “steps strategy” sends orders at a user-defined percentage of market volumes and increases or decreases this participation rate when the stock price reaches user-defined levels.

 

Implementation Shortfall

 

The implementation shortfall strategy aims at minimizing the execution cost of an order by trading off the real-time market, thereby saving on the cost of the order and benefiting from the opportunity cost of delayed execution. The strategy will increase the targeted participation rate when the stock price moves favorably and decrease it when the stock price moves adversely.

 

Beyond the Usual Trading Algorithms

 

There are a few special classes of algorithms that attempt to identify “happenings” on the other side. These “sniffing algorithms”—used, for example, by a sell-side market maker—have the built-in intelligence to identify the existence of any algorithms on the buy side of a large order. Such detection through algorithms will help the market maker identify large order opportunities and enable them to benefit by filling the orders at a higher price. This is sometimes identified as high-tech front-running.

 

Technical Requirements for Algorithmic Trading

Implementing the algorithm using a computer program is the final component of algorithmic trading, accompanied by backtesting (trying out the algorithm on historical periods of past stock-market performance to see if using it would have been profitable). The challenge is to transform the identified strategy into an integrated computerized process that has access to a trading account for placing orders. The following are the requirements for algorithmic trading:

 
  • Computer-programming knowledge to program the required trading strategy, hired programmers, or pre-made trading software.
  • Network connectivity and access to trading platforms to place orders.
  • Access to market data feeds that will be monitored by the algorithm for opportunities to place orders.
  • The ability and infrastructure to backtest the system once it is built before it goes live on real markets.
  • Available historical data for backtesting depending on the complexity of rules implemented in the algorithm.
 

An Example of Algorithmic Trading

Royal Dutch Shell (RDS) is listed on the Amsterdam Stock Exchange (AEX) and London Stock Exchange (LSE). We start by building an algorithm to identify arbitrage opportunities. Here are a few interesting observations:

 
  • AEX trades in euros while LSE trades in British pound sterling.
  • Due to the one-hour time difference, AEX opens an hour earlier than LSE followed by both exchanges trading simultaneously for the next few hours and then trading only in LSE during the last hour as AEX closes.
 

Can we explore the possibility of arbitrage trading on the Royal Dutch Shell stock listed on these two markets in two different currencies?

 

Requirements:

 
  • A computer program that can read current market prices.
  • Price feeds from both LSE and AEX.
  • A forex (foreign exchange) rate feed for GBP-EUR.
  • Order-placing capability that can route the order to the correct exchange.
  • Backtesting capability on historical price feeds.
 

The computer program should perform the following:

 
  • Read the incoming price feed of RDS stock from both exchanges.
  • Using the available foreign exchange rates, convert the price of one currency to the other.
  • If there is a large enough price discrepancy (discounting the brokerage costs) leading to a profitable opportunity, then the program should place the buy order on the lower-priced exchange and sell the order on the higher-priced exchange.
  • If the orders are executed as desired, the arbitrage profit will follow.
 

Simple and easy! However, the practice of algorithmic trading is not that simple to maintain and execute. Remember, if one investor can place an algo-generated trade, so can other market participants. Consequently, prices fluctuate in milli- and even microseconds. In the above example, what happens if a buy trade is executed but the sell trade does not because the sell prices change by the time the order hits the market? The trader will be left with an open position making the arbitrage strategy worthless.

 

There are additional risks and challenges such as system failure risks, network connectivity errors, time-lags between trade orders and execution and, most important of all, imperfect algorithms. The more complex an algorithm, the more stringent backtesting is needed before it is put into action.

Basics of Algorithmic Trading: Concepts and Examples的更多相关文章

  1. Algorithmic Trading[z]

    Algorithmic Trading has been a hot topic for equity/derivative trading over a decade. Many ibanks an ...

  2. AI AND THE BOTTOM LINE: 15 EXAMPLES OF ARTIFICIAL INTELLIGENCE IN FINANCE

    https://builtin.com/artificial-intelligence/ai-finance-banking-applications-companies f there's one ...

  3. Electronic Trading[z]

    This article is to discuss the operation model between Fund Managers(Client) and Broker Firms. They ...

  4. (转) [it-ebooks]电子书列表

    [it-ebooks]电子书列表   [2014]: Learning Objective-C by Developing iPhone Games || Leverage Xcode and Obj ...

  5. An Introduction to Stock Market Data Analysis with R (Part 1)

    Around September of 2016 I wrote two articles on using Python for accessing, visualizing, and evalua ...

  6. Zipline Beginner Tutorial

    Zipline Beginner Tutorial Basics Zipline is an open-source algorithmic trading simulator written in ...

  7. Zipline入门教程

    Zipline Beginner Tutorial Basics 基础 Zipline is an open-source algorithmic trading simulator written ...

  8. Machine and Deep Learning with Python

    Machine and Deep Learning with Python Education Tutorials and courses Supervised learning superstiti ...

  9. zipline框架--简介

    Zipline is a Pythonic algorithmic trading library. It is an event-driven system for backtesting. Zip ...

随机推荐

  1. 为什么用时序电路实现CPU

    时序电路 我们带着如下疑问来看时序电路: 1.为什么CPU要用时序电路,时序电路与普通逻辑电路有什么区别. 2.触发器.锁存器以及时钟脉冲对时序电路的作用是什么,它们是如何工作的. 带着这两个问题,我 ...

  2. 使用CMD命令部署.NetCore程序到IIS

    dotnet restore cd src\XXXXX md publish dotnet publish -o publish cd publish set siteFilePath=%cd% se ...

  3. 【BZOJ4556】[TJOI2016&HEOI2016] 字符串(后缀自动机+线段树合并+二分)

    点此看题面 大致题意: 给你一个字符串\(s\),每次问你一个子串\(s[a..b]\)的所有子串和\(s[c..d]\)的最长公共前缀. 二分 首先我们可以发现一个简单性质,即要求最长公共前缀,则我 ...

  4. HTML连载18-id选择器与class区别&class选择器使用思路&后代选择器

    一.id选择器和classable选择器的区别 选择器 CSS中的开头 HTML标签可以绑定几个 是否可重复 用途 id选择器 # 仅能一个 不可以重复(一个标签里仅有一个) 一般情况下是给JS用的, ...

  5. Oracle中TIMESTAMP时间的显示格式

    Oracle中的TIMESTAMP数据类型很多人用的都很少,所以即使最简单的一个查询返回的结果也会搞不清楚到底这个时间是什么时间点. 例如: 27-1月 -08 12.04.35.877000 上午 ...

  6. 五、原子操作(CAS)

    原子操作(CAS) 一.CAS(Compare And Set) ​ Compare And Set(或Compare And Swap),CAS是解决多线程并行情况下使用锁造成性能损耗的一种机制,C ...

  7. redis集群之Sentinel

    目前我们讲的 Redis 还只是主从方案,最终一致性.读者们可思考过,如果主节点凌晨3 点突发宕机怎么办?就坐等运维从床上爬起来,然后手工进行从主切换,再通知所有的程序把地址统统改一遍重新上线么?毫无 ...

  8. element-ui的tabs默认选中页签

    Element-UI提供了tabs组件(选项卡.多页签),其中在tabs的属性中提供了一个value/v-model属性来绑定默认选中的页签. 我们通过简单的示例来看一下具体是怎么使用的. <t ...

  9. ubuntu删除文件和文件夹的rm命令

    在Ubuntu中好多文件或文件夹是不能使用右键删除的,因此知道删除文件或文件夹的rm命令显得尤为重要. rm命令的语法 rm [选项] 文件名或文件夹名 rm命令的一些选项 -f.--force 强力 ...

  10. ML.NET调用Tensorflow模型示例——MNIST

    ML.NET在不久前发行了1.0版本,在考虑这一新轮子的实际用途时,最先想到的是其能否调用已有的模型,特别是最被广泛使用的Tensorflow模型.于是在查找了不少资料后,有了本篇示例.希望可以有抛砖 ...