Skip to content

A repository containing practice examples of algorithmic trading strategies as well as novel trading ideas.

Notifications You must be signed in to change notification settings

moodoid/AlgorithmicTrading

 
 

Repository files navigation

Algorithmic-Trading

A repository containing practice examples of algorithmic trading strategies as well as novel trading ideas.

Algorithmic Trading is defined as the buiying and selling of financial instruments using predefined rules (algorithms). These algorithms are tested on historical data before used in live trading, i.e. backtested.

The emergence of this new field is mainly due to market liquidity, lower transaction costs, the need to eliminate irrational trading and lower regulations in certain economies.

Focus of Strategies: can be on

  • Speed of transaction (HFT)

  • Fundamental Analysis (DCF)

  • Technical Analysis (Pairs Trading, Momentum)

  • Text Mining (NLP)

Fundamental data used in Quant Trading include:

  • Liquidity

  • ROA, ROE, D/E

  • Cash Flow

  • Market Capitalisation

Algorithmic strategies can be categorised as follows:

1. Momentum strategies:

• Provide good results in rising markets.

• Focus on stocks that have a certain trend on a high volume.

• For momentum strategies, price differences are calculated at fixed time intervals.

2. Mean-reversion strategies:

• Assets are expected to eventually return to their mean levels or equilibrium levels.

• If market price < average value, the asset is considered attractive as it is expected to increase (Buy signal).

• If market price > average value (Sell signal).

3. News-based trading:

• This form of trading relies on algorithms to identify key words from Twitter, Facebook, Bloomberg, blogs and different websites in order to obtain trading signals.

• There is a recent boom in this type of trading due to the development of machine learning algorithms for text analysis and the huge amount of free data on the internet.

• Some companies sell data for market analysis (Sentdex).

4. Statistical arbitrage:

• The algorithms identify arbitrage opportunities (small price discrepancies of the same asset on different markets). Event arbitrage

• Certain events, such as company mergers or takeovers, or even company restructuring, are considered to generate certain asset price/return patterns.

5. Pairs trading:

• It is difficult to find a tradable asset that has mean-reverting behavior.

• Equities behave like Geometric Brownian Motion (GBM) and make the meanreverting trade strategies relatively useless.

• Pairs trading is the simplest form of mean reverting strategy.

• Pairs trading involves trading the stocks from two companies in the same that sector (for example Pepsi and Coca Cola stock; Renault and Peugeot-Citroen group). Stock prices are influenced mainly by the same shocks. Their relative stock prices will diverge due to certain events but will revert to the long-running mean.

6. Pure quant trading and Excel:

There is a recent trend to look down on Excel as it is not considered a pure quantitative tool. Is Excel good for algorithm trading? Well, it depends. If the algorithms require sophisticated calculations and high speed of transaction, then Excel may not be the right tool. Excel can be an excellent tool for basic algorithm trading strategies and lower frequency transactions. It can also be used to check how different basic algorithms perform. It is also good when you want to have access to data instantly.

About

A repository containing practice examples of algorithmic trading strategies as well as novel trading ideas.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.7%
  • R 0.3%