#### 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

## Geometric versus arithmetic mean

In the next section, we discuss long-term return forecasting. Since we apply the weighted arithmetic and geometric means, we need to familiarize ourselves with the geometric mean first. For n returns (,, ) their arithmetic and geometric means are defined as follows:

In this formula, Ri is the stock's ith return. For an arithmetic mean, we could use the `mean()` function. Most of the time, the arithmetic mean is used in our estimations because of its simplicity. Since geometric means consider the time of values, it is considered to be more accurate for returns' estimation based on historical data. One important feature is that the geometric mean is smaller than its corresponding arithmetic mean unless all input values, such as all returns, are all the same. Because of this feature, many argue that using arithmetic means to predict future returns would lead to an overestimation. In contrast, geometric means would lead to an underestimation. Since the geometric...