Time Series
A sequence of values recorded in time order, such as daily closing prices. The order carries information, so the values cannot be shuffled without changing their meaning.
A time series is data indexed by time: one value, or one row of values such as OHLCV, per period. Prices, returns, volume and account equity are all time series. In pandas, a Series or DataFrame with dates as its index is the standard way to hold one, and operations such as shift, rolling and resample work along the time axis.
Time order changes the rules of analysis. Each calculation may only use values from earlier in the series; using later ones introduces look-ahead bias. Neighbouring values are often related, so methods that assume independent observations can overstate how much a sample shows. And the process generating the data can change over time, which makes the past a less reliable guide than in many other kinds of data.
Practical checks come first: are the timestamps in order, unique and in the expected time zone? Are there gaps for holidays or missing data, and are the values at each timestamp what they claim to be?
On the desk
A year of daily closes indexed by date is a time series of about 252 values. Shifting it by one row lines each close up with the previous day's, which is how daily returns are calculated without looking ahead.
