# 9.32:  Generate daily stock prices.  The following code generates synthetic daily stock prices for
# 120 days (add an integer argument to .head() to see more rows).

import pandas as pd
import numpy as np

np.random.seed(0)

dates = pd.date_range(start='2023-01-01', periods=120, freq='D')

prices = 100 + np.cumsum(np.random.randn(120))  # synthetic price series

df = pd.DataFrame({'date': dates, 'close': prices})

df.head()

