Hi
I have created a web query which import the day´s trading data (example Tesla, ticker TSLA) from finance.yahoo using the following link: https://finance.yahoo.com/quote/TSLA/history?p=TSLA
The table looks like this where I have just copied 5 of the 100 or so lines from the table. :
On a separate sheet, I have the "master" database which goes back as far as the stock data goes, in this case Tesla´s IPO in 2010. It looks like this:
What I´d like to know is:
1) Is there a way to add only the most recent day´s trading date from the website (today for example would be line 2) to the "Master" sheet?
2) Is there a way to automate this so that it updates every day without having to open the Excel every time? Problem is that the link provides the most recent 100 days of trading data, but I want to "capture" each day´s data which ends up as thousands of days of trading data, and I want to do this for about 250 different stocks.
3) I am also open to other sources of the stock data but yahoo seems convenient and it´s free.
Thanks in advance for any suggestions!
I have created a web query which import the day´s trading data (example Tesla, ticker TSLA) from finance.yahoo using the following link: https://finance.yahoo.com/quote/TSLA/history?p=TSLA
The table looks like this where I have just copied 5 of the 100 or so lines from the table. :
Web Data Query Test.xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Date | Open | High | Low | Close* | Adj Close** | Volume | ||
2 | 27/09/2023 | 244.26 | 245.33 | 238.57 | 239.3 | 239.3 | 68089575 | ||
3 | 26/09/2023 | 242.98 | 249.55 | 241.66 | 244.12 | 244.12 | 101741600 | ||
4 | 25/09/2023 | 243.38 | 247.1 | 238.31 | 246.99 | 246.99 | 104636600 | ||
5 | 22/09/2023 | 257.4 | 257.79 | 244.48 | 244.88 | 244.88 | 127024300 | ||
6 | 21/09/2023 | 257.85 | 260.86 | 254.21 | 255.7 | 255.7 | 119531000 | ||
7 | 20/09/2023 | 267.04 | 273.93 | 262.46 | 262.59 | 262.59 | 122514600 | ||
Table 0 |
On a separate sheet, I have the "master" database which goes back as far as the stock data goes, in this case Tesla´s IPO in 2010. It looks like this:
06 TSLA.xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
2 | Date | Open | High | Low | Close | Adj Close | Volume | ||
3 | 29/06/2010 | 1.266667 | 1.666667 | 1.169333 | 1.592667 | 1.592667 | 281494500 | ||
4 | 30/06/2010 | 1.719333 | 2.028 | 1.553333 | 1.588667 | 1.588667 | 257806500 | ||
5 | 01/07/2010 | 1.666667 | 1.728 | 1.351333 | 1.464 | 1.464 | 123282000 | ||
6 | 02/07/2010 | 1.533333 | 1.54 | 1.247333 | 1.28 | 1.28 | 77097000 | ||
7 | 06/07/2010 | 1.333333 | 1.333333 | 1.055333 | 1.074 | 1.074 | 103003500 | ||
Sheet1 |
What I´d like to know is:
1) Is there a way to add only the most recent day´s trading date from the website (today for example would be line 2) to the "Master" sheet?
2) Is there a way to automate this so that it updates every day without having to open the Excel every time? Problem is that the link provides the most recent 100 days of trading data, but I want to "capture" each day´s data which ends up as thousands of days of trading data, and I want to do this for about 250 different stocks.
3) I am also open to other sources of the stock data but yahoo seems convenient and it´s free.
Thanks in advance for any suggestions!