Gold price graph with R

Gold is traded on many exchanges all over the world, but the largest ones setting the price of the metal, are three - New York, London and Shanghai. Below is a graph with gold prices from these exchanges during a year. Shanghai(SGE) is trading in physical metal, while New York(Comex) and London(LME) are trading primarily in "paper" gold (ETFs). Daily price difference between Shanghai and New York is displayed on the bottom in red. Also depicted are important events with probable price impact (in blue).

Technical details
The graph is generated by an R application referencing libraries quantmod, rvest, dplyr. Running time is about one minute.
Data is obtained via web data extraction from, SGE and other sources. Gold prices are calculated using USD-to-Yuan exchange rates.

Webkit phantomjs was also used to handle some web page Ajax calls.



Stock price support

An example of time series data analysis.
Stock closing prices are taken from a PostgreSQL database and local minimums are calculated. If similar values are found, they could represent a price support line.
Extending support lines to the present day could help identify trading opportunities.
The animated picture below shows several Dow stocks (UTX, PG, NKE, JPM, INTC, HD) in 2018 with horizontal price support lines drawn between significant price minimums.
Likewise, calculating price maximums would define resistance lines.