We aim to simulate an asset price trajectory over 251 days in a way that captures stylized observations about asset returns like volatility clustering, heavy tails, and serial correlation. A GARCH model is one way to capture these stylized observations. The GARCH model is an extension of the autoregressive conditional heteroskedasticity (ARCH) model developed by Engle in 1982. The acronym "GARCH" means "generalized autoregressive condition heteroskedasticity" model.
We model the log-return time series by

, where

is an independent, identically distributed sequence of properly scaled Gaussian random numbers. The variance is dynamic and is governed by the equation

. We refer to

as the "state memory factor" and

as the "variance memory factor". If

and

, then the variance does not change and we obtain a discrete white noise. Note that you also have control over the initial variance

.
We make three views available to the user. The first view features the volatility series

. The most important feature of a GARCH model is the non-constant volatility series. Notice, e.g. the first snapshot, that making the variance memory factor too small causes the volatility series to tend to zero—which produces an unrealistic model of a real asset's returns.
The second view features the log-return series. This series is used to construct the asset price in the third view. Again, notice that a poor choice of parameters—making the state memory or variance memory factor too large—generally causes the variance to explode.
Examples of state memory and variance memory factors that produce realistic-looking asset returns include (2.72, 0.99), (8.1, 0.97), and (16.3, 0.94). The GARCH models are generally quite sensitive to parameter choices. This sensitivity is problematic when estimating GARCH parameters from real data.
Instead of having the variance of today's return depend on yesterday's variance and yesterday's squared return, we could have allowed today's return to depend on the variance and squared returns from multiple prior days. In general, if the process depends on the past

days' squared returns and the past

days' variances, the process is called a GARCH

process. For sake of simplicity, we simulate only the log-returns and associated asset price of a GARCH

process.
Wolfram Research's
Time Series package makes it trivial to simulate GARCH processes, but you can still simulate these processes with a few lines of your own code.