Skip to contents

Generate forward and backward asset stats by windows.

Usage

ff_hfid_invest_winstats(
  df_asset_loan,
  df_invest,
  df_invwin_uniq,
  bl_compute_sum = TRUE,
  bl_compute_mean = TRUE
)

Arguments

df_asset_loan

Dataframe household-month balance sheet data, Step B of PrjThaiHFID-issue-5.

df_invest

Dataframe household-asset-invest invest date and amount by each inv var, Step C of PrjThaiHFID-issue-1.

df_invwin_uniq

Dataframe output of ff_hfid_invest_window().

bl_compute_sum

Boolean if compute sum across months in window, either bl_compute_sum or bl_compute_mean must be TRUE, or both TRUE.

bl_compute_mean

Boolean if compute mean across months in window, either bl_compute_sum or bl_compute_mean must be TRUE, or both TRUE.

Value

A dataset: Household X Investment (all investments including duplicate timing) X Asset X Aggregator.

References

PrjThaiHFID-issue-3

Author

Fan Wang, http://fanwangecon.github.io