# 9.37:  Compare, align or join with another index using date-based alignment.  Create a second time
# series and join it to the existing DataFrame on the date index.

benchmark = pd.DataFrame({
    'date': pd.date_range(start='2023-01-01', periods=120, freq='D'),
    'benchmark_close': 102 + np.cumsum(np.random.randn(120))
})
benchmark.set_index('date', inplace=True)

joined = df.join(benchmark, how='inner')

joined.head()

