Account ManagementΒΆ

Account management functions are used to get your account value, cash, etc. You can see a list of them below.

For the full cash-accounting flow, including how these methods affect cash-adjusted returns and live cash_events, see Cash Accounting.

Strategy.adjust_cash(amount[, reason, ...])

Adjust cash directly during backtesting.

Strategy.configure_cash_financing(*[, ...])

Configure framework-managed daily cash financing for backtests.

Strategy.deposit_cash(amount[, reason])

Deposit cash during backtesting and return the updated cash balance.

Strategy.get_portfolio_value()

Query the broker for the latest portfolio value (cash plus net equity).

Strategy.get_cash()

Get the current cash value in your account.

Strategy.get_position(asset)

Get a tracked position given an asset for the current strategy.

Strategy.get_positions([include_cash_positions])

Get all positions for the account.

Strategy.set_cash_financing_rates(*[, ...])

Set annualized cash financing rates used by framework daily accrual.

Strategy.withdraw_cash(amount[, reason, ...])

Withdraw cash during backtesting and return the updated cash balance.