Generating a random time series

Ashu
Sept. 16, 2014

About the application and Why Use It

This application allows a user to create a non stationary time series with “N” number of points. The series is generated by passing a normal distribution of “N” points to diffinv function of R

Why Use this Application

Time series analysis is the science that allows us to look at sequential data that is collected overtime and understand the randomness to define existing trends. An example use case will be to analyze market data and define a portfolio with known risk and expected returns.

This application allows you to interact with building blocks of time series data.

How to use this application

You may generate a time series with a minimum of 100 points and a maximum of 1000 points in steps of 100. Steps involved:

  • Define the number of points in the series by selecting the “Number of Points (N)”
  • Click “Submit”

Code logic on backend

The basic idea is to take the input selected by the user and then generate a normal distribution of “N” points to diffinv function of R as shown below

x <- diffinv(rnorm(500));
summary(x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 -24.00  -13.60   -6.79   -5.22    2.66   15.00 

Finally the plot

plot of chunk unnamed-chunk-2