
What is the 3-5-7 rule in trading? A Practical Guide for Quant Trading Strategies
Learn how the 3-5-7 rule in trading helps manage individual trade risk, portfolio exposure, and average wins versus losses. Explore practical calculations and how quant trading strategies can apply these risk controls.
A trading strategy can have a solid win rate and still lose money. A few oversized losses may erase the gains from several profitable trades. The problem becomes more difficult when multiple positions are open at the same time: each trade may appear manageable on its own, but their combined exposure can put much more capital at risk than expected.
This is why risk management in trading needs to go beyond entry signals and win rates. Traders also need to know how much a single position can lose, how much risk is already tied up in open positions, and whether average profits can cover average losses over time.
The 3-5-7 rule offers a simple framework for thinking about these questions. It uses three percentage guidelines to address individual trade risk, total portfolio exposure, and the relationship between average wins and losses.
What does the 3-5-7 rule in trading mean?
TMGM Academy's article, "What is the 3-5-7 rule in forex?", describes the framework through three guidelines:
| Number | General guideline | Risk management purpose |
|---|---|---|
| 3% | Keep risk on a single trade within 3% of account balance | Limit individual trade losses |
| 5% | Keep combined risk across open positions within 5% | Control total portfolio exposure |
| 7% | Aim for average wins to exceed average losses by at least 7% | Maintain a favorable win-loss relationship |
The 3-5-7 rule is not an official exchange requirement or a universal industry standard. The third number can also be interpreted differently by different sources. For the calculations in this article, the 7% guideline is treated as an average win that is at least 1.07 times the average loss:

This is an operational interpretation for calculation purposes, not a separate formula published by TMGM.
How to apply the three risk limits
1.Keep risk per trade within 3%
Start with the amount you are prepared to lose if a trade reaches its stop-loss. For an account with $10,000 in equity, a 3% risk limit gives a planned maximum loss of $300.
Suppose a stock is purchased at $100 and the stop-loss is set at $98. The planned loss is $2 per share, so the position size can be calculated as follows:

The position would have a planned loss of $300 if the stop executes at the specified price. In live markets, however, the actual loss can be higher because of slippage, commissions, gaps, and liquidity conditions.
A basic position-sizing function can be implemented in Python:
def calculate_position_size(
equity,
risk_rate,
entry_price,
stop_price
):
risk_amount = equity * risk_rate
risk_per_share = abs(entry_price - stop_price)
if risk_per_share == 0:
raise ValueError("Stop price cannot equal entry price")
return int(risk_amount / risk_per_share)
shares = calculate_position_size(
equity=10000,
risk_rate=0.03,
entry_price=100,
stop_price=98
)
print(shares) # 150This example covers basic share sizing only. A production trading system should also account for execution costs, minimum order sizes, and market-specific trading constraints.
2.Keep combined open-position risk within 5%
A position can meet the 3% limit while the overall portfolio still carries too much risk. For a $10,000 account, the 5% guideline corresponds to $500 in combined planned risk.
Consider three open positions with planned losses of $200, $150, and $200. Their combined risk is $550, or 5.5% of account equity. Each trade may be within its individual limit, but the portfolio has exceeded the 5% guideline.
Correlation makes this assessment more complicated. For example, long positions in EUR/USD and GBP/USD may both be affected by a sharp move in the US dollar. Holding different instruments does not automatically mean that a portfolio is diversified.
A useful portfolio risk check should therefore consider both stop-loss exposure and the market factors shared by open positions. The 5% figure is a planning guideline, not a guarantee that actual losses cannot exceed that amount.
3.Evaluate average wins against average losses
Under the 1.07 interpretation, an average loss of $300 would require an average win of at least $321:

However, a larger average win does not automatically make a strategy profitable. Consider a strategy with a 45% win rate, an average win of $321, and an average loss of $300.
Its expected result per trade, before transaction costs, is:

Despite having larger average wins than losses, the strategy still has negative expected value. Win rate, average trade outcomes, sample size, and execution costs all matter when evaluating quantitative trading strategies.
How can quant trading strategies implement these rules?
For algorithmic and systematic traders, the three guidelines can become measurable checks within a trading system. Before an order is submitted, the system can calculate position size from account equity and stop distance. While positions are open, it can aggregate planned risk and monitor exposure. After trades close, it can update average wins, average losses, win rate, and realized trading costs.
| Trading stage | What the system should monitor | Related guideline |
|---|---|---|
| Before entry | Account equity, entry price, stop price, position size, estimated costs | 3% |
| While positions are open | Open-position risk, correlated exposure, total portfolio risk | 5% |
| After execution | Average win, average loss, win rate, transaction costs, expectancy | 7% |
One distinction is important: market data and account-risk data are not the same thing. Historical candles, latest quotes, and market depth help a strategy understand market conditions. Account equity, open positions, orders, fills, and transaction costs must still come from the broker or the trading system itself.
Market data for backtesting and live strategy monitoring
A quantitative strategy may need different data at different stages. Historical candles are useful for testing entry and exit conditions, while current quotes and order-book updates can support live monitoring. REST and WebSocket interfaces serve these different requirements.
Historical candles through REST
The AllTick REST V1.0 changelog dated September 24, 2026 lists the single-instrument K-line endpoint:
GET /v1/kline/{queryData}The documented limit is 500 candles per request. Listed intervals include 1-minute, 5-minute, 15-minute, 30-minute, 1-hour, 2-hour, 4-hour, daily, weekly, and monthly candles. The published stock restriction excludes 2-hour and 4-hour candles.
A strategy that requires more than 500 candles needs to retrieve historical data in batches according to the applicable request format. Developers should also make sure that the returned time ranges are joined correctly before using the data in a backtest.
Latest quotes and market depth
For current quote information, AllTick documents the REST endpoint:
GET /v1/quote/{queryData}The V1.0 release information describes fields including trade price, volume, turnover, trade time, and trade direction. This endpoint retrieves latest quote information; it should not be treated as a historical tick-by-tick query service.
For order-book information, the REST endpoint is:
GET /v1/depth/{queryData}It provides Bid and Ask prices and quantities. Depth availability varies by instrument, so developers should check product support before relying on order-book data in a strategy.
Real-time updates through WebSocket
For ongoing trade-price and order-book updates, AllTick provides subscription-based WebSocket interfaces.
| Data type | Subscription message | Server response | Push message |
|---|---|---|---|
| Trade-price updates | 22004 | 22005 | 22998 |
| Order-book updates | 22002 | 22003 | 22999 |
The integration guide specifies a 10-second heartbeat interval and disconnection after 30 seconds without a heartbeat. New subscription requests replace the previous subscription list rather than automatically adding to it.
WebSocket does not support K-line subscriptions, so historical candle data must still be retrieved through HTTP. Developers should also implement reconnection and subscription recovery rather than assuming that the previous subscription state automatically returns after a disconnect.
Before production integration, another detail needs attention. The September 24, 2026 REST V1.0 changelog documents the versioned /v1/kline/{queryData} endpoint and X-API-Key header authentication. The online tutorial also contains an older request example using /kline, token, and URL-encoded query parameters. These are different documented request formats and should not be combined into one request. Always follow the documentation for the API version being integrated.
AllTick's available products, request limits, historical data access, and WebSocket connection allowances also vary by plan. Developers should check instrument coverage and account permissions before designing a system around a particular data type.
If you are building a quantitative trading, market-monitoring, or financial data application, visit AllTick to review its REST and WebSocket market data interfaces and available products.
Where the 3-5-7 rule can fall short
Fixed percentage limits do not suit every strategy or market condition. High-frequency strategies may accumulate significant transaction costs across many trades. Swing strategies can face overnight gaps that push execution beyond the intended stop price, while cryptocurrency strategies must account for price movements outside conventional market hours.
Consecutive losses also matter. If an account loses 3% of its remaining equity on each of five trades, a $10,000 account falls to approximately $8,587:
That represents a drawdown of about 14.1%. Each loss stayed within the 3% guideline, yet the cumulative effect was substantial.
For this reason, risk management should include maximum drawdown, consecutive losses, execution costs, and strategy performance under different market conditions. The percentages should be reviewed rather than treated as permanent settings.
Is the 3-5-7 rule useful for quantitative traders?
The value of the 3-5-7 rule is that it turns three common risk questions into measurable checks: how much one trade can lose, how much risk is already active across the portfolio, and whether average profits can cover average losses.
For discretionary traders, it can be a useful pre-trade checklist. For developers building quant trading strategies, the same ideas can become position-sizing logic, portfolio exposure limits, and performance-monitoring metrics.
The rule does not guarantee profitability. A strategy still needs to be tested against realistic trading costs, execution conditions, and changing market environments. The goal is not to avoid every losing trade, but to make sure that losses remain within a risk framework the strategy and account can reasonably sustain.
AllTick market data is provided for informational purposes only and is not intended for trading or investment purposes.