0
Using the yfinance library I imported data from a list of 80 assets:
tickers=['xxx','yyy']
data = yf.download(tickers, start="2020-01-01", end="2020-12-04")
data = data['Close']
I used a function and extracted a list of pairs of those assets. According to my criteria I have selected 88 pairs.
Now I would like a function that creates a dataframe, for later export to Excel, where each Worksheet would receive the name of the pair and the quotes of each asset organized in columns B and C, the column A being reserved for the date.
It is not clear to me what you are having to do. What are colums A, B and C? How did you import the object
yf
?– Lucas
yf is the library of Yahoo Finanace
import yfinance as yf
Columns A, B and C would be the output columns of each pair(A for date, B for the first asset of the pair and C for the second asset of the pair)– MarcusMartins