[R] xts time series object removing time and leaving just the date

2013-03-07 Thread Douglas Karabasz
I have and XTS time series object that has date and time. I started with 1 minute data and used apply.daily(x, sum) to sum the data to one cumulative value. This function works just fine however it leaves a time for the last summed value which looks like this 2006-07-19 14:58:00. I need to just

[R] Fuction Error

2012-12-06 Thread Douglas Karabasz
I'm calling a list of symbols and then using a function to build a data frame from that symbol list. It works great until I introduce this index symbol from yahoo '^GSPC'. When and index symbol is introduced I get and error which is below. Data - symbolFrame(symbols) Error in get(S) :

[R] Time Series filter help?

2012-09-03 Thread Douglas Karabasz
I have a time series data with 1's and 0's. When the last 3 observations are 1 I want to generate a 1 until I have three 0's in a row and then I want it to produce all zeros again. For example if I have 0101010101 for the first part of the time series this would produce all zeros. Then if the

[R] Producing a SMA signal when closing price is above the moving average for 3 days

2012-09-03 Thread Douglas Karabasz
I have loaded price data for GE and then calculated a 50 day simple moving average. Then I have a created a ifelse statement that produce a 1 when GE's closing price is above the simple moving average and a 0 when GE Closing price is below the 50 day simple moving average. However, what I

[R] R: Help xts object Subset Date by Day of the Week

2012-08-05 Thread Douglas Karabasz
I have a xts object made of daily closing prices I have acquired using quantmod. Here is my code: library(xts) library(quantmod) library(lubridate) # Gets SPY data getSymbols(SPY) # Subset Prices to just closing price SP500 - Cl(SPY) # Show day of the week for each date using 2-6

[R] Time Series Have Date Show Days of the Week

2012-08-01 Thread Douglas Karabasz
I used quantmod to pull in price data from the ticker SPY. The data has date and closing price. I would like to show the day of the week for each closing price. Is that possible? Also, I would like to add the back into the data frame in a new column without changing the structure of the data