I would like to ask a completely new question regarding this code.
The code in the link above returns a numpy array for open
and close
:
open = np.array([q.open for q in quotes]).astype(np.float)
close = np.array([q.close for q in quotes]).astype(np.float)
As per Dan's help, quotes
returns:
In your case you are using asobject=True so the format you get is date, year, month, day, d, open, close, high, low, volume, adjusted_close.
Therefore, open and close must be elements [5]
and [6]
of quotes
.
>>> open
array([[ 28.12235692, 28.32908451, 28.482779 , ..., 84.8198783 ,
84.1401 , 84.64308037],
[ 22.49848073, 22.66286426, 22.91112016, ..., 63.66703704,
64.57105722, 64.12120097]])
and:
>>> close
array([[ 28.5 , 28.53, 29.23, ..., 83.8 , 84.99, 83.82],
[ 22.91, 22.71, 23.53, ..., 63.52, 64.78, 63.92]])
>>>
I do not understand exacty what open
and close
represent.
Is each element of open and close all the prices for that specific stock?
Can you please help me to understand exactly what do open and close contain? Are they just lists of lists of prices per symbol per day?