Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Using Monthly Data and Fetcher

I'm using monthly data pulled in through fetch_csv. Because it is monthly, data.current does not allow me to pull the latest data point. Does anyone have any workarounds for this?

4 responses

You need to forward-fill the data to the "current" trading date of the simulation, in your pre_func (or maybe post_func)

Thanks, Simon. Can you point to any examples of how to do this? I'm in very basic python mode right now. For example, how does one refer to a specific point in the time series?

You should check the pandas documentation on how to reindex a dataframe and use it in your pre_func function. Maybe start here:

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.reindex.html

Thanks! I really appreciate the help.