This function takes in four arguments and retunrs a tibble of random walks.

```
ts_random_walk(
.mean = 0,
.sd = 0.1,
.num_walks = 100,
.periods = 100,
.initial_value = 1000
)
```

- .mean
The desired mean of the random walks

- .sd
The standard deviation of the random walks

- .num_walks
The number of random walks you want generated

- .periods
The length of the random walk(s) you want generated

- .initial_value
The intial value where the random walks should start

A tibble

Monte Carlo simulations were first formally designed in the 1940’s while developing nuclear weapons, and since have been heavily used in various fields to use randomness solve problems that are potentially deterministic in nature. In finance, Monte Carlo simulations can be a useful tool to give a sense of how assets with certain characteristics might behave in the future. While there are more complex and sophisticated financial forecasting methods such as ARIMA (Auto-Regressive Integrated Moving Average) and GARCH (Generalised Auto-Regressive Conditional Heteroskedasticity) which attempt to model not only the randomness but underlying macro factors such as seasonality and volatility clustering, Monte Carlo random walks work surprisingly well in illustrating market volatility as long as the results are not taken too seriously.

```
ts_random_walk(
.mean = 6,
.sd = 1,
.num_walks = 25,
.periods = 180,
.initial_value = 6
)
#> # A tibble: 4,500 x 4
#> run x y cum_y
#> <dbl> <dbl> <dbl> <dbl>
#> 1 1 1 5.27 37.6
#> 2 1 2 6.45 280.
#> 3 1 3 6.45 2090.
#> 4 1 4 6.54 15745.
#> 5 1 5 5.68 105131.
#> 6 1 6 8.70 1019531.
#> 7 1 7 5.59 6722066.
#> 8 1 8 4.48 36808756.
#> 9 1 9 7.86 326050204.
#> 10 1 10 6.24 2359341638.
#> # ... with 4,490 more rows
```