A DataFeed is the stream of bars that Cerebro replays. Each bar holds a date, the OHLC prices (open, high, low, close) and the volume.
With pandas, you read your CSV with dates as the index (index_col=0, parse_dates=True), then create bt.feeds.PandasData(dataname=df). By default it looks for columns named open, high, low, close and volume.
You can limit the tested period with fromdate and todate. Keeping the last years aside leaves you out-of-sample data to check your strategy later.
Beware of raw data: an unadjusted split looks like a crash. For a multi-year backtest, use adjusted prices.
Examples
OHLC-X (fictional market) : Each candle is one line of the file: its body runs from open to close, its wicks touch the high and the low. The framed candle shows how a single OHLC line becomes a candle.
Apple’s split in August 2020 : At the end of August 2020, Apple split its stock by 4 (a 4-for-1 split). In unadjusted data the price seems to fall about 75% overnight, although the value held did not change: a backtest on that raw data would trigger false signals.