Skip to content

Tax Analysis

Tax analysis estimates how realized trades can change a backtest’s results. It is a model of the rules implemented by the backtest engine, not tax advice or a filing result. It does not know your full income, account activity outside Stratifyre, elections, residency, or broker records. Use a qualified tax professional for decisions and filing.

The standard backtest UI and API currently offer:

  • U.S. — the U.S. implementation described below.
  • None — disables tax accounting.

The Rust runtime also contains simplified internal models for the United Kingdom, Canada, Australia, and Germany. They are not currently selectable through the standard UI or public API, so they should not be treated as public tax products.

When a position contains shares purchased at different times and prices, the runtime closes the oldest open lots first: FIFO (first in, first out).

LIFO and specific-lot identification are not available. Stratifyre does not choose lots to minimize a tax bill, and a backtest cannot compare alternative lot-selection methods.

When U.S. tax accounting is selected, the engine models these backtest behaviors:

  • A 365-day holding threshold distinguishes short-term and long-term realized trades.
  • It tracks a 30-day look-back and look-forward wash-sale window and records disallowed-loss adjustments on matching replacement lots.
  • It applies the engine’s Section 1256 handling only to the U.S. model.
  • It records tax events and an accrued liability as positions close.

The result is an estimate based on the backtest configuration and realized trades. It is not a substitute for a tax return.

These are implementation defaults in the Rust runtime, not statements of current law or individualized tax treatment:

Model Implemented behavior
United Kingdom (UK) Flat 20% default rate; no long-/short-term split or wash-sale tracking.
Canada (CA) 50% gain inclusion; 30-day superficial-loss tracking.
Australia (AU) 50% inclusion for holdings of at least 365 days; no wash-sale tracking.
Germany (DE) 26.375% default rate; annual allowance and capital-loss netting described below.

The German model uses a simplified single pool of realized capital gains and losses. It applies the model’s annual allowance before charging the default rate:

  • 2009–2022: €801 per individual, or €1,602 for a joint filing status.
  • 2023 onward: €1,000 per individual, or €2,000 for a joint filing status.

Losses first offset realized capital gains. A loss-only year creates no ordinary-income credit in this model; unused capital losses carry forward. When gains occur before losses in the same year, a later loss can only refund tax that the model has already accrued for that year. The allowance is annual and does not carry forward.

The schedule starts in 2009. Earlier German tax regimes are outside this model. The model also excludes asset-specific loss buckets, church tax, foreign-exchange conversion, outside-account income, and other individual circumstances. Amounts passed to this internal model are assumed to be euro-denominated; it does not convert currencies.

The internal German model records every realized trade as a tax event, including zero-tax events after loss netting or an allowance. Other models record the events their implementation produces. The summary reports:

Item Meaning
Accrued tax liability The model’s running total across recorded events.
Loss carryforward Unused modeled capital losses available to offset later gains.
Tax events Realized trade events produced by the selected model; the internal German model includes zero-tax events.
Wash-sale summary Tracked disallowed losses and replacement-lot adjustments where the selected model supports them.

Use these results to compare the assumptions in a strategy. Do not use them as a filing calculation or a promise of after-tax performance.