欢迎加入 TidyFriday !
首年 345，续费享 8 折! 详情可添加我的微信咨询！
I bought foreign exchange for my clients several time during my intership in ICBC. Recently, Jwen brought a lot of Macau dollars in order to pay tuition fees. So I want to the foreign exchange price of Macau dollars of the bank of China and see if I can save some money for Jwen.
Open the Bank of China Foreign Exchange Rate website and you can see that there are five kinds of price listed:
It should be noted that if we need to buy foreign currency, we should pay attention to the price of Selling Spot Exchange and the price of Selling Foreign Cash. Purchasing and selling here are for banks. Spot exchange and Cash here refer to foreign spot exchange and foreign cash. It is also easy to understand the spot selling price is lower that the cash selling price. There are cost expenditures such as escort, security and so on in the transportation of paper money.
Next, crawl the data:
Because there are only 20 observations per page, BOC will quote about 120 prices per day. So, to get one day’s data, you need crawl 6 pages. I only crawled data from January 1st, 2018 to today. A total of 84,418 records were obtained. It takes about 25 minutes.
If you dont want to waste time on the loops, you can just download my results:
First of all, let we look at the changing trend of the selling price of Macau dollars over the past two years:
rm(list = ls())
It can be seen that Jwen’s purchase of Macau dollars in the past few days is … cashed at the highest point!
The foreign exchange market is a $7 \times 24$ market, so guess that foreign qutations may vary at different times:
During the day, prices are fairly uniform, so it’s almost the same whenerve to go to the bank to buy Macau dollars.
Finally, let’s look at the relationship between the five prices.
The request link for Macau dollars is:
Currency Number Cross-references:
Update your browser to view this website correctly. Update my browser now