Skip to main content

FeeEventType

Bases: str, Enum The lifecycle stage at which a fee-bearing transaction event occurred.

FeeEvent

dataclass
A single fee-bearing transaction event collected during a pulse. Attributes

FeeCalculator

Bases: ABC Computes fees for the batch of transaction events collected on a single pulse. Subclasses receive every entry/rebalance/exit event that occurred during the pulse and return one non-negative fee per event (same order, same length). Receiving the full batch lets implementations apply schemes that depend on inter-event relationships, for example block-trade pricing where the side with the larger notional is charged and the other side is rebated to zero.

FeeCalculator.calculate

abstractmethod
Compute the per-event fees for the events collected this pulse. Parameters Returns

NoFeeCalculator

Bases: FeeCalculator Default zero-fee calculator. Preserves existing portfolio behavior.

NoFeeCalculator.calculate

Return a zero fee for each event. Parameters Returns

FixedFeeCalculator

Bases: FeeCalculator Flat fee per unit traded (e.g. per contract). Initialize a FixedFeeCalculator. Parameters Raises

FixedFeeCalculator.calculate

Charge per_unit * |quantity_units| for each event. Parameters Returns

PercentageFeeCalculator

Bases: FeeCalculator Percentage-of-notional fee (rate * |quantity_units| * |price|). Initialize a PercentageFeeCalculator. Parameters Raises

PercentageFeeCalculator.calculate

Charge rate * |quantity_units| * |price| for each event. Parameters Returns
Last modified on November 4, 2026