CashBufferedOrderSizer#
API documentation for tradeexecutor.strategy.qstrader.order_sizer.CashBufferedOrderSizer Python class in Trading Strategy framework.
- class CashBufferedOrderSizer[source]#
Bases:
OrderSizer
Creates a target portfolio of quantities for each Asset using its provided weight and total equity available in the Broker portfolio.
Includes an optional cash buffer due to the non-fractional amount of share/unit sizes. The cash buffer defaults to 5% of the total equity, but can be modified.
- cash_buffer_percentagefloat, optional
The percentage of the portfolio equity to retain in cash to avoid generating Orders that exceed account equity (assuming no margin available).
- __init__(state, pricing_model, cash_buffer_percentage=0.05)[source]#
- Parameters:
state (State) –
pricing_model (PricingModel) –
Methods
__init__
(state, pricing_model[, ...])- __init__(state, pricing_model, cash_buffer_percentage=0.05)[source]#
- Parameters:
state (State) –
pricing_model (PricingModel) –