Back to Glossary

Entry · Trading

Algorithm

An algorithm is a finite set of precise instructions that solves a problem or completes a task step by step. In finance, the term describes the coded rules that drive pricing, screening, risk control and automated trading.

From the Money Master HQ dictionary, founded by Shihan Sheriff (FCMA, VP of Finance at Nomod, CFO at Esanjo Ventures). How these definitions are written.

What it means

Strip away the mystique and an algorithm is a recipe: defined inputs, unambiguous steps and a predictable output. The word descends from a ninth-century mathematician whose name latinised into algorithmus, and the core idea of a procedure that always works predates computers by a millennium.

Finance adopted the word because so much of its work, including pricing, matching, screening and allocating, can be written as rules a machine executes. A real algorithm must be fully specified and guaranteed to finish, which forces clarity, since vague instructions that humans quietly paper over stop a machine cold.

In markets the archetype is the execution algorithm, which slices a large order and times the pieces against volume, price or benchmark targets, doing mechanically what a floor trader once did by feel. Screens and index methodologies are algorithms too, since a value screen that ranks thousands of companies by earnings yield and debt ratios follows fixed rules, as does the method that decides which shares enter a benchmark and at what weight.

Risk engines run on the same logic, because margin calculations, value-at-risk runs and concentration alarms all execute rules over position data, which is why model risk, the chance those rules are wrong, is now a supervised discipline. The advantages are speed, consistency and scale.

An algorithm applies the same rule the ten-thousandth time as the first, reacts in microseconds and never gets tired, which is why routine market work migrated to machines. The weaknesses are the mirror image: algorithms amplify bad rules as faithfully as good ones, struggle with inputs outside their design range, and can interact unpredictably when many trade against each other at speed.

Flash crashes made the point publicly, as episodes of automated selling feeding more automated selling showed that algorithmic markets need circuit breakers and kill switches. Exchanges and regulators now require such safeguards.

For a manager, the practical stance is trust but audit: document the rules, sample outputs against common sense and rehearse failure modes before anything goes live. Machine learning extends rather than replaces the idea, since a learned model still executes a fixed procedure at prediction time.

The difference is that the procedure was shaped by data, which moves the audit question from reading the rules to interrogating the training.

In practice

Real-world examples.

1

Example

An execution algorithm receives an order to buy 2 million shares and works it over the trading day. It targets roughly 10% of each interval's traded volume so that its own buying does not push the price away from the trader. The desk tracks slippage against the day's average price, and the order finishes only when all 2 million shares have been bought.

2

Example

A quant fund's screening algorithm re-ranks 6,000 global stocks every night on quality and valuation scores. It passes the top fifty names to portfolio managers each morning, who apply their own judgement before anything is bought. Because the rules are fixed, the same inputs always produce the same shortlist, which makes the process easy to audit.

3

Example

A bank's margin algorithm recalculates collateral requirements every fifteen minutes as prices move. When a counterparty breaches its threshold, the system issues a margin call automatically, without waiting for a person to review the position. Operations staff then check each morning's log to confirm that every call was issued and settled correctly.

Case study

Seen in the real world.

A made-up asset manager discovers its rebalancing algorithm has been rounding small trades to zero for months. This case study is fictional and illustrative. A code review finds the rounding rule, backtesting quantifies the drift it caused, and the firm adds daily output sampling so silent rule errors surface within a day. The fictional firm, Ravenscroft Capital, learns the lesson the hard way.

A rule that looked harmless in testing had been silently skipping trades in its smaller holdings since a data format change, and the risk committee reviewed only portfolio-level outputs, which looked normal because the skipped trades were tiny. After the fix, the firm adds three controls: a daily reconciliation of intended against executed trades, a kill switch that halts rebalancing when outputs fall outside tolerance, and a rehearsed manual fallback. The corrective trades are spread over the following month, and the committee now treats the algorithm as a control to be audited rather than a black box to be trusted.

Watch out

Common mistakes.

  • Treating algorithm outputs as authoritative by default; the machine executes rules faithfully, including their flaws, so outputs need sampling against reality, especially after data or code changes.
  • Deploying without failure modes; algorithms behave unpredictably outside their design range, and kill switches, limits and rehearsed manual fallbacks are part of the build, not extras.
  • Confusing automation with understanding; an algorithm can execute a strategy nobody can explain, and that gap becomes a crisis when the strategy breaks in unfamiliar market conditions.

Questions

People also ask.

What is an algorithm?

A finite set of precise, unambiguous instructions that transforms defined inputs into an output and is guaranteed to finish. In finance, algorithms power pricing, screening, risk systems and automated trading.

How are algorithms used in finance?

Execution algorithms slice and time large orders, screens rank securities, index methodologies select constituents, and risk engines compute margins and exposures. Anywhere a rule can be fully specified, a machine can run it.

What are the risks of algorithmic systems?

They amplify flawed rules at speed, misbehave outside their design range, and can interact unpredictably with other algorithms. Flash crashes showed why circuit breakers, testing and kill switches are mandatory safeguards.

Was this explanation helpful?

From the founder's library

Accounting Fundamentals: A Non-Finance Manager's Guide to Finance and Accounting, by Shihan Sheriff

Take it further with the book.

Build your financial confidence beyond this definition. Shihan's full-length guide, Accounting Fundamentals, takes the same plain-English approach and turns it into a complete, practical playbook for non-finance managers, business owners and students - with chapter-end quiz answers and presentation slides included.

US$2.24US$2.99

25% off with code MMHQ25, applied at checkout. Priced in USD - checkout may show the equivalent in your local currency.

View the book and save 25%
Last updated · October 8, 2026
Browse all terms →

Disclaimer

The information provided in this finance dictionary is for educational and informational purposes only. It should not be construed as financial, investment, legal, or tax advice. Always consult with a qualified professional before making any financial decisions. Money Master HQ makes no representations or warranties about the accuracy, completeness, or suitability of this information. Use of this content is at your own risk.