FeeEventType
Bases: str, Enum
The lifecycle stage at which a fee-bearing transaction event occurred.
FeeEvent
dataclass
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
Returns
NoFeeCalculator
Bases: FeeCalculator
Default zero-fee calculator. Preserves existing portfolio behavior.
NoFeeCalculator.calculate
Returns
FixedFeeCalculator
FeeCalculator
Flat fee per unit traded (e.g. per contract).
Initialize a FixedFeeCalculator.
Parameters
Raises
FixedFeeCalculator.calculate
per_unit * |quantity_units| for each event.
Parameters
Returns
PercentageFeeCalculator
FeeCalculator
Percentage-of-notional fee (rate * |quantity_units| * |price|).
Initialize a PercentageFeeCalculator.
Parameters
Raises
PercentageFeeCalculator.calculate
rate * |quantity_units| * |price| for each event.
Parameters
Returns

