Skip to content

Scaled down order in simulated broker mentioned but not implemented? #382

@pmkenny1234

Description

@pmkenny1234

On line 584 of simulated_broker.py (in _execute_order()), there is a comment about scaling down the order if there isn't available cash. However, a few lines later scaled_quantity is set to just order.quantity. Is it desired that the scaling actually happen? I'm definitely seeing a negative cash balance commonly when running simulations, which makes sense since orders may be placed well before they're actually filled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions