Learning New Thing at Home: Stock Market Update
Been lazing around at home or rather stuck at home since Monday 6th April. Although have been doing some stretching here and there and running in the tiny house, it is so difficult to flatten the tumy.
Cozy has been venturing in learning more on Financial investment. Today tried some things that is using a googlesheet to capture the current stock market. This is just the start. Let’s see if it works and hope Cozy won’t be lazy and will continue to improve on it and gain new knowledge to get to the next level – FIRE. Which is known as Financial Independent and Retirement Early.. erm.. Cozy is considered been retired early.. but far away from Financial Independent. Need more people to support this website and hope they can gain some insights and knowledge from it too.
As can be seen above, it works. Here is the link to the google spreadsheet been published. The instructions are actually very simple.
1). Create a google spreadsheet.
2). For Stock Market update, Yahoo and Google have disabled some API.
– As of April 2020, the simple way to get US stock from google is using GoogleFinance Function.
Example: =GOOGLEFINANCE(GOOG,”price”) in the cell.
However, GoogleFinance does not allow to get SGX market. So the workaround will be to use ImportXML function.
Example: =ImportXML(“https://sg.finance.yahoo.com/quote/”&F20&”/history?p=”&F20, “//tbody/tr[1]/td[6]”) , where F20 is the cell location of the Symbol.
3). Follow this youtube instruction to publish the googlesheet to the web and copy the links and place into the WordPress.
- Note: To add in the width and height between the iframe and src. Example: “Width = “900” height =” 1500″
Updated as on 9th May 2020. As the above solution is using Google spreadsheet, There is some difficulty to integrate with excel spreadsheet used locally to update the information and also capture history of data for further analysis. Thus further search, a VBA excel is found from this link – https://investexcel.net/multiple-stock-quote-downloader-for-excel/. It was created in 2013 but there was a latest update in April 2018. Have downloaded it and enable the macros. So far, it works well and it is able to input Singapore stock symbols to generate the dataset for 1 year for multiple stocks.
Once you unzip the .xlsm file and open it, it will looks like this. You can modify the end date to your desired date and the start date is set as 1 year before as default (You can change the formula or hard code a date if you prefer).
Example of Data in Singapore ETF Stock – ES3.SI
Comments
Hi, Can see it works. but the csv file saving is not working.