Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Account

An account mirrors the state of the trading account of the underlying broker. It contains available cash, open positions, open orders, available buying power and executed trades.

The account doesn’t contain closed orders and closed positions.

Account is the only created and modified by the Broker and returned when the sync() method is invoked. It is also the object returned from the run() function.

import roboquant as rq
account = rq.demo_run()
print(account)
buying power : 1,367,843@USD
cash         : 1,367,843@USD
equity       : 3,544,954@USD
positions    : 1075@JPM, 2430@XOM, 773@MSFT, 1206@AMZN, 824@AVGO, 1568@NVDA
trades       : 518
mkt value    : 2,177,111@USD
orders       : none
last update  : 2026-08-13 04:00:00+00:00

There are several helper methods available that can help to further inspect the account after a run.

account.orders_to_dataframe()
account.trades_to_dataframe()
account.pnl()
2544953.7155447006@USD