sawtooth500
Newbie
- Messages
- 2
- Likes
- 0
So after a lot of work, I wrote and backtested my first algo. It does day trading, and to start I was focusing on TSLA. I have backtested it back to the TSLA IPO date and in summation:
-It averages about 0.7% ROR per day, with it being positive aroudn 58% of days.
-It takes on average 300 positions per day, with an average holding of of around 1:25 minutes.
-Average profit per trade is $0.009
I ran my model with zero commission, I can use a broker that has both API access and is commission free. I also did not account for slippage.
So my model uses the last traded price, which will typically be somewhere between the bid/ask. So I know that if I always buy on bid and sell on ask it will outperform my model, but if I use market or marketable limit orders it will underperform my model.
Also, with hyper liquid stocks on TSLA, I know that I will probably be filled with limit orders buying on bid selling on ask 90-95% of the time. My concern is how to handle those times I don't get a fill.
I am currently working to code in the API so that I can start trading and get actual data. Fortunately, for testing, I can trade 1 share size portions.
I was thinking of using a method where it tried to make a limit order first, but if not filled within a certain time period, say 5-10 seconds, just take the financial hit and replace it as another limit or a market order?
Also how important is latency here? I'm guessing the sooner I can get my order in, the better it will be. I know my broker uses the AWS datacenter in northern Viriginia, so I was considering spinning up an instance in that datacenter to have super low latency to the API endpoints.... thoughts?
-It averages about 0.7% ROR per day, with it being positive aroudn 58% of days.
-It takes on average 300 positions per day, with an average holding of of around 1:25 minutes.
-Average profit per trade is $0.009
I ran my model with zero commission, I can use a broker that has both API access and is commission free. I also did not account for slippage.
So my model uses the last traded price, which will typically be somewhere between the bid/ask. So I know that if I always buy on bid and sell on ask it will outperform my model, but if I use market or marketable limit orders it will underperform my model.
Also, with hyper liquid stocks on TSLA, I know that I will probably be filled with limit orders buying on bid selling on ask 90-95% of the time. My concern is how to handle those times I don't get a fill.
I am currently working to code in the API so that I can start trading and get actual data. Fortunately, for testing, I can trade 1 share size portions.
I was thinking of using a method where it tried to make a limit order first, but if not filled within a certain time period, say 5-10 seconds, just take the financial hit and replace it as another limit or a market order?
Also how important is latency here? I'm guessing the sooner I can get my order in, the better it will be. I know my broker uses the AWS datacenter in northern Viriginia, so I was considering spinning up an instance in that datacenter to have super low latency to the API endpoints.... thoughts?