Displaying 20 results from an estimated 200 matches similar to: "Basic Help with Zoo objects and trading days"
2007 Sep 27
1
converting numbers in "YYYYMM" format to last calendar day and last exchange trading day of the month
I have a vector that contains month and year in the format YYYYMM (e.g.“200701”, “200702”)
I wish to do to things:
1. I need to convert to a date that is the last calendar day of each month.
2. I need to convert this to a date that is the last U.S. stock-exchange trading day of each month.
Any advice is appreciated,
mymonths <- c(200701, 200702)
2008 Sep 26
2
bar and line plot
Hello All:
Using the below dataset how can I make a barplot with
Date(X) and NumEggs(Y) by Site. Then plot Temp(lineplot)
It seems really simple, but I am having a hard time trying to
do it by Site. Thanks
Date NumEggs Site Temp
1 2008-04-22 0 Massacre Flat (RK424.5) 51.20
2 2008-04-23 0 Massacre Flat (RK424.5) 50.80
3 2008-04-24
2005 Jun 16
3
Moving average
Good morning all!
I am attempting to superimpose a moving-average smoother onto a graph of
daily plots. These plots (in table[,2] below) span about 350 days and
looks very noisy. I'd like for this smoother to plot the average of each
group of 7 consecutive days (weekly) and show a line which joins these
series of averages. Given the definition of MA, the first and last points
will
2009 Mar 29
1
Data decomposition
Hi R users,
I have a time series variable that is only available at a monthly level for
1 years that I need to decompose to a weekly time series level - can
anyone recommend a R function that I can use to decompose this series?
eg. if month1 = 1200 I would to decompose so that the sum of the weeks for
month1 equals 1200, etc..
Many thanks in advance for any help.
--
View this message in
2007 Mar 28
2
aggregating data with Zoo
Is there a way of aggregating 'zoo' daily data according to day of week? eg
all Thursdays
I came across the 'nextfri' function in the documentation but am unsure how
to change this so any day of week can be aggregated.
I have used POSIX to arrange the data (not as 'zoo' series) according to day
of week, but am curious if I've missed if a similar option available
2007 Jan 30
2
R and S-Plus got the different results of principal component analysis from SAS, why?
Dear Rusers,
I have met a difficult problem on explaining the differences of principal
component analysis(PCA) between R,S-PLUS and SAS/STATA/SPSS, which wasn't
met before.
Althought they have got the same eigenvalues, their coeffiecients were
different.
First, I list my results from R,S-PLUS and SAS/STATA/SPSS, and then show
the original dataset, hoping sb. to try and explain it.
2012 Aug 03
1
How can I read time series data to create zoo objects if I have two title lines?
Hello,
This is a standard example in which I read the time series data from a
csv file and create a zoo object:
x0 <- read.csv(file="CPI.csv", header=TRUE)
time_0<-as.yearmon("1981-01")+(0:371)/12
x0zoo<-zoo(x0, time_0)
The data look like this:
TIME CPI CPI_food CPI_Clothes CPI_House CPI_Rent 198101 62.1 55.34
103.45 65.24 61.43 198102 63.16 56.95
2010 Aug 05
3
Date conversion
Hi all,
I am trying to convert all the dates (all days that are not Friday) in data
frame into dates to next Friday.
The following works but the result is returned as vector rather than the
original class.
It would be greatly apprecited if you could provide any solution to this
problem.
Many thanks in advance.
# Define arbitrary initial date value
ini <- as.Date("2010/1/1",
2011 Aug 17
3
Convert week value to date
Hello all,
I'm hoping to convert a decimal value for week of the year back to a date object.
Eg:
strptime(paste(2010,1:52,sep=" "),format="%Y %W")
I expected (hoped?) this would give me the date for Monday of each week. Instead, it's giving me 52 values of today's date.
Where am I erring?
Thanks
Michael
_______________________________________________________
2004 Jul 26
5
aggregate function
Hi all,
I have the folowing frame(there are more columns than shown),
1 2 3 4 5
Year Total Tus Whi Norw
1994 1.00 1830 0 355
1995 1.00 0 0 0
1995 1.00 0 0 0
1995 1.00 4910 4280 695
1997 1.00 0 0
2009 May 13
2
Dates and arrays
hi,
I have a and data frame with date-column and some other columns.
My first question is what is the fastest way to get the index of an
array if I know the value f.e
> x = c(4,5,6,7,8)
so i know the value is 6.. i.e. the index is 3. What I currently do is
loop over the array, I was thinking if there
is faster more direct way.
The next one...is I have a data frame one of the columns is Date
2008 Oct 07
1
column-wise z-scores by group
Hi,
I have a dataset of historical monthly temperature data that is grouped by
weather station. I want to create z-scores of the monthly data using a base
period of a subset of years. I subset the dataset first to include only data
from the years (V2) that make up the base period so I could calculate the
appropriate means and standard deviations
V1 V2 V3 V12 V15 V16 V19
84
2004 Jul 27
1
list problem
Hi all,
I have the folowing frame(there are more columns than shown),
1 2 3 4 5
Year Total Tus Whi Norw
1994 1.00 1830 0 355
1995 1.00 0 0 0
1995 1.00 0 0 0
1995 1.00 4910 4280 695
1997 1.00 0 0
2011 Mar 13
1
problem with looping formula through table
Dear useRs,
I am stuck with a piece of code and hope you could give me some pointers.
My aim is to calculate the lm-regression coefficients of individual stocks against an index. I am interested in both the coefficient and the pval. While I could do this manually for a select hand full, I hope to scale this up say for 30+ stocks (DAX-30, FTSE-100 etc.) to eventually have a matrix of coefficients
2008 Feb 18
0
Learn Stock Options Trading!!!! Free Basics Tutorial
Read the free tutorial on Options trading which can teach you the basics.
Start Option Trading with Knowledge and Minimum Risk. Read
More<http://workfromhomedepot.blogspot.com/2008/01/getting-ready-for-option-trading.html>
--
Yours Sincerely
Team, Share N Care Blog.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2007 Nov 07
0
Start Forex Trading as low as US50$
The Easy-Forex™ system enables you to trade with small amounts as well. You
can start using Easy-Forex™ even with an amount as little as $50! No bank
would ever offer you such an opportunity! Starting to trade with such small
amounts is the best way to get acquainted with the Forex marketplace. Ready
Now! Click on the link below to start trading and earning easy money Online.
2010 Mar 27
0
Error lm.fit(...) - pairs cointegrated trading
Hello guys,
I'm trying to do a pairs trading cointegration analysis on two stocks (AXAP
and AXANY), but I get an error that I don't understand...
Here's my code:
setwd("S:/Users/Alexis/Desktop/Essai") #chemin du dossier contenant les
donn?es
donnees <- read.csv("Data_R.csv", head=T, sep=";", stringsAsFactors=F)
library(xts)
dates <-
2010 Nov 07
1
High Frequency Trading
Hi R users,
Thanks in advance.
I am using R 2.12.0 on Windows XP.
My objective is to construct algorithms for High Frequency Trading.
May I request you to provide me information such as packages or tools please.
Thank you very much for the time you have given.
Regards,
Deb
[[alternative HTML version deleted]]
2011 Jun 09
0
Where can I download MetaTrader 4 for currency trading?
Is there a cost involved? I already have a brokerage, but can't get MetaTrader 4 through them. Do I need to be trading through a particular broker or other entity in order to get MetaTrader 4, or can I just download an independent version to my computer?
Metatrader 4 Download (http://www.hfx.com/en-US/Trading%20Tools)
Fx Solutions (http://www.hfx.com/en-US/Trading%20Tools)
2012 Nov 09
0
Chicago Based Trading Group Seeking Development Clerk
*Job Title: Trading Development Clerk
Job Description: Assist development team with backtesting, debugging,
creating, and deploying automated trading strategies. Clerk will work under
a lead developer and several traders to provide support to traders in real
time execution, in addition to the development staff with strategy
creation, troubleshooting and deployment. The ideal candidate would be