Hey guysm someone could help me? I'm new here and in python codying to, so i'm beginner level.
I'm was trying plot my efficient frontier using pypfopt lib and i'm got some troubles with the parameters in Plotting.plot_efficient_frontier command that is used to plot the graph.
I added the picture of my code in the post
#importando as libs
import pandas as pd
import numpy as np
import pandas_datareader.data as web
import datetime as dt
import matplotlib as plt
from pypfopt.expected_returns import mean_historical_return
from pypfopt.risk_models import CovarianceShrinkage
#definindo o período de análise
start = dt.datetime(2019,1,1)
end = dt.datetime(2019,12,31)
#asset tickers
tickers = ["ITUB4.SA","B3SA3.SA","PETR4.SA","ABEV3.SA","ELET3.SA"]
#getting the data
carteira = web.DataReader(tickers,"yahoo",start,end)
#craindo outro dataframe só com os proços de feachamento ajustados
prices = carteira['Adj Close']
#expected returns
#covariance matrix
e_r = mean_historical_return(prices)
cov_matrix = CovarianceShrinkage(prices).ledoit_wolf()
from pypfopt.efficient_frontier import EfficientFrontier
#border problem solution
#selectiong portfolio with better sharpe ratio
ef = EfficientFrontier(e_r, cov_matrix)
weights = ef.max_sharpe()
from pypfopt import Plotting
Plotting.plot_efficient_frontier(ef ,points=100 , show_assets = True)
[n ][1]
[1]: https://i.stack.imgur.com/NaeJI.png