Reading Historical Chinese Fund Data in a Backtest
Summary
This short BigQuant support exchange explains how to obtain historical fund data for use in a backtest. It recommends reading the fund bar data source with a start date and end date, with the backtest's current date supplying the endpoint. The example describes requesting a window of 40 calendar days and returning the result as a DataFrame, which can then support rotation logic or other strategy calculations.
The response gives two alternatives: read the data source from within the backtest, or pass in a DataFrame loaded outside the backtest and slice it as needed. It addresses data access and date-window handling rather than proposing an investment strategy or reporting trading results. The example is brief and does not discuss data availability, whether the requested calendar window contains 40 trading sessions, missing observations, or alignment with portfolio decision timestamps. Those details need to be handled by an implementation using the data.
Key ideas
- Historical fund bars can be read from a data source using explicit start and end dates.
- A backtest can set the end date from its current simulation date and request a prior calendar window.
- Loaded data can be sliced as a DataFrame, whether it is obtained inside or outside the backtest.
- A calendar-day window does not by itself guarantee a fixed number of trading observations.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.