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

Output

Last modified 4mo ago
Copy link