There are 2 parts of the strategies - low vol -> market marking buy at bid or sell at ask, and high vol, entering at market which should be less frequent.
The low-vol part definitely does not care about commissions as it is kind of market-marking/collecting bid-ask.
The trick is to use tradestation which probably has very imprecise (and mostly optimistic) modeling of fill of limit orders.
The Mathematics of Scalping
-
luli395
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
The Mathematics of Scalping
Mr. iwanttobelieve, thank you very much for your patient and detailed replies, but I still have some doubts about the trading rules. I'm not sure if my understanding is correct: After entry,set both -s and p a few sigmas away from entry, so that price will reach neither of them during preset period of time T. At end of this period of time T, position is covered. The exit price can be any point between -s and p, therefore
Pnl = N x E[ X | -s \le x \le p] ~ sum_{i=1}^N PNL(i).
Pnl = N x E[ X | -s \le x \le p] ~ sum_{i=1}^N PNL(i).
-
iwanttobelieve
- Posts: 1
- Joined: Thu Jan 01, 2004 12:00 am
The Mathematics of Scalping
Ok let me try to clarify. I cut the day in 390 1 minute periods. The trading strategy is:
At the begining of any period:
1] Enter the market if you do not hold any position, and put stop loss 's' ticks away and profit taking 'p' ticks away.
If you do already have a position, then re-center 's' and 'p' with respect to the current point.
2] During each 1 min period, either you get stopped at 's', or take profit at 'p', or you stay within the range.
I modified the argument so that there are many 1 min samples, and it is easier to visualize a distribution. In the original argument, I find it is not very clear what distribution we are looking at - because the time to hit 's' or 'p' is variable. This of course still is not rigorous - but this gives some insight. Here I am looking at the 1min return distribution - as I can be stopped early, if you want really want to push it, you can use some most-likely path argument, to say that if you end-up outside of 's', 'p' you most likely hit 's' and 'p' before and vice-versa. This valid when the time goes to zero.
At the begining of any period:
1] Enter the market if you do not hold any position, and put stop loss 's' ticks away and profit taking 'p' ticks away.
If you do already have a position, then re-center 's' and 'p' with respect to the current point.
2] During each 1 min period, either you get stopped at 's', or take profit at 'p', or you stay within the range.
I modified the argument so that there are many 1 min samples, and it is easier to visualize a distribution. In the original argument, I find it is not very clear what distribution we are looking at - because the time to hit 's' or 'p' is variable. This of course still is not rigorous - but this gives some insight. Here I am looking at the 1min return distribution - as I can be stopped early, if you want really want to push it, you can use some most-likely path argument, to say that if you end-up outside of 's', 'p' you most likely hit 's' and 'p' before and vice-versa. This valid when the time goes to zero.
-
luli395
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
The Mathematics of Scalping
Thank you,Mr. iwanttobelieve. You've been very helpful. Now the trading strategy is very clear, but I have several other questions:
1. why is the expected profit suposed to be E[ X | -s \le x \le p] ? How to derive it mathematically?
2.Could you explain “you cannot shift the expectation in case of gaussian distribution. That is why it would not work with gaussian distributions (unless you have zero bid-ask of course)” ?
Thanks again.
1. why is the expected profit suposed to be E[ X | -s \le x \le p] ? How to derive it mathematically?
2.Could you explain “you cannot shift the expectation in case of gaussian distribution. That is why it would not work with gaussian distributions (unless you have zero bid-ask of course)” ?
Thanks again.
- radikal
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
The Mathematics of Scalping
I do think that recognizing that predicting higher order moments can be more useful than just mindlessly fitting models to minimize R2, but a few issues:
- You cannot just re-center s and p at your current observation. (This leads to potentially infinite losses and practically goes against the general trading mantra of 'puke losses early so you can get back to new trades')
- Practically the cost function that maps your features to your predictions in your alpha model should be driven by whatever cost function you end up with after optimizing s and p, no? To be honest, I often HAVE to convince people that a strategy is +EV by demonstrating +R2 first, but that's not really the "right" way to tune the prediction model. (You can get pretty good milage I guess by clipping your outcomes to s and p but then your optimization problem is refitting your alpha model at each s,p combination)
- Obviously, your test set needs to not be included in any of the parameter searching for the alpha model or the stop-loss parameters.
- You cannot just re-center s and p at your current observation. (This leads to potentially infinite losses and practically goes against the general trading mantra of 'puke losses early so you can get back to new trades')
- Practically the cost function that maps your features to your predictions in your alpha model should be driven by whatever cost function you end up with after optimizing s and p, no? To be honest, I often HAVE to convince people that a strategy is +EV by demonstrating +R2 first, but that's not really the "right" way to tune the prediction model. (You can get pretty good milage I guess by clipping your outcomes to s and p but then your optimization problem is refitting your alpha model at each s,p combination)
- Obviously, your test set needs to not be included in any of the parameter searching for the alpha model or the stop-loss parameters.
There are no surprising facts, only models that are surprised by facts