Bom dia Nathalia
Refiz o processo e deu erro também .
Versão do Python
CMD :


Power BI

Erro:

**Código modificado **
Código completo da obtenção dos dados históricos das cotações da carteira de 01/08/2022 à 01/08/2023
Importando a biblioteca
import os
import certifi
os.environ['SSL_CERT_FILE'] = certifi.where()
import yfinance as yf
Definindo a carteira de ações
carteira_yf = ['ABEV3.SA', 'B3SA3.SA', 'ELET3.SA', 'GGBR4.SA', 'ITSA4.SA',
'PETR4.SA', 'RENT3.SA', 'SUZB3.SA', 'VALE3.SA', 'WEGE3.SA']
Carregando os dados da carteira
df = yf.download(carteira_yf, start="2022-08-01", end="2023-08-01")
Passando os ativos para o multindex do df
cotacoes = df.stack(level=1)
Resetando os índices e renomenado a coluna dos ativos
cotacoes = cotacoes.reset_index().rename(columns={'level_1': 'Ativo'})
Organizando o df
cotacoes = cotacoes[["Date", "Open", "High", "Low", "Close", "Ativo"]]
del carteira_yf, df
Txt do Erro
See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
[ 0% ]Failed to get ticker 'ITSA4.SA' reason: Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
[********** 20% ] 2 of 10 completed
[************** 30% ] 3 of 10 completedFailed to get ticker 'RENT3.SA' reason: Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
[******************* 40% ] 4 of 10 completedFailed to get ticker 'WEGE3.SA' reason: Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
[**********************50% ] 5 of 10 completedFailed to get ticker 'GGBR4.SA' reason: Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
[******************60% ] 6 of 10 completedFailed to get ticker 'B3SA3.SA' reason: Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
[*************70% ] 7 of 10 completedFailed to get ticker 'ELET3.SA' reason: Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
[*********80% ] 8 of 10 completedFailed to get ticker 'SUZB3.SA' reason: Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
[**90% ] 9 of 10 completed
[100%] 10 of 10 completed
10 Failed downloads:
['ABEV3.SA', 'ITSA4.SA', 'RENT3.SA', 'WEGE3.SA', 'GGBR4.SA', 'B3SA3.SA', 'ELET3.SA', 'SUZB3.SA']: YFTzMissingError('possibly delisted; no timezone found')
['PETR4.SA', 'VALE3.SA']: CertificateVerifyError('Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.')
C:\Users\helio.nascimento\PythonScriptWrapper_93926cde-a973-4aee-97be-893685cfaf2b\PythonScriptWrapper.PY:28: FutureWarning: The previous implementation of stack is deprecated and will be removed in a future version of pandas. See the What's New notes for pandas 2.1.0 for details. Specify future_stack=True to adopt the new implementation and silence this warning.
cotacoes = df.stack(level=1)
KeyError: "['Ativo'] not in index"
"