================================================================================
PYTHON FOR ALGORITHMIC TRADING — COMPANION DATASETS
Nolan Whitfield / Waskey Press
================================================================================

WHAT THIS PACKAGE CONTAINS
--------------------------

10 daily OHLCV price history files, covering ~5 years (1,260 trading days),
for the exact ten-symbol universe used throughout this book — including the
Chapter 9 correlation examples and the Chapter 17 momentum rotation capstone:

  AAPL.csv    Technology
  MSFT.csv    Technology
  GOOGL.csv   Technology
  AMZN.csv    Technology
  NVDA.csv    Technology
  JNJ.csv     Healthcare
  UNH.csv     Healthcare
  XOM.csv     Energy
  JPM.csv     Financials
  PG.csv      Consumer Staples

Plus two additional files for the Chapter 18 pairs trading capstone:

  PAIR_A.csv
  PAIR_B.csv

Each file has the same column structure yfinance returns, and the same
structure Chapter 2 and Chapter 3's data pipeline expects:

  Date, Open, High, Low, Close, Adj Close, Volume


HOW TO LOAD THESE FILES WITH ALPHA'S DATA LAYER
-------------------------------------------------

import pandas as pd

df = pd.read_csv("AAPL.csv", parse_dates=["Date"], index_col="Date")

This is already in exactly the shape get_price_history() from Chapter 3
returns, so any function from the book that expects a DataFrame with a
DatetimeIndex and OHLCV columns will work against these files unmodified.
If you'd rather route it through Alpha's own caching layer, just drop these
files into your project's data/cache/ folder using the naming convention
Chapter 3 established (SYMBOL.parquet) — converting a CSV to Parquet is a
single line:

  pd.read_csv("AAPL.csv", parse_dates=["Date"], index_col="Date").to_parquet("data/cache/AAPL.parquet")


AN IMPORTANT, HONEST NOTE ABOUT THIS DATA
-------------------------------------------

These files are SIMULATED, not real historical market data.

They were generated to have realistic, teaching-appropriate statistical
properties on purpose:

  - The five technology names (AAPL, MSFT, GOOGL, AMZN, NVDA) are
    constructed to correlate with each other more strongly than with the
    other sectors, exactly reproducing the pattern discussed in Chapter 9.
  - JNJ and UNH (Healthcare) are similarly constructed to correlate with
    each other, and only weakly with the other sectors.
  - PAIR_A and PAIR_B are constructed to be genuinely, statistically
    cointegrated (Engle-Granger p-value ≈ 0.005 at time of generation),
    so Chapter 18's cointegration test will correctly detect them as a
    valid pair, and the pairs-trading signal built in that chapter will
    have genuine mean-reverting structure to trade against.

They are NOT a substitute for real market data, and they should never be
used to draw any actual conclusion about AAPL, MSFT, or any other real
company's stock. Their only purpose is to let you run every example and
exercise in this book immediately, offline, with results that behave the
way the book describes — without requiring a live data connection.

For real research, or before ever making any actual trading decision,
always use genuine historical data from a real provider. Chapter 2 and
Chapter 3 show you exactly how to pull that data yourself, for free, using
yfinance:

  import yfinance as yf
  df = yf.Ticker("AAPL").history(period="5y", auto_adjust=True)

Simply swap that real, live-fetched DataFrame in anywhere this book's
examples reference get_price_history() or a CSV from this package, and
every function, strategy, and backtest in this book will work identically
against real, current market data.


LICENSE
-------

These datasets are provided free of charge for personal, educational use
alongside this book. They may be redistributed only as part of this book's
companion package, unmodified.

Questions or corrections: www.waskeypress.com
================================================================================
