Hey , I see your work on sensibull and also following you since few weeks I really wanted to learn how to build the strategies and work with algo , I'm seeking guidance from you , Tell me the whatever the books , course , articles from where I can learn , I'm just a intermediate in options. And want to update myself for better results. Right Now I just Know about technical analysis ( Chart Analysis) . No Coding knowledge. If you can give some time to guide me that will be great. Waiting for you reply….
For algo its better to start learning a programming language. Python should be good for this purpose. Then you can start by automating some things which you follow while trading.
Then you will be able to create strategies which are operations heavy and can be coded.
Hey Thank for your reply, we need only python or any other languages also like C , C++ or JAVA and secondly from where we can get knowledge of options that is needed to make strategies any resources or book recommendations?
Amazing work sir. I had a question and a suggestion:
Question: If you do both manual analysis and then execute via Algorithm. Doesn't it make it harder to handle because of human biases and also harder to backtest for a long period.
Suggestion: I am not sure if you use a spread while selling a chppy sideways market. If you don't then you can do something like make a 1-2-4 lots spread. When markets do make a big move they still mostly have to follow the 2 std deviation BB range so they do calm down usually. So in a 1-2-4 spread if markets hit your first position you can exit that and hold the other 2 further OTMs where the lots r more because it is more probable that it will not breach it. In which case you do cover some of the losses. This along with the trend following strategy you have could make risk management easier.
Thanks a lot for all the efforts you put. Looking forward to learning more and more.
The Algo says that it works on selling future or selling call option. Why only bearish? May be its by mistake, even if I assume its a PUT sell you're talking about. Then what would you buy when market falls? Its a bit confusing.
It works for any option contract for which it has been activated. So it sell CE or buy PE when market goes up. And do reverse, buy CE and sell PE when market moves down.
As of 7th Aug, there was a huge downtrend and complete reversal. You should have started with extractor strategy. At what point (Nifty spot) did your savior strategy triggered identifying its a trending move on one side?
Have some idea of a textbook example. Buy x lots of straddle. Your starting delta is 0. If underlying goes up, your delta will increase. As soon as the delta touches 1 (note that max delta in this case is +|- x for this strategy), short 1 lot of future bringing delta back to 0. Short another when delta touches 1 again (upto a certain limit which i do not know how to define, but perhaps till x). When the starting point is reached, close the short futures. Similarly, long futures when underlying goes down. Challenge with this strategy is that it cannot be done with small capital and the bigger challenge is fighting all that theta. So there is also a variant with short straddles but well, naked straddles are to be avoided. So we can think of wide iron flies instead but i do not know how it plays out.
Hey , I see your work on sensibull and also following you since few weeks I really wanted to learn how to build the strategies and work with algo , I'm seeking guidance from you , Tell me the whatever the books , course , articles from where I can learn , I'm just a intermediate in options. And want to update myself for better results. Right Now I just Know about technical analysis ( Chart Analysis) . No Coding knowledge. If you can give some time to guide me that will be great. Waiting for you reply….
I dont know chart analysis :(
For algo its better to start learning a programming language. Python should be good for this purpose. Then you can start by automating some things which you follow while trading.
Then you will be able to create strategies which are operations heavy and can be coded.
Hey Thank for your reply, we need only python or any other languages also like C , C++ or JAVA and secondly from where we can get knowledge of options that is needed to make strategies any resources or book recommendations?
Python is better. Please go through zerodha varsity options module for basic options understanding.
Great , Thank you so much for replies, Mean a lot 😀
Amazing work sir. I had a question and a suggestion:
Question: If you do both manual analysis and then execute via Algorithm. Doesn't it make it harder to handle because of human biases and also harder to backtest for a long period.
Suggestion: I am not sure if you use a spread while selling a chppy sideways market. If you don't then you can do something like make a 1-2-4 lots spread. When markets do make a big move they still mostly have to follow the 2 std deviation BB range so they do calm down usually. So in a 1-2-4 spread if markets hit your first position you can exit that and hold the other 2 further OTMs where the lots r more because it is more probable that it will not breach it. In which case you do cover some of the losses. This along with the trend following strategy you have could make risk management easier.
Thanks a lot for all the efforts you put. Looking forward to learning more and more.
please share your code and the hyper-parameters also so I can backtest on my side also
We will soon be sharing the code.
How are you going to mitigate the following problem in this? When market fells aggressively but recovers slowly?
Spot Action Qty Comment
24990 BUY 1 lot 75 market fell by a gap of more than 10
24970 BUY 1 lot 150 market fell by a gap of more than 13
24940 BUY 1 lot 225 market fell by a gap of more than 17
24951 SEL 1 lot 150 recovers by +10
24962 SEL 1 lot 75 recovers by +10
24973 SEL 1 lot 0 recovers by +10
Total Profit = (951 - 940) + (962 - 970) + (973 - 990)
= (11) + (-8) + (-17)
= -14
Even the sell will have the same multiplier as buy.
Also the algo buys max 1 this is to ensure that the position is a credit position to take theta gain.
ok cool, thanks for the answer!
Spot Action Qty Comment
24990 BUY 1 lot 75 market fell by a gap of more than 10
24970 BUY 1 lot 150 market fell by a gap of more than 13
24940 BUY 1 lot 225 market fell by a gap of more than 17
24951+7 SEL 1 lot 150 recovers by +17
24962+10 SEL 1 lot 75 recovers by +20
24973+13 SEL 1 lot 0 recovers by +23
Total Profit = (951+7 - 940) + (962+10 - 970) + (973+13 - 990)
= (11+[7]) + (-8+[10]) + (-17+[13])
= -14+[30] = 16
can you confirm this?
here we are trading on future, and market open price is 25000
The Algo says that it works on selling future or selling call option. Why only bearish? May be its by mistake, even if I assume its a PUT sell you're talking about. Then what would you buy when market falls? Its a bit confusing.
It works for any option contract for which it has been activated. So it sell CE or buy PE when market goes up. And do reverse, buy CE and sell PE when market moves down.
How do you manage position sizing for selling options? Any consideration around total margin to be used?
To have atleast 3x magin available on Monday morning, for deployed margin in next week expiry.
Can you please share the link for code/repo
Here is the repo link, we will keep adding more Lagos here.
https://github.com/Raahi-Bhushan/trading-algo
As of 7th Aug, there was a huge downtrend and complete reversal. You should have started with extractor strategy. At what point (Nifty spot) did your savior strategy triggered identifying its a trending move on one side?
I take 2 points into consideration -
1. My open positions. For that expiry place where delta really starts moving into -1800 and +1800 zone.
2. Supports and resistances of NIFTY, and then figure a point where I should say that it is a trending move.
As there was full recovery yesterday the trending move algo which is Survivor code gave loss and wave extractor gave profits.
Thanks Ji. Does your algo calculates delta or you track it manually?
It calculates it. Python has a library called mibian which does the calculation in the code.
Great Ji. Is there any other option greeks that you use in your program, apart from delta?
I don't think I calculate any other greek right now.
his Algo has survived the date 07-08-2025 this is beyond my imagination with this crazy move of both side and +0.5 % profit This is amazing
Thanks buddy, main reason for this was that I do not trade 0dte. Because of which I did not take any loss in this week.
Yes i saw keep growing your capital ✅👍
This is part gamma scalping (without the delta balancing act). Let’s think of a gamma scalping strategy!
I am not sure if it is gamma scalping. Will read more about it. Do you know more gamma scalping strategy?
Have some idea of a textbook example. Buy x lots of straddle. Your starting delta is 0. If underlying goes up, your delta will increase. As soon as the delta touches 1 (note that max delta in this case is +|- x for this strategy), short 1 lot of future bringing delta back to 0. Short another when delta touches 1 again (upto a certain limit which i do not know how to define, but perhaps till x). When the starting point is reached, close the short futures. Similarly, long futures when underlying goes down. Challenge with this strategy is that it cannot be done with small capital and the bigger challenge is fighting all that theta. So there is also a variant with short straddles but well, naked straddles are to be avoided. So we can think of wide iron flies instead but i do not know how it plays out.
Hmm k, didnt get it full...but will read more about it.