What's in a bar?
A single bar summarizes all trades in a time interval:
- Timestamp — start of the interval (epoch ms)
- Open — price of the first trade
- High — highest trade price in the interval
- Low — lowest trade price
- Close — price of the last trade
- Volume — total base units traded (or sometimes quote-notional)
Intervals: 1m, 5m, 15m, 1h, 4h, 1d. Shorter = more noise + more data; longer = fewer signals but cleaner.
Common pitfalls
- Forward-fill on illiquid coins: if no trades happen in a bar, Kraken returns the last close as o=h=l=c. Always check volume before computing indicators.
- Timestamp alignment: when you merge two symbols' bars, make sure you're using the SAME interval boundaries.
- Epoch units: some APIs return seconds, some ms. Always normalize.
Your task
Load the BTC daily dataset, compute the simple price return for every bar, and print the mean return.