Another solution you can try is investpy which is a Python package for historical data extraction from diverse financial products from all over the world from Investing.com. It has no limitations, no API keys needed and it is completely free since it is an open-source project.
Here I present you a piece of code in order to retrieve stock historical data from the past 9 years of the stocks you asked for above:
import investpy
stock_symbols = ['BAC', 'C', 'GS', 'JPM', 'MS', 'WFC']
for stock_symbol in stock_symbols:
df = investpy.get_stock_historical_data(stock=symbol,
country='united states',
from_date='01/01/2010',
to_date='01/01/2019')
print(df.head())
Hope this helped you! And I also encourage you to use investpy!
Note that investpy stock data retrieval functions take as input parameter both the stock symbol and the country from where the specified stock is. So on, as your input was the stock names, you will need to search over investpy data in order to retrieve the symbol of the stock names you introduced, that could be done as it follows:
import investpy
stocks = ['Bank of America', 'CitiGroup', 'Goldman Sachs', 'JPMorgan', 'Morgan Stanley', 'Wells Fargo&Co']
for stock in stocks:
print(investpy.search_stocks(by='name', value=stock))
The code above will print all the stocks found that matched the introduced name fully or partially.