360 search results for "quantmod"

Looking out for volatility

June 26, 2013
By
Looking out for volatility

Let’s do an easy experiment. Lets caluclate the 25-day rolling volatility of the S&P 500 from 2007 onwards. 1-Get the data: getSymbols(‘SPY’,from=’2007/01/01′) 2-Run the volatility function from the package TTR (comes along with quantmod): vol=volatility(SPY,n=25,N=252,calc=’close’) #n=25 means we want 25 … Continue reading →

Read more »

Computerworld’s Beginners Guide to R

June 17, 2013
By

Sharon Machlis is not only the online managing editor at Computerworld, she's also a budding data scientist who recently started learning the R language. To the benefit of all other new R users, she's shared her learnings in an excellent 6-part beginners guide to R, published by Computerworld. It's jam-packed with useful information for anyone getting started with R,...

Read more »

Scenario analysis and trading options using R

June 16, 2013
By
Scenario analysis and trading options using R

I present you with my restructured project on options trading and scenario analysis. You are more than welcome to try it out. Firstly, I will give a small presentation that will reveal what you can do with it and whether you need to continue reading. T...

Read more »

Top 100 R packages for 2013 (Jan-May)!

June 13, 2013
By
Top 100 R packages for 2013 (Jan-May)!

(This article was first published on R-statistics blog » RR-statistics blog, and kindly contributed to R-bloggers) What are the top 100 (most downloaded) R packages in 2013? Thanks to the recent release of RStudio of their “0-cloud” CRAN log files (but without including downloads from the primary CRAN mirror or any of the 88 other CRAN mirrors), we can now answer this question...

Read more »

Loading Historical Stock Data

June 1, 2013
By
Loading Historical Stock Data

Historical Stock Data is critical for testing your investment strategies. I illustrated all my back-test examples with getSymbols function from quantmod package. For example, following is a back-test comparison for a few portfolio allocation methods: The getSymbols function, from quantmod package, downloads historical stock prices from Yahoo Fiance. I often get questions about alternative ways

Read more »

If…then in Japan

May 30, 2013
By
If…then in Japan

If Japan starts to spiral out of control, then what do they do? A spiral would be a sudden move higher in JGB rates with a simultaneous crash in the Japanese Yen. Their response would be to try to slow the positive feedback loop through external interv...

Read more »

Intended or Unintended Consequences

May 28, 2013
By
Intended or Unintended Consequences

(This article was first published on Timely Portfolio, and kindly contributed to R-bloggers) A quick glimpse at the US 10y Treasury Bond rate since 2000 seems benign with low volatility and a general downward trend.require(latticeExtra)require(quantmod)US10y <- getSymbols("^TNX", from = "2000-01-01", auto.assign = FALSE)asTheEconomist(xyplot(US10y, scales = list(y = list(rot = 1)), main = "US 10y Yield Since 2000"))From TimelyPortfolioHowever,...

Read more »

R/Finance 2013 Is Coming Quickly…

May 5, 2013
By
R/Finance 2013 Is Coming Quickly…

There is about two weeks remaining until R/Finance 2013 - being held on May 17th and 18th at UIC in Chicago.  Make sure you register beforehand to ensure you have a spot, and – yes - you do want to come to the conference dinner on Friday.   I am particularly excited about the lineup of keynotes

Read more »

The Financial Crisis on Tape Part II

April 26, 2013
By
The Financial Crisis on Tape Part II

EDIT: I am aware of some browsers failing to load the github code below. I will try to improve this as soon as possible. Until then it may work better on www.joesdatadiner.com than at http://www.r-bloggers.com/. Finally all the code is availa...

Read more »

FasteR! HigheR! StrongeR! – A Guide to Speeding Up R Code for Busy People

April 25, 2013
By
FasteR! HigheR! StrongeR! – A Guide to Speeding Up R Code for Busy People

This is an overview of tools for speeding up your R code that I wrote for the Davis R Users’ Group. First, Ask “Why?” It’s customary to quote Donald Knuth at this point, but instead I’ll quote my twitter buddy Ted Hart to illustrate a point: I’m just going to say it.I like for loops in #Rstats,...

Read more »