Algorithm

DEFINITION of 'Algorithm'

An algorithm is set of rules for accomplishing a task in a certain number of steps. One common example is a recipe, which is an algorithm for preparing a meal. Algorithms are essential for computers to process information. As such, they have become central to the daily lives of humans, whether someone orders a book online, makes an airline reservation or uses a search engine.

Financial companies use algorithms in areas such as loan pricing, stock trading and asset-liability management. For example, algorithmic trading, known as "algo," is used for deciding the timing, pricing and quantity of stock orders.

BREAKING DOWN 'Algorithm'

Algo trading, also known as automated trading or black-box trading, uses a computer program to buy or sell securities at a pace not possible for humans. Since prices of stocks, bonds and commodities appear in various formats online and in trading data, the process by which an algorithm digests scores of financial data becomes easy. The user of the program simply sets the parameters and gets a desired output when securities meet the trader's criteria.

Types of Algos

Several types of trading algorithms help investors decide whether to buy or sell. A mean reversion algorithm examines short-term prices over the long-term average price, and if a stock goes much higher than the average, a trader may sell it for a quick profit. Seasonality refers to the practice of traders buying and selling securities based on the time of year when markets typically rise or fall. A sentiment analysis algorithm gauges news about a stock price that could lead to higher volume for a particular trading period.

Example

Following is an example of a simple algorithm for trading. A trader instructs his automated account to sell 100 shares of a stock if the 50-day moving average goes below the 200-day moving average. Contrarily, the trader could tell his program to buy 100 shares if the 50-day moving average of a stock rises above the 200-day moving average. Sophisticated algorithms can take into account hundreds of criteria before buying or selling securities. The reason for this is that computers are highly efficient machines for performing complex calculations very quickly.

In Computer Science

A programmer must employ five basic parts of an algorithm to create a successful program. The person must describe the problem in mathematical terms before setting up the formulas and processes that creates a result. Next, the programmer inputs the parameters that give the outcome, and then he executes the program over and over again to test it. The conclusion of the algorithm is the result given after the set of parameters goes through the set of instructions in the program.

For financial algorithms, the more complex the program, the more data the software can use to make accurate assessments to buy or sell securities. Also, programmers must test complex algorithms more thoroughly than simple ones, to ensure the right quality control.

RELATED TERMS
  1. Algorithmic Trading

    A trading system that utilizes very advanced mathematical models ...
  2. Luhn Algorithm

    An algorithm used to validate a credit card number.
  3. Business Logic

    Custom rules or algorithms that handle the exchange of information ...
  4. Manual Trader

    A trader who manually enters trades into a trading system without ...
  5. High-Frequency Trading - HFT

    A program trading platform that uses powerful computers to transact ...
  6. False Signal

    In technical analysis, a false signal refers to an indication ...
Related Articles
  1. Trading

    How Trading Algorithms Are Created

    The steps quantitative traders, and traders using algorithms, follow in order to create their algorithms.
  2. Trading

    Basics Of Algorithmic Trading

    Algorithmic trading is the process of using computers for placing trades in order to generate profits at a speed and frequency that are beyond a person’s capability.
  3. Trading

    Basics of Algorithmic Trading: Concepts and Examples

    Algorithmic trading makes use of computers to trade on a set of predetermined instructions to generate profits more efficiently than human traders.
  4. Trading

    Picking The Right Algorithmic Trading Software

    Willing to enter the tech-savvy world of algorithmic trading? Here are some tips to picking the right software.
  5. Trading

    Strategies For Forex Algorithmic Trading

    Algorithmic trading strategies, such as auto hedging, statistical analysis, algorithmic execution, direct market access and high frequency trading, can expose price inconsistencies, which pose ...
  6. Managing Wealth

    Four Big Risks of Algorithmic High-Frequency Trading

    Algorithmic HFT has a number of risks, and it also can amplify systemic risk because of its propensity to intensify market volatility.
  7. Trading

    Using Genetic Algorithms To Forecast Financial Markets

    Genetic algorithms are unique ways to solve complex problems by harnessing the power of nature.
  8. Trading

    How to Code Your Own Algo Trading Robot

    Ever wanted to become an algorithmic trader with the ability to code your own trading robot?
  9. Trading

    What are Genetic Algorithms?

    Genetic algorithms are problem-solving methods that mimic natural evolution processes.
  10. Managing Wealth

    Quantitative Analyst: Job Description & Average Salary

    Learn the different job duties of a quantitative analyst and how much money an analyst makes; understand the skills needed to be successful at this career.
RELATED FAQS
  1. How do quant traders build the relative strength index (RSI) into their algorithms?

    Learn how quantitative traders build the relative strength index (RSI) into their algorithms. Explore how automated trading ... Read Answer >>
  2. How legitimate are companies that advertise debt consolidation for all my credit ...

    Learn about how fundamental analysis ratios can be combined with quantitative stock screening methods and how technical indicators ... Read Answer >>
  3. What is high-frequency trading?

    High frequency trading is an automated trading platform used by large investment banks, hedge funds and institutional investors ... Read Answer >>
  4. What are the most common periods used in creating Moving Average (MA) lines?

    Learn the most commonly selected periods used by traders and market analysts in creating moving averages to overlay as technical ... Read Answer >>
  5. How can I use simple moving averages to signal when to buy or sell stocks?

    Learn about simple moving averages, simple moving average strategies and how to use these strategies to signal buy and sell ... Read Answer >>
  6. What is the difference between a stop and a market order?

    Learn about market orders and stop orders, how they are used and executed, and the main difference between stop orders and ... Read Answer >>
Hot Definitions
  1. European Union - EU

    A group of European countries that participates in the world economy as one economic unit and operates under one official ...
  2. Sell-Off

    The rapid selling of securities, such as stocks, bonds and commodities. The increase in supply leads to a decline in the ...
  3. Brazil, Russia, India And China - BRIC

    An acronym for the economies of Brazil, Russia, India and China combined. It has been speculated that by 2050 these four ...
  4. Brexit

    The Brexit, an abbreviation of "British exit" that mirrors the term Grexit, refers to the possibility of Britain's withdrawal ...
  5. Underweight

    1. A situation where a portfolio does not hold a sufficient amount of a particular security when compared to the security's ...
  6. Russell 3000 Index

    A market capitalization weighted equity index maintained by the Russell Investment Group that seeks to be a benchmark of ...
Trading Center