Using Foot Traffic Data to Trade Home Depot

Back

Hi everyone, 

As we all know we are in a pandemic, and retail stores have been hit exceptionally hard by this. One way to model the profitably or recovery of these stores is by analyzing their foot traffic. 

The algorithm uses foot traffic data purchased from SafeGraph to trade Home Depot. If the slope of the one-week simple moving average is negative we enter a short position and if positive we enter a long position. Also, trades are submitted every trading day at 8:30 am. 

Although the data set only looks back one month, the approach of using alternative data can provide investors with unique insights and patterns on the returns of a particular stock, ETF, or sector.

Some unanswered questions: What is the average spend per customer? Is there an inverse correlation between in-store sales and online sales?

To protect the IP of SafeGraph's data, the dropbox link included in the algorithm does not work. However, they are offering discounts for their data which can be found here.

 

Cheers,

Jovad Uribe

Update Backtest








 
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi Jovad,

Thanks for sharing this algorithm with the community! To continue its development, consider replacing the RollingWindows with SimpleMovingAverage indicators and warming them up in Initialize. Additionally, line 64 should be adjusted to read

self.SetHoldings("HD", -(self.investP*1.4), True)

so leverage is applied as intended.

Best,
Derek Melchin

1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi Jovad

Really interesting.  Do you think that one week is long enough?  It would be interesting to try to optimise by time frame.  Or another thought since market sentiment will lag foot traffic a lagging indicator like two moving average crossover might get a closer corralation to the market.

Just a thought.

Jeff

0

Hi Da dadaa, 

I do not think one week is long enough. If we had more than one month of foot traffic data, we could further optimize the timeframe. A lagging sentiment indicator would be very interesting to see. I think it would be very useful to validate or reinforce the algorithms predictive power.

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed