Load a list of sampled random walks

The following produce a list of data.frame. Each one contains the same time period which goes from 0 to 100. 0 is the begining of the period and the only one time where the value of the random walk in not random (the value is actually equal to 0). 100 could be called "time to maturity", where the random walk get its last value.

rw <- RandomWalk::srwalkGenerator(n = 1000)

This is a summary of the first element of the list:

summary(rw[[1]])

Graph the random walks

ggplot2::ggplot(rw[[1]], ggplot2::aes(x = time_periods, y = random_walk_path)) + 
  ggplot2::geom_line()
# ggplot2::ggplot(dplyr::bind_rows(rw, .id = "uniqueID"), 
#                 ggplot2::aes(x = time_periods, y = random_walk_path, colour=uniqueID)) + 
#   ggplot2::geom_line(alpha=0.1) + 
#   ggplot2::theme(legend.position = 'none')

ggplot2::ggplot(dplyr::bind_rows(rw, .id = "uniqueID"), 
                ggplot2::aes(x = time_periods, y = random_walk_path, group = uniqueID)) + 
  ggplot2::geom_line(alpha=0.05) + 
  ggplot2::theme(legend.position = 'none')


AnthonyTedde/RandomWalk documentation built on Dec. 13, 2021, 11:02 p.m.