Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
overnight returns based on four factors model(1st backtest)

It's my assignment for investment seminar in university.
I have done a backtest for overnight return based on four factors model for one month. The strategies are as followings:
1.Create four factors model based on the paper: https://arxiv.org/pdf/1410.5513.pdf; Those factors are: size factor,momentum factor, volatility factor and volume factor.
2.Trade Q1500US equities
3.Make the ranking for every factor,and then take an average ranking for the four factors.
4.Trade according to the average ranking for the combined four factors ranking.Short the bottom 100 equities and long the top 100 equities.
5.Set the leverage :long 0.5;short-0.5
Questions:
1.I don't know if I wrote the code for overnight return in a right way.
2.It took a long time for backtesting. Even if I just use one month data, it took nearly 10 mins.
3.linear regression should be considered next step.