Automated System With Limit Orders

Quote from mindfull:

Thanks.

Have anybody tried SmartQuant? Just glanced at their site & they may just have the data and the platform at USD 300 per month.

I don't think they offer datas for this purpose, you
have to buy them, no alternative
 
NanaTrader,

What I was saying is that if you have means to do so you can in fact record all levels of the order book, their prices, and their volumes, at snapshots or each and every time any of them change. I have such data but it is not for sale. A good programmer could use such data to insert his orders into the book in a backtest at a precise level and make sure all of his order was executed. Again, this takes good data and some work to accomplish.

In terms of modeling limit orders without precise tick data you can do some compromises using probabilities of filling. Consider the case of entering a short limit order in a backtest. The market is at 100. You may get your signal to enter a short limit order at 102 and you only want your order in the market for 5 minutes. Three things can happen.

1) Data shows no executions ever touch your price.
2) Data shows an execution at your price but none higher.
3) Data shows an execution at your price and many executions higher than your price.

So in case 2 you're not sure you would get filled in realtime but you could assign a probability of this of say 20%. Here's what the code would look like.

if max(market(bar:bar+5))>limitprice,

%record your trade here at limitprice

else

if max(market(bar:bar+5))==limitprice,
prob=0.20;
didwefill=rand(); %random number between 0 and 1
if didwefill <=prob,

%record your trade here at limit price

end;
end;

end;

Did you get that? See how if our random variable fell under 0.20 (20%) we allowed the fill to process, but if not we did not?


Also why is it a bad idea to use auto papertrading as a validation if you do it properly?
 
paper trading is fine for weeding out code errors, logic errors and understanding the dynamics of what you are doing.

But I think it's prudent to then give yourself a trial period of real trading with reduced capital before pronouncing the final evaluation. I think most people who have traded some decent size would agree with this point - the behaviour of depth/liquidity is quite .. unpredictable, and it's nuances cannot be captured in most simple simulations.

Just one man's opinion.
 
Quote from KS96:

Add a rule to fill your order with a probability,
let's say, 20%. That will do for backtest purposes.

this is a simple and good idea. It's always good to know what fill rate you need in order to stay positive. You'll always get filled on trades going against you, so there is a significant bias here.
 
Quote from opmtrader:


What I was saying is that if you have means to do so you can in fact record all levels of the order book, their prices, and their volumes, at snapshots or each and every time any of them change. I have such data but it is not for sale. A good programmer could use such data to insert his orders into the book in a backtest at a precise level and make sure all of his order was executed. Again, this takes good data and some work to accomplish.


How you can record 2nd, 3rd,..levels? I know you can
record screen shots in motion, but how you can save
them as price datas for testing?


So in case 2 you're not sure you would get filled in realtime but you could assign a probability of this of say 20%. Here's what the code would look like.

if max(market(bar:bar+5))>limitprice,

%record your trade here at limitprice
else
if max(market(bar:bar+5))==limitprice,
prob=0.20;
didwefill=rand(); %random number between 0 and 1
if didwefill <=prob,

%record your trade here at limit price
end;
end;
end;
Did you get that? See how if our random variable fell under 0.20 (20%) we allowed the fill to process, but if not we did not?


Is the codes in EL? I haven't seen max, market, bar:, prop,..


Also why is it a bad idea to use auto papertrading as a validation if you do it properly?
You mentioned "papertrader", which rised confusion for me
about manual simulation which is time consuming
 
I am a Quant Developer user, it does allow you to record quote and depth data from your data provider. However my guess is that trying keep a track of where your order is in the queue this way would be near impossible.

I think the idea of a randomised filter if a trade just touches youe quote is a good one. And if you really want to be pedantic then trade it live long enough to analise what the random filter should be set at.
 
Quote from toe:

I am a Quant Developer user, it does allow you to record quote and depth data from your data provider. However my guess is that trying keep a track of where your order is in the queue this way would be near impossible.

I think the idea of a randomised filter if a trade just touches youe quote is a good one. And if you really want to be pedantic then trade it live long enough to analise what the random filter should be set at.
You really sound like a quant, albeit of the random kind. Love to see you guys live in the market while trying out settings for random filters.
:D
PS: don't let any feelings of being pedantic hold you back.
 
"You really sound like a quant, albeit of the random kind. Love to see you guys in the market while trying out settings for random filters."

ha ha, sure but it seems he's tested it well enough to be otherwise confident in the system, and that this is the final confirmation he needs. He did say it misses trades in realtime trading (which are filled in backtest), he can only know that if he's traded it. So just use that data and dont be taken by no-nonsense :D

Also another way to do it without 'peeking' would be to set a limit order only after four trades have already been made beyond your limit. If you are filled then your trade will be the fifth trade beyond your limit (meaning you assume you are always fifth in the queue).
 
Back
Top