ALGORITHMIC TRADING
Tags: algorithms, datascience, bigdata
Published: 2021-04-27 16:27:41

## What is Algorithmic Trading?

Algorithmic trading is a process for executing orders utilizing automated and pre-programmed trading instructions to account for variables such as price, timing and volume. An algorithm is a set of directions for solving a problem.

Algorithmic trading makes use of complex formulas, combined with mathematical models and human oversight, to make decisions to buy or sell financial securities on an exchange. Algorithmic trading can be used in a wide variety of situations including order execution, arbitrage, and trend trading strategies. The trade, in theory, can generate profits at a speed and frequency that is impossible for a human trader.

## 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. 

## API (Application Programming Interface) for Traders:  

* An application programming interface (API) establishes an online connection between a data provider and an end-user.
* For financial markets APIs interface trading algorithms or models and an exchange's and/or broker's platform.
* An API is essential to implementing an automated trading strategy.
* More brokers are making their platforms available through an API.

## 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 back tested 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.  

## Technical Requirements for Algorithmic Trading  

Implementing the algorithm using a computer program is the final component of algorithmic trading, accompanied by back testing (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 back test the system once it is built before it goes live on real markets.
* Available historical data for back testing depending on the complexity of rules implemented in the algorithm.