The efficient frontier is the set of optimal portfolios that offer the highest expected return for a defined level of risk or the lowest risk for a given level of expected return. (Source: Investopedia)
1
from empyrial import empyrial, Engine
2
β
3
portfolio = Engine(
4
start_date ="2018-01-01",
5
benchmark =["SPY"],#SPY is set by default
6
portfolio =["BABA","PDD","KO","AMD","^IXIC"],
7
optimizer ="EF"
8
)
9
β
10
empyrial(portfolio)
Copied!
When using this optimizer, the weights may be not well-diversified, you can fix that by reading the "Diversification" section :