Free and Easy Currency Monitor in R

[This article was first published on Timely Portfolio, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Certainly not the best way to keep up with currencies, but the increasingly important job of monitoring currencies can be free and easy in R using Federal Reserve FRED data.  Here is a template that can be adjusted to your favorite currencies with symbols listed here.

See my previous post on how to monitor the potential US Dollar Collapse cheaply and easily.  Also, currencies are important again, so do not ignore them when investing.  Don’t say I did not warn you and don’t make excuses that you don’t have expensive gear.

From TimelyPortfolio
From TimelyPortfolio

R code:


#get asian currency data from the FED FRED data series
getSymbols(“DEXKOUS”,src=”FRED”) #load Korea
getSymbols(“DEXMAUS”,src=”FRED”) #load Malaysia
getSymbols(“DEXSIUS”,src=”FRED”) #load Singapore
getSymbols(“DEXTAUS”,src=”FRED”) #load Taiwan
getSymbols(“DEXCHUS”,src=”FRED”) #load China
getSymbols(“DEXJPUS”,src=”FRED”) #load Japan
getSymbols(“DEXTHUS”,src=”FRED”) #load Thailand
getSymbols(“DEXBZUS”,src=”FRED”) #load Brazil
getSymbols(“DEXMXUS”,src=”FRED”) #load Mexico
getSymbols(“DEXINUS”,src=”FRED”) #load India
getSymbols(“DTWEXO”,src=”FRED”) #load US Dollar Other Trading Partners
getSymbols(“DTWEXB”,src=”FRED”) #load US Dollar Broad

par(mfrow=c(3, 4)) #provides 2 columns and 3 rows for charts
plot(coredata(DTWEXO[“1995::2011″]),type=”l”,ylab=”US Dollar Other”)
plot(coredata(DTWEXB[“1995::2011″]),type=”l”,ylab=”US Dollar Broad”)

#if you prefer a prettier chart then you can use
chartSeries(to.monthly(1/DEXSIUS),theme = chartTheme(“white”),name=”Singapore Dollar/USD”,TA=”addBBands(10)”)

To leave a comment for the author, please follow the link and comment on their blog: Timely Portfolio. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)