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. Matching Orders

    The process for executing securities trades by pairing buy orders ...
  4. Business Logic

    Custom rules or algorithms that handle the exchange of information ...
  5. SPAN Margin

    Short for standardized portfolio analysis of risk (SPAN). This ...
  6. Price Change

    The difference in the cost of an asset or security from one period ...
Related Articles
  1. Forex Education

    The Basics Of Forex Algorithmic Trading

    Much of the growth in algorithmic trading in Forex markets over the past years has been due to algorithms automating certain processes and reducing the hours needed to conduct foreign exchange ...
  2. Trading Strategies

    How Trading Algorithms Are Created

    The steps quantitative traders, and traders using algorithms, follow in order to create their algorithms.
  3. Technical Indicators

    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.
  4. Trading Strategies

    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.
  5. Trading Strategies

    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.
  6. Forex Strategies

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

    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.
  8. Trading Systems & Software

    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 Strategies

    Using Genetic Algorithms To Forecast Financial Markets

    Genetic algorithms are unique ways to solve complex problems by harnessing the power of nature.
  10. Investing News

    The Financial Singularity Will Destroy Your Return

    Given the current and future growth of financial technology, many believe algorithms will soon define what drives market outcomes. With a wealth of big data, algorithms would be able to create ...
RELATED FAQS
  1. 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 >>
  2. 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 >>
  3. Why are most airplane tickets nonrefundable?

    Discover why most airline tickets are nonrefundable. Learn how this practice is a big revenue generator for major airlines. Read Answer >>
  4. What are the risks of investing in smaller regional airlines versus national or international ...

    Discover the risks involved in investing in regional airlines, including those caused by smaller balance sheets and more ... Read Answer >>
  5. How does investing in the airline industry differ for privately versus government ...

    Explore the investment opportunities presented by public and private airlines. Learn more about some of the risks and benefits ... Read Answer >>
  6. How does lower borrowing costs affect new airlines in the aerospace industry?

    Explore how lower borrowing costs can help new airlines afford to purchase or lease aircraft and pay for salaries, fuel and ... Read Answer >>
Hot Definitions
  1. Yield Curve

    A line that plots the interest rates, at a set point in time, of bonds having equal credit quality, but differing maturity ...
  2. Stop-Limit Order

    An order placed with a broker that combines the features of stop order with those of a limit order. A stop-limit order will ...
  3. Keynesian Economics

    An economic theory of total spending in the economy and its effects on output and inflation. Keynesian economics was developed ...
  4. Society for Worldwide Interbank Financial Telecommunications ...

    A member-owned cooperative that provides safe and secure financial transactions for its members. Established in 1973, the ...
  5. Generally Accepted Accounting Principles - GAAP

    The common set of accounting principles, standards and procedures that companies use to compile their financial statements. ...
  6. DuPont Analysis

    A method of performance measurement that was started by the DuPont Corporation in the 1920s. With this method, assets are ...
Trading Center