[R-SIG-Finance] Base R question on XTS object

wlblount bill at easterngrain.com
Wed Apr 10 11:45:45 CEST 2013


before the days of all these great packages, how would one with base R access
only find the following assuming i have an XTS object with normal OHLC price
data for 100 periods.


1 - change in price from yesterday to today.  close[today] -
close[yesterday]

2 -rolling or moving simple ave. of close[last 30 periods]

3 - rolling or moving sd of close[last 30 periods]

i understand that this would all be done with quantmod /ttr etc today but
would just like to stay within the bounds of base R for educational
purposes.  

thanks for your help.  Bill






--
View this message in context: http://r.789695.n4.nabble.com/Base-R-question-on-XTS-object-tp4663858.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list