Skip to content

🗺️ IBKR stock lending income (Securities Lending) tax treatment #77

@GeiserX

Description

@GeiserX

Context

Interactive Brokers offers a "Stock Yield Enhancement Program" (SYEP) where IBKR lends out your shares and pays you a portion of the lending fee. This income appears in the Flex Query under Cash Transactions with type BrokerInterest or in the SLBActivities section.

Many IBKR users are enrolled in SYEP without realizing it generates taxable income that must be declared.

Tax treatment in Spain

Stock lending income is classified as rendimiento del capital mobiliario (Art. 25.2 LIRPF) — same category as dividends and interest, going to casilla 0029 (otros rendimientos del capital mobiliario).

Aspect Treatment
Category Rendimiento del capital mobiliario
Casilla 0029
Rate Progressive (19-28% base del ahorro)
Withholding None (IBKR doesn't withhold for non-US income)
Deduction No double taxation deduction (no foreign withholding)

IBKR Flex Query data

In CashTransactions:

<CashTransaction type="BrokerInterest" 
                 description="USD Credit Interest for Stock Yield Enhancement Program"
                 amount="12.34" currency="USD" reportDate="2024-03-15"/>

In SLBActivities (more detailed):

<SLBActivity symbol="AAPL" quantity="100" 
             collateralAmount="15000" feeRate="0.5"
             netLendFee="2.05" startDate="2024-03-01" endDate="2024-03-15"/>

Proposed implementation

1. Parser changes

Already partially handled — CashTransactions with type="BrokerInterest" are parsed. Need to:

  • Distinguish SYEP income from regular margin interest
  • Parse SLBActivities for detailed per-stock lending breakdown (informational)

2. Results display

Add a subsection in results:

Rendimientos del capital mobiliario:
├── Dividendos brutos: 1,234.56 EUR (casilla 0029)
├── Intereses ganados: 45.67 EUR (casilla 0029)
├── Préstamo de valores (SYEP): 89.12 EUR (casilla 0029)
└── Retenciones extranjeras: -185.18 EUR (casilla 0588)

3. Important notes for users

  • SYEP income is NOT a dividend (no withholding, no double taxation credit)
  • If shares are on loan during an ex-dividend date, you receive a "payment in lieu of dividend" (PIL) — this may have different withholding treatment
  • The lending income is typically small but must still be declared

Payments in Lieu of Dividends (PIL)

When your shares are on loan during a dividend payment, you receive a PIL instead of the actual dividend. In IBKR:

<CashTransaction type="PaymentInLieuOfDividend" 
                 description="AAPL(US0378331005) Payment In Lieu Of Dividend (Ordinary)"
                 amount="25.00" currency="USD"/>

Tax treatment:

  • Same as regular dividend for Spanish tax purposes
  • BUT: no foreign withholding was applied (since it's not a real dividend from the company)
  • Therefore: no double taxation deduction available for PIL
  • Must be reported separately from actual dividends to avoid claiming invalid deduction

Complexity

Low-medium. The parsing is straightforward, the categorization logic is the main work.

References

  • LIRPF Art. 25.2 (rendimientos del capital mobiliario)
  • IBKR Stock Yield Enhancement Program documentation
  • DGT V2816-19 (prĂ©stamo de valores - particular)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions