Trading fee calculator that shows costs in R (units of risk)

Trading fee calculator that shows costs in R (units of risk)

以 R(风险单位)显示成本的交易手续费计算器

Most trading fee calculators show you two numbers: the dollar amount and the percentage of notional. Both are correct. Neither is useful. Here’s the problem. Dollar-denominated fees hide the real cost. 大多数交易手续费计算器只显示两个数字:美元金额和名义价值百分比。这两个数字虽然准确,但都没有实际参考价值。问题在于:以美元计价的手续费掩盖了真实的成本。

Say you’re trading Bitcoin perpetuals on Bybit. Taker fee is 0.055% each side. You buy $10,000 notional. Entry fee: $5.50. Exit fee: $5.50. Round trip: $11.00. Does that matter? Impossible to say without knowing one more number: how much are you risking on this trade? 假设你在 Bybit 上交易比特币永续合约。吃单(Taker)手续费为双边各 0.055%。你买入 10,000 美元的名义价值。入场费:5.50 美元;出场费:5.50 美元;往返总计:11.00 美元。这重要吗?如果不了解另一个关键数字,就无法判断:你在这笔交易中承担了多少风险?

If your stop is $200 away (2% of position), your risk is $200. The $11 fee is 5.5% of your risk. That’s 0.055R — acceptable for most strategies. If your stop is $50 away (0.5%), your risk is $50. The $11 fee is 22% of your risk. That’s 0.22R. On a 1:2 trade, your effective R:R just became roughly 1:1.56. At 100 trades, you’ve given up 22R to the exchange. Same fee, same position size, completely different impact depending on your actual risk. 如果你的止损距离是 200 美元(仓位的 2%),那么你的风险就是 200 美元。11 美元的手续费占你风险的 5.5%,即 0.055R——这对大多数策略来说是可以接受的。如果你的止损距离是 50 美元(0.5%),那么你的风险就是 50 美元。11 美元的手续费占你风险的 22%,即 0.22R。在一笔 1:2 的交易中,你的实际盈亏比(R:R)变成了大约 1:1.56。交易 100 次后,你已经向交易所贡献了 22R。同样的手续费、同样的仓位规模,根据你实际承担的风险,其影响截然不同。

What R multiples expose

R 倍数揭示了什么

The R multiple framework comes from Van Tharp’s work on expectancy. 1R = your defined risk on a trade. A 1:2 trade means you risk 1R to make 2R. When you express fees in R terms: R_fee = round_trip_fee_dollars / risk_per_trade_dollars. R 倍数框架源自 Van Tharp 关于期望值的研究。1R 等于你在单笔交易中定义的风险。1:2 的交易意味着你冒 1R 的风险去赚取 2R。当你用 R 来表示手续费时:R_fee = 往返手续费(美元)/ 单笔交易风险(美元)。

Example:

  • Account: $10,000
  • Risk per trade: 1% = $100 (1R)
  • Position: $5,000 notional
  • Bybit taker both sides: 0.055% x 2 = 0.11% = $5.50
  • R_fee = $5.50 / $100 = 0.055R 示例:
  • 账户资金:10,000 美元
  • 单笔交易风险:1% = 100 美元 (1R)
  • 仓位:5,000 美元名义价值
  • Bybit 双边吃单费率:0.055% x 2 = 0.11% = 5.50 美元
  • R_fee = 5.50 美元 / 100 美元 = 0.055R

Now you can do expectancy math that actually means something: Expected value per trade = (Win% × Avg_Win_R) - (Loss% × Avg_Loss_R) - R_fee. Example with 45% win rate, 1:2.2 R:R, 0.055R fee: EV = (0.45 × 2.2) - (0.55 × 1.0) - 0.055. EV = 0.99 - 0.55 - 0.055. EV = 0.385R per trade. Without the fee term, you’d estimate 0.44R. Over 500 trades, that’s the difference between 220R profit and 192.5R profit — a 12.5% overestimate from ignoring fees. 现在你可以进行真正有意义的期望值计算了:单笔交易期望值 = (胜率 × 平均盈利 R) - (败率 × 平均亏损 R) - R_fee。以 45% 胜率、1:2.2 盈亏比、0.055R 手续费为例:EV = (0.45 × 2.2) - (0.55 × 1.0) - 0.055。EV = 0.99 - 0.55 - 0.055。EV = 每笔交易 0.385R。如果不计入手续费,你会估算为 0.44R。在 500 笔交易中,这意味着 220R 利润与 192.5R 利润的区别——忽视手续费会导致 12.5% 的高估。

