time-series

time series forecasting (eventually with python)

which algorithms exist for time series forecasting/regression ? what about using neural networks ? (best docs about this topic ?) are there python libraries/code snippets that can help ? ...

How can I apply the AIC criterion to time series data using MATLAB?

As part of the Econometrics Toolbox, how can i apply the AIC criterion to time series data using MATLAB. Is there any way without using GARCH functions such as garchfit. If the only way to AIC is to apply GARCH functions, what is meant by number of parameters?? ...

Naming suggestion for a class containing a timestamp and a float value?

I need to name this structure: struct NameNeeded { DateTime timestamp; float value; } I will have arrays of this struct (a time-series). I'd like a short and suggestive name. The data is financial (and Tick is not a good name). The best one I can think of is DataPoint, but I feel that a better one exists :) How would you na...

R XTS package to.minutes3

Hi, I try am trying to use the "to.minutes3" function in the xts package to segment my data. This function does correctly put the time column into the desired intervals. But data columns becomes "open" , "close", "high" and "low". Is there are way tell the function to average the data points that fall into the same interval? Thanks, ...

Plotting two variables as lines using ggplot2

Hi all, A very newbish question, but say I have data like this: test_data <- data.frame( var0 = 100 + c(0, cumsum(runif(49, -20, 20))), var1 = 150 + c(0, cumsum(runif(49, -10, 10))), date = seq.Date(as.Date("2002-01-01"), by="1 month", length.out=100)) How can I plot both time series var0 and var1 on the same graph, with date on the ...

What is the best way to store Time Series in MySQL?

I want to store a large number of Time Series (time vs value) data points. I would prefer using MySQL for the same. Right now I am planning to store the time series as a Binary Blob in MySQL. Is this the best way, what would be the best approach. ...

R: Simplify this. Ave or Aggregate with several inputs

How can I write this all in one line? mydata is a zoo series, limit is a numeric vector of the same size tmp <- ave(coredata(mydata),as.Date(index(mydata)),FUN = function(x) ( (cummax(x)-x )) ) tmp <- (tmp < limit) final <- ave(tmp,as.Date(index(mydata)),FUN = function(x) cumprod( x) ) I've tried to use two vectors as argument to ave...

What is the most efficient data structure to store time series of partially changing array?

Hi All, My problem is I have an array of objects of size N. after every time (t+1), some of the values of the array may or may not change. so lets say t+1 index 15 changes but everything else stays the same. What is the most efficient way to store something like this (in memory ) apart from just having an array of arrays of course? I w...

Read xts from CSV file in R

Hi, I'm trying to read time series from CSV file and save them as xts to be able to process them with quantmod. The problem is that numeric values are not parsed. CSV file: name;amount;datetime test1;3;2010-09-23 19:00:00.057 test2;9;2010-09-23 19:00:00.073 R code: library(xts) ColClasses = c("character", "numeric", "character") Da...

Detecting rare incidents from multivariate time series intervals

Given a time series of sensor state intervals, how do I implement a classifier which learns from supervised training data to detect an incident based on a sequence of state intervals? To simplify the problem, sensor states are reduced to either true or false. Update: I've found this paper (PDF) on Mining Sequences of Temporal Intervals ...

time series in R

hello, here is my question: i have these data summary(data) Date 1990/01: 1 1990/02: 1 1990/03: 1 1990/04: 1 1990/05: 1 1990/06: 1 (Other):242 attribute Min. :164.9 1st Qu.:201.5 Medi...

Creating a irregular time series to a regular time series

Hi all, I am having a problem when converting irregular time series to regular time series. Below a simplified example can be found: require(zoo) t <- as.character(c(1981,1984,1985)) d <- c(1,3,6) dt <- data.frame(d,t) t <- as.Date(t,"%Y") z <- zoo(d,t) plot(z) ts.d <- as.ts(as.zooreg(z,freq=1)) # create a regular ts object ts.d # regu...

How do I sample n values at random nearest to value y when the data aren't continuous?

I have a dataset that includes a list of species, their counts, and the day count from when the survey began. Since many days were not sampled, day is not continuous. So for example, there could be birds counted on day 5,6,9,10,15,34,39 and so on. I set the earliest date to be day 0. Example data: species counts day Blue tit ...

Discrete Derivative in SQL

I've got sensor data in a table in the form: Time Value 10 100 20 200 36 330 46 440 I'd like to pull the change in values for each time period. Ideally, I'd like to get: Starttime Endtime Change 10 20 100 20 36 130 36 46 110 My SQL skills are pretty rudim...

How can I create a time-series array so I can have a bar graph in Ruby on Rails?

I have a model, ContactEmail that has a date_sent attribute and an email_id, referencing another model Email. I would like to create a bar graph which shows on the x-axis dates and on the y-axis the number of ContactEmails that were sent on a specific date. I would like to also do the same, filtered for ContactEmails where email_id equ...