26 Comments
User's avatar
S M's avatar

This is another awesome post! Thank you for sharing your insights and expertise, am so grateful. I have had a go at recreating what you have shared, and I experimented with the parameters. I settled on 70% gap up and a SL of 30%, which gives a decent enough looking equity curve, (can't past chart here unfortunately), but not as good as yours. I think the SL is the problem. I tried 2 x ATR and fixed $ but still not as good as yours. Any pointers which will help me in the right direction? Thanks very much

Expand full comment
Niv Goren's avatar

can't share stops but just keep experimenting

Expand full comment
Alpha Alerts's avatar

Sometimes, small caps are difficult to short. Did you try the approach with eg. S&P 500 stocks? Would be very interesting to hear your thoughts.

Expand full comment
Niv Goren's avatar

Yes, it's way less profitable but there are many profitable large caps systems. For example there is one published by Laurens Bensdorp in his book The 30-minute stock trader. Also the one I wrote about here is mainly large caps - https://stonkscapital.substack.com/p/systemizing-kullamagis-parabolic

Expand full comment
Aniol Buxeda's avatar

Hey this is more relating to the first part but i'll ask it here anyway. I am currently automating my small caps strategies in Sterling ActiveX API (cheaper than das and atm i can't afford DAS), and i am wondering how you deal with halts, because in case there was a 1000% halt like you said there once was, will your account simply get blown, or is there any way to prevent that from happening?

Thanks and much love for the work and alpha you share with the community!!

Expand full comment
Niv Goren's avatar

There's no way to protect against the 1000% halt, not with automation or manual. You can only protect yourself with size.

Expand full comment
Aniol Buxeda's avatar

okey thanks, and i always wonder what data you're using, because i've heard lot of datas like polygon and stuff aren't good at all and i was wondering with your real market experience which one has been the best overall. Thanks!

Expand full comment
Niv Goren's avatar

Polygon is good enough and match my live trading

Expand full comment
Aniol Buxeda's avatar

alr thanks man!

Expand full comment
Nathan R's avatar

Hey Aniol, question, which broker are you using with the Sterling API? For Cobra, I thought Sterling was more pricey that DAS. As a side note, I got DAS to email me their client API code, and was not impressed. And also I heard from someone on the inside of 1 of the biggest clearing firms that Sterling's API is much higher quality.

Expand full comment
Aniol Buxeda's avatar

I use Zimtra, i am building it at the moment and in my opinion you can do everything you need (at least what i need because my bot is not for hyperscalping and stuff like that). In Zimtra you pay 60$ (if your buying power is less than 250k (less than around 75k balance) and 195$ for API. This prices are paid each 1st of month.

Expand full comment
ser's avatar

How do you manage overfitting? Thanks!

Expand full comment
Niv Goren's avatar

1. Divide the data into a few groups randomly, optimize based on small amount of parameters (I like up to 3 on 1000 of instances). Test if your expectancy is the same after applying the new parameters on out of sample data.

2. Keep it REALLY simple.

3. Use parameters that makes sense logically and try to come up with them on your own without randomly testing a ton of combinations until you find something that works

Expand full comment
ser's avatar

Thanks for the reply! You're in sample is usually 80% of the dataseta?

Expand full comment
Niv Goren's avatar

more like 50% on small caps

Expand full comment
ser's avatar

Just to let you know, it's your fault if I'm starting shorting small caps! 😄

Expand full comment
Niv Goren's avatar

Have fun with the infinite risk !

Expand full comment
Greg's avatar

Really helpful post thanks for sharing!

Do you have any pointers as to what overall profit factor to expect so I know I'm on the right track?

Expand full comment
Robin's avatar

Hi interesting! How do you get from FMP historical data from delisted stocks? So that you avoid survivorship bias in the backtest?

Expand full comment
Niv Goren's avatar

I have a list of delisted stocks from Polygon and some of them have earnings in FMP. Never really did a test of what percentage of the delisted db ACTUALLY have earnings reports in FMP, I need to check that.

Expand full comment
M. Strašek's avatar

I am interested—how many stocks do you usually use for backtesting your strategy? And how far back do you go?

Expand full comment
Niv Goren's avatar

I go as far back as Polygon let's me - 2008. Some will say going back to say 2017 is totally enough

Expand full comment
M. Strašek's avatar

And do you have any rules? For example, I want to test a strategy on at least 50 stocks. How do you decide which stocks to use for testing?

Expand full comment
Niv Goren's avatar

Not sure what you mean. Feel free to DM

Expand full comment
LarkusManz's avatar

Hey Niv, do you still do your backtesting with Python or do you nowadays use Spikeet?

Expand full comment
Niv Goren's avatar

Python

Expand full comment