Testing on the weekends

I work during normal trading hours and am struggling to test my code. If i place a paper trading order on a Saturday it won’t execute it until monday so I won’t know if my code is working or not.

Is there a way to test my trading coding in offline hours?

What would be really helpful is to be able to simulate a timestamp in the trade execution. Maybe if that timestamp was left out it would treat it as “now”. But if the timestamp was included, then it would place the order at that datetime so the code could be backtested with the paper trading system.

I struggle with the same. A 24/7 simulated exchange including simulated trade/quote streams would be very helpful (would only have to be one or two stocks).

This is why I do my testing with crypto

How do you impelement crypto trading when trading with on trading iteration function, since it sais that market is currently closed.

I’m not sure if it’s even possible to implement because there are so many bits / time series which Alpaca probably don’t store for replay (e.g. NBBO, whether a stock is shortable at a given time). Not to mention if your strategy depends on historical data then in a “replay mode” setup you could easily peek into the future if the timestamps are not handled properly.

Or you are just trying to see if your trade bot interacts with the API correctly and handle edge cases?

No, I’m using lumibot and it’s Strategy method. The problem with it is, that I cannot trade on the weekends since it’s on_trading_iteration function only works when market is opened, no matter what you want to trade. Any alternatives, so that I can trade crypto on the weekends using alpaca API?