VolumeOrdersFilter¶
-
class
qf_lib.backtesting.orders_filter.volume_orders_filter.
VolumeOrdersFilter
(data_provider: qf_lib.data_providers.data_provider.DataProvider, volume_percentage_limit: float)[source]¶ Bases:
qf_lib.backtesting.orders_filter.orders_filter.OrdersFilter
Verifies whether the orders sizes do not exceed the given volume limit.
- Parameters
data_provider (DataProvider) – used to download the volume data
volume_percentage_limit (float) – defines the maximum percentage of the volume value, that the orders size should not exceed
Methods
adjust_orders
(orders)Takes list of orders and based on them creates a new list with orders, whose size does not to exceed the given volume limits.
-
adjust_orders
(orders: List[qf_lib.backtesting.order.order.Order]) → List[qf_lib.backtesting.order.order.Order][source]¶ Takes list of orders and based on them creates a new list with orders, whose size does not to exceed the given volume limits. The Orders are changed in place.