@Steve - The economics of this idea kinda gets diminished by reducing the window size. At a minimum, the window size will need to ensure all stocks tested have data from 2 distinct balance sheets for each stock (minimum ~63 days). This will give a notion of the investment activity of each firm. I believe Fama/French use annual data in their paper. The window size is probably up for debate, by I personally think a year at a minimum is necessary to get true picture of whether the firms are "aggressive" or "conservative".
@Georges - Good idea! Despite the slow nature of this factor, have you thought about getting a little deeper in the morningstar data to possibly better reflect the investments being made by the firms? Maybe something like this for starters:
inputs = [morningstar.balance_sheet.total_assets, morningstar.cash_flow_statement.capital_expenditure]
window_length = 252
def compute(self, today, assets, out, total_assets, capex):
investment_ratio_0 = capex / total_assets
investment_ratio_1 = capex[-1] / total_assets[-1]
relative_investment_growth = (investment_ratio_1 - investment_ratio_0) / investment_ratio_0
out[:] = relative_investment_growth
(note, I did not test this in an algo yet, might have an error or be really slow)
Also, might even be little better to increase window size to ~260 days. This way if any companies have some lag time between respective annual reporting dates, you will be likely to catch that lag time and be calculating the change in investment using the full year.