Chapter 9. Financial Time Series
Financial time series are the backbone of almost everything in this book: prices, returns, volumes, FX rates, and index levels all arrive as timestamped data. This chapter shows how to load, inspect, and clean such series with pandas so that later chapters can focus on analytics rather than wrestling with CSV quirks.
The chapter shows how to load end-of-day (EOD) price data from CSV into well-structured
pandas objects, configure a robust local/remote loading workflow, and handle common
pitfalls around indexes, date parsing, and missing data. It explains how index_col and
parse_dates change the resulting DataFrame, how to inspect structure with .head(),
.info(), .dtypes, .shape, and .index, and how to validate imported time series
before running analysis on top of them.
To follow along, you need a working python environment with pandas and numpy
installed, local access to data/eod_data.csv or the remote fallback at
hilpisch.com/eod_data.csv, and familiarity ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access