What is Algorithmic Trading? Definition, Formula, and Example
Algorithmic trading is the use of computer programs to execute buy and sell orders based on predefined rules without manual intervention.
Plain-English definition
Algorithmic trading is the use of computer programs to execute buy and sell orders based on predefined rules without manual intervention. A trader or firm codes specific conditions, such as price levels, volume thresholds, or timing instructions, and the system monitors the market and submits orders automatically when those conditions are met. This removes human emotion and manual reaction time from execution, allowing orders to be placed faster and more consistently than a person could manage by hand.
How it is calculated or identified
Algorithmic trading is not calculated with a single formula. It is identified by the presence of rule-based logic that converts market data into order instructions. A basic entry rule can be written as:
if price crosses above moving average then buy quantity Q
More complex strategies use multiple signals combined with logical operators. For example:
if (price > moving average) AND (volume > average volume) then buy Q shares
Execution algorithms may also slice a large order into smaller child orders to reduce market impact. A common participation rule is:
child order size = participation rate × market volume in interval
If a fund wants to participate in no more than 10 percent of the volume in each one-minute interval, and the stock trades 500,000 shares in that minute, the algorithm submits up to 50,000 shares. Order quotes are per share, and standard equity order quantities are expressed in whole shares; options contracts represent 100 shares of the underlying, so an option premium of $2.50 costs $250 per contract before fees.
Worked example
Suppose a trader creates a simple algorithm for stock XYZ, currently trading at $100.00 per share. The rule states: buy 1,000 shares if the price rises to $101.00, and sell all 1,000 shares if the price later reaches $103.00.
The algorithm monitors the market. When XYZ prints at $101.00, the system automatically sends a buy order for 1,000 shares. The total cost is 1,000 × $101.00 = $101,000, excluding commissions and fees.
Later in the session, XYZ reaches $103.00. The algorithm automatically sends a sell order for 1,000 shares. The total proceeds are 1,000 × $103.00 = $103,000. The gross profit before fees is $103,000 minus $101,000, or $2,000.
If the price never reaches $101.00, the algorithm places no order. If the price reaches $101.00 but never reaches $103.00, the position remains open until a separate exit rule, time limit, or manual intervention closes it.
When traders use it
Traders use algorithmic trading for execution, systematic strategies, and risk management. Common applications include rebalancing portfolios at set intervals, executing large institutional orders without moving the price too sharply, and responding to market events faster than manual trading allows. Retail traders may use algorithms for disciplined entries and exits, while quantitative firms use them for statistical patterns and market making.
Algorithmic trading requires reliable market data, order routing infrastructure, and testing before live capital is at risk. Traders who want to observe real-time market conditions that might inform automated rules can use the live scanner.
Limitations and common misconceptions
Algorithmic trading is not inherently profitable. A poorly designed rule can lose money faster than a human trader because the computer executes mistakes at machine speed. Algorithms also depend on data quality and connectivity; a feed outage or logic error can cause unintended orders.
Another misconception is that algorithmic trading guarantees price improvement. Automated orders still compete with other market participants and may not fill at the desired price, especially in fast-moving or illiquid stocks. Past performance of a strategy does not ensure future results, and market conditions can change in ways that make a previously profitable rule unprofitable.
Regulators including the SEC and exchanges maintain rules around market access, order testing, and manipulative practices such as layering or spoofing. Traders are responsible for ensuring their automated systems comply with applicable regulations.