#### Overview of this book

Python for Finance
Credits
Acknowledgments
www.PacktPub.com
Preface
Free Chapter
Introduction and Installation of Python
13 Lines of Python to Price a Call Option
Introduction to Modules
Statistical Analysis of Time Series
Index

## The ARCH model

Based on previous arguments, we know that the volatility or variance of stock returns is not constant. According to the ARCH model, we could use the error terms from pervious estimation to help us predict the next volatility or variance. This model was developed by Robert F. Engle, the winner of the 2003 Nobel Prize in Economics. The formula for an ARCH (q) model is presented as follows:

Here, is the variance at time t, is the ith coefficient, is the squared error term for the period of t-I, and q is the order of error terms. When q is 1, we have the simplest ARCH (1) process as follows:

### Simulating an ARCH (1) process

It is a good idea that we simulate an ARCH (1) process and have a better understanding of the volatility clustering, which means that high volatility is usually followed by a high-volatility period while low volatility is usually followed by a low-volatility period. The following code reflects this phenomenon:

```import scipy as sp
sp.random.seed(12345)
n=1000 ...```