Fetching data from Yahoo Finance:
import yfinance as yf
symbol = "NVDA"
df = yf.download(symbol, start="2014-01-01", end="2024-01-31")
df.head()
[*********************100%***********************] 1 of 1 completed
Ticker |
NVDA |
NVDA |
NVDA |
NVDA |
NVDA |
NVDA |
2014-01-02 |
0.373992 |
0.39650 |
0.3995 |
0.39300 |
0.39800 |
260092000 |
2014-01-03 |
0.369512 |
0.39175 |
0.3980 |
0.39050 |
0.39725 |
259332000 |
2014-01-06 |
0.374464 |
0.39700 |
0.4000 |
0.39200 |
0.39575 |
409492000 |
2014-01-07 |
0.380595 |
0.40350 |
0.4050 |
0.39825 |
0.40100 |
333288000 |
2014-01-08 |
0.385782 |
0.40900 |
0.4110 |
0.40350 |
0.40500 |
308192000 |