Backtesting7 min read
How to Model Stock-Borrow Fees in a Backtest
Build an auditable stock-borrow fee estimate for a short-selling backtest with dated rates, a documented fee base, and clear accrual assumptions.
By TerraTrade Team

Start with the model boundary#
A short trade can carry a financing expense for as long as shares are borrowed. If a backtest leaves that expense out, it may overstate the historical result—especially when positions remain open across many accrual days or the borrow rate is high. The practical challenge is that a fee rate, its calculation base, and its timing are not necessarily constant or identical across brokers. Brokerage reporting materials, for example, describe a daily fee based on collateral and an annualized rate, while a securities-borrowing guide illustrates fees calculated from daily price and quantity. Record the convention you are modeling instead of treating one formula as universal. Securities Pre-Borrowed Fee Details - Default Activity Statement Introduction to Securities
This guide builds a worksheet for estimating stock-borrow fees only. It does not model commissions, quoted spreads, fill quality, market impact, payments in lieu of dividends, or interest or rebates on short-sale proceeds. Those are separate cash flows or execution assumptions. The SEC notes that short sellers may owe payments in lieu of dividends, which is one reason not to bundle every short-position cost into a single borrow-fee number. Key Points About Regulation SHO
Use this as a record template, not as a claim that every broker supplies each field in the same format. One broker’s reporting guide identifies fee rate, collateral amount, and value date, and gives a daily formula with a 360-day divisor. A different guide describes summing daily amounts based on price, quantity, annual rate, and a day-count basis. Preserve the source’s stated fee base and divisor when available. Securities Pre-Borrowed Fee Details - Default Activity Statement Introduction to Securities
| Worksheet field | Record | Why it matters |
|---|---|---|
| Security / position ID | Ticker or permanent instrument identifier; trade or position key | Connects the fee entries to the tested short position. |
| Borrow-fee rate | Rate and units, for example annualized percent | A bare number is ambiguous; keep the quoted units. |
| Rate source | Broker statement, securities-lending record, or other named source | Makes the input auditable and distinguishes observed data from an assumption. |
| Rate observation and effective dates | When the rate was observed; the period it applies to, if documented | Do not silently treat a later observation as a historical rate. |
| Shares borrowed | Daily quantity, with dates for additions, covers, or changes | Quantity determines exposure and can change during a trade. |
| Daily price and fee base | Price convention and resulting base: short market value or collateral amount | State whether the base is shares × price or a broker-defined collateral value. |
| Accrual convention | Accrual start/end, calendar or business days, and denominator such as 360 or 365 | Different conventions produce different estimates. IBKR’s cited reporting guide uses collateral × rate ÷ 100 ÷ 360 for its stated daily calculation. Securities Pre-Borrowed Fee Details - Default Activity Statement |
| Daily fee and total | Fee by accrual interval; sum for the holding period | Preserves the calculation trail instead of hiding changes in a trade-level total. |
Calculate the holding-period estimate#
For a simple estimate, if the rate is annualized and the fee base is constant, use:
Borrow fee = fee base × annualized rate × accrual days ÷ day-count denominator
Use the rate as a decimal: 12% becomes 0.12. If the source quotes a percent number such as 12 rather than 0.12, divide by 100 first. For a price-and-quantity base, calculate the fee base for each interval as shares borrowed × the price convention you selected. For a collateral-based calculation, use the documented collateral amount instead; do not assume it equals short market value. The cited IBKR daily formula uses collateral amount and divides the annual rate by 100 and 360. Securities Pre-Borrowed Fee Details - Default Activity Statement
Illustration, not a broker quote: assume 1,000 shares, a constant price of $50, a constant annualized fee rate of 12%, 20 calendar days of accrual, an actual/360 convention, and short market value as the fee base with no collateral uplift. Then the base is 1,000 × $50 = $50,000, and the estimate is $50,000 × 0.12 × 20 ÷ 360 = $333.33. The arithmetic illustrates a stated convention; it does not establish that any broker would charge this amount or accrue for these exact dates.
For variable inputs, split the holding period into intervals. A useful daily calculation is:
Daily fee = daily fee base × annualized rate applicable to that day ÷ day-count denominator
Sum the daily fees. If your data only supports coarser intervals, use the same formula with the interval’s day count only when the fee base and rate can reasonably be treated as constant across it. Break the interval when the rate, quantity, price-based base, or borrow status changes. Nomura’s guide illustrates summing fees based on daily price and quantity; IBKR describes its own fee accrual and settlement details, which should not be generalized into a universal timing rule. Introduction to Securities The Risks of Shorting Series, Part II: Borrow Fees
A reproducible workflow prevents a convenient estimate from being mistaken for observed historical data. The source materials show that rate, collateral or market-value basis, and accrual timing are all relevant; IBKR’s operational description, including its settlement-related timing, is broker-specific. Securities Pre-Borrowed Fee Details - Default Activity Statement Introduction to Securities The Risks of Shorting Series, Part II: Borrow Fees
- Identify the short position and reconstruct borrowed share quantity by date, including partial covers and additions.
- Collect the rate record. Save its source, units, observation date, and effective dates. Mark missing historical rates as unknown or assumed; do not present a current rate as a historical observation.
- Choose a fee base supported by the source or clearly label your proxy. Record whether it is short market value, collateral amount, or another defined base.
- Write down accrual timing and day count. Specify whether you count calendar or business days, the divisor, and the event that starts or stops accrual. Confirm the broker-specific convention when broker-level fidelity is required.
- Create a new calculation interval whenever the rate, quantity, price-based fee base, or accrual status changes.
- Calculate each interval’s fee, retain the inputs and arithmetic, and sum the intervals for the trade.
- Keep other costs and cash flows in separate fields so you can inspect borrow expense independently.
Handling incomplete historical borrow data#
A precise formula cannot make weak inputs historical evidence. If you do not have dated borrow-fee records, label the rate as an assumption and explain how you selected it. A single constant rate can serve as a transparent baseline, but it cannot represent unobserved rate changes or prove what a broker would have charged at the time. Where you have multiple plausible rates or conventions, calculate separate scenarios and compare the results rather than blending them into one unsupported figure.
Also record the timing assumption explicitly. The cited IBKR material says its described borrow fee accrues on settled shorts and discusses costs beginning at settlement absent a pre-borrow; this is an example of broker-specific operation, not a universal rule for every account or historical period. The Risks of Shorting Series, Part II: Borrow Fees Your backtest should match the intended broker and market rules as closely as available evidence permits, or disclose the gap.
Finally, keep the result in its lane. A borrow-fee estimate is not a complete short-trade cost model. It does not account for execution price, commissions, dividends owed in lieu, or interest credited or charged on proceeds. The SEC identifies payments in lieu of dividends as a potential short-sale obligation, separate from the cost of borrowing shares. Key Points About Regulation SHO
Frequently asked questions#
Should I divide by 360 or 365?
No single convention should be assumed for every broker. The supplied IBKR guide gives a daily calculation based on collateral, rate, and a 360 divisor, while Nomura’s guide illustrates daily price and quantity with a day-count basis. Record the source’s fee base and denominator. Securities Pre-Borrowed Fee Details - Default Activity Statement Introduction to Securities
What if I do not have historical borrow rates?
Use dated historical rate observations when you have them, preserving the source and applicable dates. If you do not, identify the rate as an assumption and test distinct scenarios rather than describing an assumed rate as observed history. Borrow rates can change, according to IBKR’s guidance. The Risks of Shorting Series, Part II: Borrow Fees
Does the fee begin on the trade date?
It depends on the source’s stated convention and the records available. Your worksheet should specify the accrual start and end rules. IBKR’s material describes its own settlement-related practice; do not apply that detail automatically to a different broker. The Risks of Shorting Series, Part II: Borrow Fees
Does this estimate include every cost of a short trade?
No. This calculation isolates borrow-fee expense. Commissions, execution costs, payments in lieu of dividends, and interest or rebates on short-sale proceeds are separate items. The SEC notes potential payments in lieu of dividends on short sales. Key Points About Regulation SHO
Make the estimate auditable#
A useful borrow-fee model is one you can audit: dated inputs where available, explicit assumptions where not, a documented fee base and day count, and interval-level calculations that reconcile to the trade total. Keep financing expense separate from execution costs and other short-position cash flows.
Sources#
- Key Points About Regulation SHO — sec.gov
- https://www.sec.gov/comments/s7-07-23/s70723-20162302-331156.pdf — sec.gov
- https://www.sec.gov/files/short-sale-position-and-transaction-reporting0.pdf — sec.gov
- Securities Pre-Borrowed Fee Details - Default Activity Statement — ibkrguides.com
- Introduction to Securities — nomuranow.com
- The Risks of Shorting Series, Part II: Borrow Fees — interactivebrokers.com
- https://support.mexem.com/faq/what-is-the-difference-between-the-fee-rate-and-the-rebate-rate — support.mexem.com
- https://www.interactivebrokers.com/download/reportingguide.pdf — interactivebrokers.com
- https://www.eitc.irs.gov/pub/irs-irbs/irb25-46.pdf — eitc.irs.gov
- https://www.interactivebrokers.com/campus/trading-lessons/interest-rate-markups/ — interactivebrokers.com
- https://cdn.robinhood.com/assets/robinhood/legal/Robinhood_Stock_Lending_Agreement.pdf — cdn.robinhood.com
- https://www.govinfo.gov/content/pkg/CFR-2025-title17-vol5/xhtml/CFR-2025-title17-vol5-part242.html — govinfo.gov
- https://www.interactivebrokers.com/support/faq/content/amount-cash-collateral-given-loan-38441618 — interactivebrokers.com
- https://www.interactivebrokers.com/campus/trading-lessons/shorting-stocks-on-ibkrs-trader-workstation-tws/?socl=FB_20230425 — interactivebrokers.com
- https://www.schwab.com/securities-lending?msockid=1f2d563bbf7560ba30d740e3be07610c — schwab.com
- https://www.interactivebrokers.com/en/trading/margin-calculation-details.php — interactivebrokers.com
KEEP READING

Backtesting7 min read
Should Your Trading Monte Carlo Preserve Losing Streaks?
Compare independent-trade and block bootstrap Monte Carlo methods, inspect outcome clustering, and document a practical block-length sensitivity check.
Read post
Backtesting7 min read
How to Audit Historical Price Data for Missing Bars
Learn how to check historical trading data for missing bars and duplicates with a session-aware timestamp worksheet and documented handling rules.
Read post
Backtesting6 min read
How to Model Bid–Ask Spread Costs in a Backtest
Build a reproducible bid–ask spread estimate for backtests using timestamped quotes, side-specific fill assumptions, position size, and a clear worksheet.
Read post