Using python and yahoo finance (so something else) how can I get data for the price of an an asset throughout a trading day for X number of days

208 views Asked by At

I don't really have sample code other than the library that I should be using is probably pandas? I am pretty new to both python and yahoo.

1

There are 1 answers

0
db702 On

This is very broad, but you can do something like this (if I am understanding correctly):

import pandas as pd
import pandas_datareader.data as data
import datetime as dt 

start = dt.datetime(2018,1,1)
end = dt.datetime(2019,1,1)

df = data.DataReader('MSFT', 'yahoo', start, end)