Support debit dividends / short-dividend payments without reclassifying them as fees

Author: chrisstpierreCreated Sep 28, 2026Updated Sep 28, 2026

Bug description

Some brokers represent a short-position dividend payment as a dividend transaction with a debit cash effect.

For example, tastytrade returns a transaction shaped like:

json
{
  "transaction-type": "Money Movement",
  "transaction-sub-type": "Dividend",
  "symbol": "TLT",
  "value": "<positive magnitude>",
  "value-effect": "Debit",
  "net-value": "<positive magnitude>",
  "net-value-effect": "Debit"
}

When this arrives through SnapTrade, Wealthfolio correctly notices that the dividend has an unexpected negative direction and marks it Needs review. However, there is no way to resolve the review while preserving both:

  1. The semantic type: DIVIDEND
  2. The actual cash direction: debit/outflow

The activity editor does not accept a negative dividend amount. If the activity remains a dividend, Wealthfolio stores/interprets the amount as a positive cash inflow.

Steps to reproduce

  1. Hold a short position through a dividend record date.
  2. Let the broker post the resulting short-dividend payment as a dividend with value-effect: Debit.
  3. Sync the transaction into Wealthfolio through SnapTrade.
  4. Open the resulting Needs review activity.
  5. Try to preserve the DIVIDEND type while recording a cash outflow.

Actual behavior

  • Wealthfolio flags the imported transaction for review.
  • A negative amount cannot be saved through the activity editor.
  • A stored negative amount would not solve the issue because dividend amounts are treated as magnitudes and DIVIDEND is assigned an inflow direction.
  • Reclassifying the transaction as FEE produces the correct cash effect, but incorrectly reports a short-dividend expense as a brokerage/account fee.

Expected behavior

Wealthfolio should support dividend-related cash outflows while preserving their dividend semantics.

Possible approaches:

  • Allow negative values for DIVIDEND activities and preserve their negative cash direction.
  • Add a subtype such as SHORT_DIVIDEND, DIVIDEND_EXPENSE, or PAYMENT_IN_LIEU.
  • Preserve and use the broker-provided debit/credit direction.
  • Add an explicit cash-direction field for activity types that can legitimately flow in either direction.

The resulting activity should:

  • Reduce cash
  • Leave holdings unchanged
  • Remain attributable to the relevant security
  • Be reported as dividend expense or negative dividend income—not as a brokerage fee
  • Allow the Needs Review flag to be resolved

Relevant implementation detail

In crates/core/src/portfolio/economic_events.rs, cash resolution currently:

  • Converts the stored amount to an absolute magnitude
  • Assigns DIVIDEND a positive cash direction

That appears to make debit dividends impossible to represent under the current activity model.

Workaround

Reclassifying the transaction as FEE with a positive amount produces the correct cash balance, but distorts fee reporting and loses the dividend semantics.

Environment

  • Wealthfolio: 3.9.1
  • Build: 20260301.1
  • macOS: 26.5.1
  • Source: tastytrade via SnapTrade