Funding rates compound silently

资金费率的隐性复利

For crypto perpetuals, commission isn’t the only cost. Funding rates charge (or pay) you every 8 hours based on your position size. Typical rate on BTC perps is 0.01%/8h when longs pay shorts. If you hold a $10,000 long for 3 days: Funding periods = 3 days × 3 periods/day = 9 periods. Funding cost = $10,000 × 0.01% × 9 = $9.00. Add that to the $11 round-trip commission: total cost is $20. If your 1R is $100, that trade cost you 0.20R before it made a tick. For swing traders holding positions 2-5 days, funding rate cost routinely exceeds commission cost. Most calculators either ignore it or show it as a separate, disconnected number. 对于加密货币永续合约,佣金并非唯一成本。资金费率会根据你的仓位规模每 8 小时向你收取(或支付)费用。BTC 永续合约的典型费率为 0.01%/8小时(多头支付给空头)。如果你持有 10,000 美元的多头仓位 3 天:资金费结算周期 = 3 天 × 3 次/天 = 9 个周期。资金成本 = 10,000 美元 × 0.01% × 9 = 9.00 美元。加上 11 美元的往返佣金:总成本为 20 美元。如果你的 1R 是 100 美元,那么这笔交易在波动开始前就已经消耗了你 0.20R。对于持有仓位 2-5 天的波段交易者来说,资金费成本通常会超过佣金成本。大多数计算器要么忽略它,要么将其显示为一个独立的、不相关的数字。

What I built

我开发了什么

The calculator at dtsystems.dev/tools/trading-fee-calculator lets you set: Asset class, Exchange, Position size and account size, Risk per trade, Maker vs. taker, Hold time. Outputs: all costs in dollars AND as fractions of 1R. Fee schedules are pre-loaded. I kept it static rather than pulling live exchange API data — the standard tier rates are accurate for most users, and live API integration adds a maintenance surface I didn’t want for a free tool. I’ll revisit that for a v2. 我在 dtsystems.dev/tools/trading-fee-calculator 开发的计算器允许你设置:资产类别、交易所、仓位与账户规模、单笔交易风险、挂单/吃单模式、持有时间。输出结果:所有成本均以美元和 R 的分数形式显示。手续费表已预先加载。我将其保持为静态,而不是调用实时的交易所 API 数据——标准费率对大多数用户来说已经足够准确,且实时 API 集成会增加我不想为免费工具承担的维护成本。我会在 v2 版本中重新考虑这一点。

One thing it doesn’t cover: slippage. For liquid pairs (BTC/ETH) at normal sizes, slippage is small. For mid-cap altcoins or larger size, slippage will exceed commission. That’s a harder problem — it requires order book data or historical fill data — and it’s on the roadmap. 它未涵盖的一点是:滑点。对于流动性好的交易对(BTC/ETH)且在正常规模下,滑点很小。但对于中盘山寨币或较大规模交易,滑点将超过佣金。这是一个更难解决的问题——它需要订单簿数据或历史成交数据——这已在我的开发路线图中。

Who this is for

适用人群

The R multiple framing is most useful for directional traders: trend followers, momentum strategies, discretionary + automated hybrids. If you’re market-making or running statistical arbitrage, you probably already think in basis points of notional, and this framing adds less value for you. For everyone else running a strategy with defined entries, stops, and targets: knowing your fee overhead in R before you size a position changes how you think about minimum viable R:R for a given strategy. R 倍数框架对方向性交易者最有用:趋势跟踪者、动量策略者、主观+自动化混合交易者。如果你是做市商或进行统计套利,你可能已经习惯用名义价值的基点(bps)来思考,这种框架对你的价值较小。对于其他所有使用明确入场、止损和目标策略的交易者:在确定仓位规模前了解以 R 为单位的手续费开销,将改变你对特定策略“最小可行盈亏比”的认知。

Try it: https://dtsystems.dev/tools/trading-fee-calculator 试用地址:https://dtsystems.dev/tools/trading-fee-calculator

If you find edge cases or exchanges I’m missing, I’m happy to hear it. The fee config is straightforward to extend. 如果你发现了我遗漏的边缘情况或交易所,欢迎随时反馈。手续费配置非常容易扩展。