Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

which time series class to use in R for financial data?

for working with financial time series, like daily stock prices or intraday data, which time series packages are preferred? xts, plain zoo, or timeSeries or something else? I use both xts and zoo, but sometimes not sure to use xts exclusively or sometimes zoo have advantage of lighter overhead; also, I remembered a review paper on all these packages by Rmetrics, which claims that xts cannot even finish some tests they did. But I cannot find the paper now.

like image 844
ahala Avatar asked May 28 '10 19:05

ahala


People also ask

Is time series used in finance?

Financial analysts use time series data such as stock price movements, or a company's sales over time, to analyze a company's performance.

How do you make a time series data in R?

Creating a time seriesThe ts() function will convert a numeric vector into an R time series object. The format is ts(vector, start=, end=, frequency=) where start and end are the times of the first and last observation and frequency is the number of observations per unit time (1=annual, 4=quartly, 12=monthly, etc.).

Which function in R is used for time series analysis?

Time Series in R is used to see how an object behaves over a period of time. In R, it can be easily done by ts() function with some parameters. Time series takes the data vector and each data is connected with timestamp value as given by the user.

What is financial time series forecasting?

Time series forecasting uses information regarding historical values and associated patterns to predict future activity. Most often, this relates to trend analysis, cyclical fluctuation analysis, and issues of seasonality. As with all forecasting methods, success is not guaranteed.


1 Answers

I am rather happy with xts and zoo and alternate between the two.

Nothing forces you to use one exclusively. As zoo is a little older, some packages interface it rather than xts. But xts has extensions which provide extra functionality (e.g. the indexing) which make it a valid option.

Other folks may be perfectly happy with Rmetrics classes. It all depends, and is to some extent a matter of personal preferences.

like image 156
Dirk Eddelbuettel Avatar answered Oct 05 '22 02:10

Dirk Eddelbuettel