How to retrieve KLSE, SGX, and gold prices in Google Sheets (Updated for 2022Q1)
source link: https://anonoz.github.io/finance/2022/02/28/google-sheets-klse-sgx.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How to retrieve KLSE, SGX, and gold prices in Google Sheets (Updated for 2022Q1)
For Bursa Malaysia (KLSE) and Singapore Exchange (SGX), we can scrape from i3investor websites. This is how.
KLSE & SGX
This is the new formula for KLSE after the site revamp:
=index(ImportXML("https://klse.i3investor.com/web/stock/overview/5176?randomstring", "//div[contains(@id, 'stock-price-info')]//p[2]"), 1, 1)
And this is for SGX:
=index(ImportXML("https://sgx.i3investor.com/servlets/stk/g3b.jsp", "//td[contains(@class, 'big16')]"), 1, 1)
Just remember to replace the stock code with whatever you want, the part right before .jsp
.
Gold Prices
You can use this formula to approximate USD per oz:
=GOOGLEFINANCE("GLD", "price")*10/POW(0.996,YEARFRAC(TODAY(), "18/11/2004", 1))
GLD is the ticker for SPDR gold trust ETF, the largest one out there. They charge 0.4% per annum since inception.
Recommend
-
44
How to retrieve KLSE, SGX, and gold prices in Google Sheets (Updated for 2020) For Bursa Malaysia (KLSE) and Singapore Exchange (SGX), we can scrape from i3investor webs...
-
4
2021之 股票买贵了,不一定是坏事
-
17
Submit a HTML form to Google Sheets How to submit a simple HTML form to a Google Sheet using only HTML and JavaScript. Updated for Google Script Editor 2021 Version. This example shows how to set up a mailing list for...
-
2
传AMD将于2022Q1发布Navi 24,或与GeForce RTX 3050系列竞争
-
7
Data.ai:2022Q1全球手游市场达220亿美元,《原神》收入夺冠 2022-03-30 •
-
2
2022Q1季度eBay墨西哥销售数据揭晓!这些品类表现太亮眼! ...
-
3
2022Q1老年领域要点:上海支持养老机构上市、天与养老完成2000万美元A+轮 作者:子航 发布时间: 2022-04-08 17:08
-
3
2021上半年,亚马逊封号潮席卷跨境电商行业,众多跨境头部大卖因此落入云泥,业绩损失惨重。其中,跨境大卖泽宝母公司星徽股...
-
4
腾讯课堂在线学习需求洞察报告:2022Q1恋爱脱单、蔬菜种植、养猪课等增长超20% ...
-
8
台积电表示2022Q1毛利率突破55%,HPC收入占比首次超越智能手机
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK