Get a report
If you want to get a PDF report of the backtesting use get_report instead of empyrial function:
from empyrial import get_report, Engine
​
portfolio = Engine(
start_date = "2018-01-01",
portfolio = ["BLK", "BAC", "AAPL", "TM", "JPM","JD", "INTU", "NVDA", "DIS", "TSLA"],
optimizer = "EF",
rebalance = "1y",
risk_manager = {"Stop Loss" : -0.2}
)
​
get_report(portfolio)

Output

Copy link