Handling of the 1st Year of Data with 1-Year Moving Averages

I am using some longer-term moving averages, especially 1-year moving averages, in the asset allocation model, but as a result the meaningful asset allocations really start one year after the data starts, once it can start computing the full 1-year moving averages.


So I am just wondering if it would be possible to start the testing one year after the data starts? For example, in the sample data, which starts at the beginning of 2010, the asset allocations will start at the beginning of 2011. Is that all right, or should I rather add some logic to handle less than one year of data for the first year?


Thanks.

Hello Mjdhasan,


Very good question, I will give you a general answer so other users can also understand how things work on the platform.


The out of sample testing period is the same for all participants and strategies or it would not be a fair competition.

Taking time to calibrate a strategy has the same effect as cutting allocation: there are no returns generated (negative or positive) which will have an impact on annualized return in the backtest (as number of years is not adjusted for periods without allocation).


If you wish to have an allocation for 100% of the out-of-sample testing period, there are a number of ways you can achieve that:


Default to a standard portfolio allocation technique during calibration:

Qlib has many portfolio allocation functions you can use to quickly generate standard portfolios.

staticWeight() and equalWeight() are portfolio construction techniques that do not require any calibration period. You can also use more advanced ones like ercWeight(), maxSharpeWeight(), minVarWeight() or mostDivWeight() but they also require calibration periods.


You can check our webinar on how to use these functions.

Youtube: https://tinyurl.com/y7h38cpo

Alphien wiki: https://wiki.alphien.com/ALwiki/Webinar_for_Asset_Allocation_Alphathon


Use expanding windows for calibration:

Another approach would be to use an expanding window for your moving average until you reach the desired calibration period.


However, as you can see in the leaderboard, annualized return is only one of the many metrics used to assess strategies, alongside non time dependant metrics like Sharpe ratio or maximum drawdown.

I would also highlight that performance metrics are only indicators, the winner of the competition is selected by our sponsor based on both qualitative and quantitative criteria.


In summary, we build the out-of-sample testing to replicate a live trading environment. If you believe your strategy makes sense in a live trading setup, it will make sense in out of sample testing and for the sponsor.


Let me know if I can help you clarify things any further.


Aurian



Ok, got it, thanks!