MemberJanuary 3, 2021 at 1:31 am16 Coins0 Gems
Can someone please explain to be the logic behind the following code? I understand the data retrieval, what I don’t understand is the calculation. And what it’s suppose to represent.
tickers = ['APPL', 'GOOG']
sec_data = pd.DataFrame()
for t in tickers:
sec_data[t] = wb.DataReader(t, data_source = 'yahoo', start = '2016-1-8') ['Adj Close']
sec_returns = np.log(sec_data / sec_data.shift(1))
Log in to reply.