Working on some execution optimisation related backtesting. I have so far been executing with market orders only. Going towards higher lot sizes, I'd like to optimise for minimal slippage.

First off, on NSE, if you place a market order, you get filled at the best bid/ask right?
If we want to optimise this, the first non-creative idea one can think of is, slicing the order into different lot sizes, and placing a limit order for each slice at the mid point of current best bid & ask.

But this requires your latency to be the least.
Why would latency affect it?

I looked at tick historical data, and there are more than 18-20 ticks in a second (auction and quote combined).

Even if you keep 10 ticks per second, your best bid/ask can shift from the time you place to the time exchange receives the order.
So, the next best thing that people can do is place tranches of orders every 1s, 3s, 5s, 10s, 15s - in their preferred time range, and get filled at the midpoint or best-bid+1/2/3/4/5 in the depth.

What you need is liquidity.
But if you're trading breakouts, then it's highly likely that your limit orders may not get filled if the action is too fast.

So, a retry mechanism is required in such cases.

If nothing works, you convert your orders to marketable and get filled at worse slippage.
But such scenario happens like once or maybe twice a month. 90% days, you would have your limit orders filled - this is what I have learnt from other people.

Now, what I am trying to do is to understand whether I can minimise slippage working with market orders only.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Shravan Venkataraman 🔥🚀💰

Shravan Venkataraman 🔥🚀💰 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @theBuoyantMan

20 Mar
Becoming wealthy and free is often a matter of hard work. But doing it peacefully is a matter of luck.

When you're single: Your parents and how they treat you, how your equation with them is - will largely impact how you do in life.
When you're married:

Your equation with your spouse, her equation with your parents, your equation with her parents, and her parents' equation with your parents and vice versa, all of these things will impact your life.
If you're a man, no matter what happens anywhere, ultimately everything and everyone end up smashing your head only.

So, to be able to work and take pressure/stress at work, it's important to have peace at home.

If that's not available, journey is 10x harder.
Read 13 tweets
20 Mar
Many seem to have misunderstood this.

If you have a well backtested system, chances are it will continue to work for a long time.

For beginners though, starting to trade your system when your system is in a drawdown helps maximise the probability of wins nearby.
That said, you don't really have to WAIT for that drawdown to happen to start trading your system.

You can keep trading the system in forward testing phase where you are trading fixed lot size, very conservatively.

You can use drawdown period to start aggressive compounding.
And that's also why I said that once you start trading a system, you can't stop taking trades.

That's where you can't time - once you start, you have to take all the trades, and shouldn't try and time the system's drawdowns and equity highs.
Read 6 tweets
20 Mar
Usually, there will be a phase in life where nothing you do seems to be working. Sometimes no matter how much you try, most of it will be short lived, you wouldn't have clarity or much work to do.

This is the phase you should do background work in and keep PREPARING.
In this phase, it's important you don't let your frustration get to you or reflect in your behavior to your family members.

It's easy to be lost in the failures and be rude to your beloved ones. I was too.

But, if you're sincere and hard working, you will have a breakout.
The key here is that even when you're down and out, you have to believe that you will have a breakout.

You're not cheating anyone, you're not a scoundrel. You're sincerely working hard towards something that will help you help yourself, your family, and beloved ones.
Read 41 tweets
18 Mar
Yesterday, we had a meeting with a trader who joined in 2017 and part of the first batch of energy traders at our branch.

These are both traders who trade based on fundamentals, lowest churn and roundtrips done every month, but most of the months profitable type traders.
These guys used to work upwards of 15-16 hours every day in their first two years, and even come in during weekends to do fundamental research and backtesting, understanding what has happened historically in the 10 years prior.
Since this is energy market, they went back in time through every year, and understood different things.

How markets react during and after hurricanes that affect US Gulf coast, how the demand and supply metrics affect price, how the spot market affects futures, and so on.
Read 21 tweets
16 Mar
The Python Backtesting course Update:

First batch of the course is in the 9th week of the 12-week duration.

So far we have had many wonderful people taking active part in initiating discussions that have been useful to many.

Quite happy with the progress they are all making.
1/ I am quite happy a lot of them have advanced to a level of writing code that only programmers with 1-2 years of continuous code writing experience can write.

But it is also frustrating to them because they all think they are lagging and not doing well at all.
2/ In reality, they are writing code like a BTech 3rd year student, without any Computer Science background or training.

Some have even picked up coding after 10-year gap and have done wonderfully well with the course so far.
Read 28 tweets
3 Mar
How to generate trading strategies:

1) Data mining
2) Observation

Observation is simple. You observe and read charts bar by bar for a long period of time. Write down some patterns that crop up.

Test the pattern, if it has good risk-reward metrics, trade it.
Data mining is a bit more complicated.

Come up with different factors that could affect the markets.

It could be

- Seasonality (day of week, week of month, month of year)
- price based factors (highs, lows - combined with seasonality - previous day, previous week/mo/y)
- Time based factors (enter upon x mins after open, exit x mins before close, enter on x day, exit 1/2/3/4 days/weeks/months later)

- Volume based factors (decreasing volume, increasing volume, > x * average volume, etc.)

- Volatility (increasing vix, decreasing vix, etc)
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!