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 |
2014-01-02 |
0.373966 |
0.376796 |
0.370665 |
0.375381 |
260092000 |
2014-01-03 |
0.369486 |
0.375381 |
0.368307 |
0.374674 |
259332000 |
2014-01-06 |
0.374438 |
0.377267 |
0.369722 |
0.373259 |
409492000 |
2014-01-07 |
0.380568 |
0.381983 |
0.375617 |
0.378210 |
333288000 |
2014-01-08 |
0.385756 |
0.387642 |
0.380568 |
0.381983 |
308192000 |