Can Alpaca provide a trading simulator for paper-trading on off-hours? Or weekends?
Seconding this. It would be really nice to be able to work with the API in the off hours for those of us who have a regular 9-5 to hold down.
+1 to this. I use the paper api mostly just for testing. It’s very hard to test if i’m at work when the markets are normally open. Maybe adding an extra boolean field to paper api orders to specify that it is just being used for testing purposes.
i made a sim in my old post
I have been wanting the same thing. I am at a point now where the next thing for me to do is test that my code works, purely from a technical perspective, while the market is open. But the best time for me to do that is not always while the market is actually open.
One option that might make this possible is to somehow set the paper API to a specific day and time from the past. Then time could move forward from that point as if time were passing normally from that point. So this would really be a simulation feature that could be used for backtesting simulation, where it would use the live market data from that time to simulate what might have happened, and allowing us to test our API code during off hours would just be a side benefit.
It doesn’t make sense to paper trade off hours. Paper trading is supposed to be with live data so you can test your strategy “as if” the real thing. What you guys want is a way to backtest. Backtest uses historical data, and therefore, can be run at any time. See https://www.investopedia.com/terms/b/backtesting.asp for more details.
Now, that being said, it would be really nice to have a backtesting platform where you set the start date, and all passes “as if” it was a real time scenario.
There are two kinds of testing someone might be interested in, testing whether their code works as intended, and testing your strategy. They are two different things. Backtesting is not necessarily what we are wanting, as that is more about testing your strategy. But if a backtesting feature was offered that allowed us to use the API as normal, it could kill two birds with one stone.
If you want to run your tests when the market is off, you can use Arcade Trader and its paper trading account. It’s a simulation but it’s pretty accurate, it can reach till the tick level. This means the entire market tape (billion of messages) is re-played from scratch and buy/sell are executed considering the real-time quote prices.
Check the 1st tutorial to see how you can write your own strategy in JS, Python, and very soon Natural Language: https://medium.com/@arcade_trader/algorithmic-trading-for-beginners-part-1-d6589d4beb05.
Arcade is FREE for personal use.