Files
system-design-101/data/guides/what-is-a-stop-loss-order-and-how-does-it-work.md
Kamran Ahmed ee4b7305a2 Adds ByteByteGo guides and links (#106)
This PR adds all the guides from [Visual
Guides](https://bytebytego.com/guides/) section on bytebytego to the
repository with proper links.

- [x] Markdown files for guides and categories are placed inside
`data/guides` and `data/categories`
- [x] Guide links in readme are auto-generated using
`scripts/readme.ts`. Everytime you run the script `npm run
update-readme`, it reads the categories and guides from the above
mentioned folders, generate production links for guides and categories
and populate the table of content in the readme. This ensures that any
future guides and categories will automatically get added to the readme.
- [x] Sorting inside the readme matches the actual category and guides
sorting on production
2025-03-31 22:16:44 -07:00

1.9 KiB
Raw Permalink Blame History

title, description, image, createdAt, draft, categories, tags
title description image createdAt draft categories tags
What is a Stop-Loss Order and How Does it Work? Learn about stop-loss orders and how they help minimize investment losses. https://assets.bytebytego.com/diagrams/0345-stop-loss.jpg 2024-02-26 false
payment-and-fintech
Trading
Risk Management

A stop-loss order allows us to set a price called the stop-loss price of a stock or a share. This is a value the investor chooses, at which they will sell it to minimize their loss on the investment.

When the price of the stock hits the stop-loss point, the stop-loss order is triggered and it turns into a market order to sell at the current market price.

For example, let's say an investor has 100 shares in ABC Inc., and the current price is $40 per share. The investor wants to sell the stock if the market price falls to or below $36, in order to limit their loss.

The diagram above illustrates how a stop-loss order is executed by a trading system.

Stop-Loss Order Execution

  • The investor submits a stop-loss order to the trading system with 100 shares, to sell for $36.

  • Upon receiving the order request, the trading engine creates the stop-loss order.

  • The trading engine subscribes to the market data of ABC Inc. from the exchange and monitors its real-time market price.

  • If the trading engine detects that the market price of ABC Inc. falls to, say, $35, it immediately creates a market order and then submits it to the exchange to sell the 100 shares for the current best market price.

  • The order is filled (i.e. matched to the best buy orders in the market,) usually instantaneously. Then the trading engine receives from the exchange a fill report stating the shares have been sold for, say, $35.5 per share.

  • The trading system notifies the investor that the 100 shares have been sold for $35.5 per share.