Python and data for quants
You compute a feature with df.rolling(21, center=True).mean().
AppliedMultiple choice
You compute a feature with df.rolling(21, center=True).mean(). What is wrong in a backtest?
- ANothing – centring simply removes the lag from the estimate
- BHalf the window lies in the future
- CThe window length must be an even number for centring
- DRolling means are always slower than an exponential average
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
Of the kind reported at
More python and data for quants questions
- What does pd.Series([1, None, 3]).mean() return?Foundation · Premium
- For prices 100,110,99, what is the last value of pct_change()?Foundation · Premium
- A Series has 10 values. How many non-missing values does s.rolling(3).mean() contain?Foundation · Premium
- A signal that sees the future, part 1 of 3Foundation · Premium
- You add two pandas Series with partly different indexes. What do you get?Applied · Premium
- A daily signal is computed from each day’s close.Applied · Premium