Python and data for quants
Building one-minute bars, part 1 of 3
FoundationMultiple choice
Building one-minute bars · Part 1 of 3
You hold a pandas Series trades of trade prices indexed by exchange timestamp, and build one-minute bars with bars = trades.resample("1min").last(), keeping pandas defaults. A strategy uses the bars to make a decision at each minute.
Which trades make up the bar labelled 09:31?
- ATrades from 09:31:00 up to but not including 09:32:00
- BTrades from 09:30:00 up to but not including 09:31:00, the minute that ends at the label
- CTrades after 09:30:00, up to and including 09:31:00
- DOnly trades stamped exactly 09:31:00.000
The worked solution is in Premium
The answer, the full working and the one idea to take away – for this and all 1,322 questions in the bank. Answer it in practice and your working is marked, with a known mistake named when you make one.
Report an issue with this question
Learn the method
More python and data for quants questions
- A backtest computes pnl = signal * returns, where both are indexed by day. What is wrong?Applied · Free solution
- You need the quote in force at the instant of each trade. Which join?Applied · Free solution
- Prices go 100 → 110 → 99. What is the total log return, to five decimals?Applied · Premium
- A feature is standardised by subtracting its mean and dividing by its standard…Advanced · Premium
- You build a ten-year backtest on the stocks currently in an index.Advanced · Premium
- The New York equity open is 9:30 local time.Foundation · Premium