# Tag Info

3

To the best of my knowledge, the answer to your question is simply: no. Meta comments: I don't think your question ought to be closed as "out of scope", since you are not actually asking for anyone to write the function for you. My suggestion would be to write the function yourself and edit the question to include your attempt, making the focus of the ...

3

I do not see an elegant solution using TimeSeriesResample or the like using ResamplingMethod or MissingDataMethod. Maybe there is something undocumented? But programming something that does what you want does look straight forward imo: (* define a function to determine the gapsize for a given time *) gapsize = Function[ {ts, time}, With[ { ...

0

I'm not very familiar with AR processes, but I suspect that you might be looking for the following syntax: ARProcess[c, {a1, ... , ap}, v] which, according to the documentation, represents an AR process with a "constant" $c$, which I think is the same as the intercept you are looking for. For instance, compare the following: (* Intercept value = 2 *) ...

4

From the question formulation I am not sure what is the desired end result: a time series or a table. It seems to be the latter but I give solutions for both. I am using a sample of the stocks for clarity. stdate = "04/21/1982"; enddate = "10/31/2014"; rSP = {"ADP", "ALL", "CNP", "ED", "EMR", "EXPD", "FB", "FLIR", "HAR", "NEE", "OKE", "PHM", "PLD", ...

2

Working from what @MarcoB suggested, I came up with: ts5randomized = RandomSample[ts5["Values"]]; ts5randomizeSeries = TimeSeries[ts5randomized, {0, 999, 1}] ListLinePlot[ts5randomizeSeries] This appears to be what I needed. Thanks again @MarcoB!

3

Extract the path from the TemporalData object, then isolate the $y$ values and produce a random permutation using RandomSample; finally add back the $t$ values: ts5List = First@ts5["Paths"]; scrambled = Transpose@{ts5List[[All, 1]], RandomSample[ts5List[[All, 2]], Length[ts5List]]} ListPlot[scrambled]

2

One idea is to use RLink and some of R's time series libraries like 'ts' or 'zoo'. A very comprehensive overview is given here: "CRAN Task View: Time Series Analysis". Using RLink It is a good idea to have access to R's libraries in your machine. See Szabolcs Horvat's "Setting up RLink for Mathematica" . Then follow examples, say, from here: Quick-R: ...

1

sample = RandomFunction[ARMAProcess[{-.3, .1}, {.4}, 1], {0, 100}]; data = sample["States"][[1]]; As observed by @Rashid, if the first argument of CorrelationFunction is a TemporalData object (like sample), everything work as expected: ListPlot[CorrelationFunction[#, {20}], AxesOrigin -> {0, 0}, BaseStyle -> PointSize[Large], FillingStyle -> ...

Top 50 recent answers are included