Hi, I am trying to set up an algorithm in python that will trade the nearest date to expiry SPX (or other) futures contracts to only hold over the weekend with the two simple rules:

  • Buy on end of week just before close
  • Sell on market open after the weekend

I can see examples for this using schedule for normal stocks, but how would you do this for futures?

Thanks!