Friday, 24 July 2020

Algorithmic Trading

Before understanding about the algorithmic trading, let us know about the basic definition of trading. It is nothing but selling and buying of various financial instruments such as stocks, bonds, commodities, derivatives, and mutual funds. In general, trading happens between the seller & the buyer.

Algorithmic trading helps the sellers & buyers to execute the orders using automated pre-programmed trading instructions accounting for variables such as time, price, and volume.

As shown in the table mentioned below, algorithmic trading method is having amazing advantages when compared with the general trading:


Algorithmic TradingGeneral Trading
100% MechanicalEmotional Decision Making
Watches markets all the timesIt's not possible for humans
Ability to back test your strategies (with historical data)Can't back test to the same extent
Consistent ApproachInconsistent approach due to human nature
The trading is as good as your codeThe trading is as good as you (Human)

In this kind of trading, the shares would be sold or purchased by a robot.

Here is the simple example of an algorithm:

Buy IF : ABCs price crosses above it’s 30 day moving average, then the algorithm buys that asset.

Sell IF : ABCs price crosses below it’s 30 day moving average, then the algorithm sells that asset.

However, since it is a simplified algorithm, it’s not recommendable for trading.

To become an algorithmic trader, we need to understand two major fields of algorithmic trading:


  1. Trading & Finance
  2. Programming & Data science



Trading & Finance:-



To understand about the trading & finance section, it's mandatory to get to know about the below mentioned points:


  • How the markets work
  • Supply & demand
  • Asset types (stocks, options, futures, forex…)
  • Buying vs Selling
  • Bid / Ask spreads
  • The importance of liquidity
  • Understand trading on margin
  • Risk management
  • Order types & much more


Trading Terms:

CFD : Contract For Differences 

CFD is a deal between two parties: Buyer & Seller. It is only the price of the instrument that you are trading with.
Trading CFDs is not the same as owning shares. Buying a share means you are counting on the fact that the price will go up.
With CFDs you trade on whether you believe the price will go up or down. That’s called double side trading. 

There are other advantages trading CFDs have over traditional instruments such as shares.

Another advantage the market has is it’s open for 24 hours a day and five days in a week i.e., from Monday to Friday.

Forex has some trading volume of some 5.3 trillion dollars a day. It’s a huge market that a lot of people participate in but despite the size of the market be aware that not all Forex CFD trading companies are regulated or have the same standards. 

A financial Instrument is a tradable asset for traders. In plain English, an instrument is any item you want to trade with. It can be gold, bitcoin or the euro dollar currency pair.

Currency Pair is one currency’s value in relation to one other currency, like the euro (base currency) dollar (quote currency) currency pair.

If you trade on the euro dollar and believe that the value of the euro will go up against the dollar, then you would execute a buy order. If you think it’ll go down, you should execute a sell order.


Bullish & Bearish: A bullish market is a growing one where prices are rising or are expected to rise. A bull is a trader who believes that prices will rise.

A bearish market is the opposite. Prices are trending downwards or are expected to downfall. A bear is a trader who is pessimistic and believes that prices will fall.

Pivot Point is a part of technical analysis and it’s an indicator used to identify the trend of a market or instrument. It’s based on the average of high, low & closing prices from the previous trading day. 

Spread: The buying price & selling price is not exactly the same when trading. This is because of the spread. This is the commission you pay as a currency trader.

Double side trading: This basically means you can trade either way entering into a buying or selling position.


Going long or going short: Going long or a long position is taking a buying position on a stock commodity and currency expecting to go up. To go short is to take a selling position expecting the price to go down.

The key here to avoid any confusion is the first letter in short is s like sell.




Programming & Data Science:-

How to develop trading algorithms?

  • Come up with an idea
  • Translate it to code
  • Backtest it
  • Optimize (never stop doing it)
  • Add safeguards
  • Test, optimize & optimize
  • Paper trade (allows you to test your algorithm on real life data without risking any real money)
  • Start with small amount
  • Scale up if everything goes well
  • Then, continuously optimize & monitor the algorithm

Quantopian is an algorithmic trading platform that allows you to develop your own trading strategies & back testing and it can be done for free.


Algorithmic Trading Strategies


  • Momentum
  • Mean Reversion Strategy
  • Market making
  • Statistical Arbitrage
  • Sentiment based

Momentum:-
  • Momentum investing is a trading strategy in which investors buy securities that are rising and sell them when they look to have peaked.
  • The goal is to work with volatility by finding buying opportunities in short-term uptrends and then sell when the securities start to lose momentum.

 



Mean Reversion:-
  • Mean reversion strategy can be explained as, buy a stock after it has had an unexpected large fall in price.
  • When a stock has seen a big drop, there’s usually a good chance that it will bounce back to a more normal level.





Market Making:-
  • This strategy favors the market makers perform from both the sides i.e., by buying and selling in the markets.
  • This way they not only create the market, but also earn profit by selling at a slightly higher price than the market price.





Statistical Arbitrage:-
  • This is a subset of mean reversion strategy. It is heavily quantitative & computational of equity trading.
  • One of the most statistical arbitrage strategies is, pairs trading where a pair of co-integrated assets is considered.
  • The underperforming asset is expected to rise and is bought, while the outperforming asset is expected to decline in value and is sold.
  • Statistical Arbitrage has become a major force at both hedge funds & investment banks.




Sentiment Based:-

  • A news based algorithmic trading system is usually hooked to newswires automatically generating trade signals.


 


---------------------------------------------------------------------------------------------------------------------

People who would like to start trading, also, who are occupied with other works and unable to concentrate on how their trading business is going, just logon to https://adityatrading.in/  and they'll take care of everything.