Skip to content

Broker Cash, Strange Metric #493

Open
@shaunpatterson

Description

@shaunpatterson

Expected Behavior

Start with $1000
Buy $100 of stock
self._broker._cash should be $900.
Sell $150 of stock
self._broker._cash should be $1050

Actual Behavior

Start with $1000
Buy $100 of stock
self._broker._cash doesn't change
Sell $150 of stock
self._broker._cash is now $1050 (cash += closed_trade.pl)

I don't understand this behavior. The variable is named cash, but it's not really the current cash value.

If you want to make trades based on your actual available cash, self._broker.margin_available seems to be what you want... but that seems strange.

Am I missing something here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions