Access the orderbook
First, run the backtesting.
from empyrial import empyrial, Engine
​
portfolio = Engine(
start_date = "2018-01-01",
portfolio = ["BLK", "BAC", "AAPL", "TM", "JPM","JD", "INTU", "NVDA", "DIS", "TSLA"],
optimizer = "EF",
rebalance = "1y", #rebalance every year
)
​
empyrial(portfolio)
Then, run:
empyrial.orderbook

Output

Copy link