Back to Community
Novice looking to put together a gap strategy - any takers?

I am a capital markets professional who is a novice coder. I have had help producing systems in Trade Station but Python and Quantopian is completely new.

As such I am looking to see if anyone cares to help me build a simple gap strategy that I want to replicate for algo. Currently gap system is done manually so moving toward automation is key.
I can give more details for anyone willing to help get it going. Thanks.

9 responses

To give a bit more regarding the potential strategy:

1 - universe will be most liquid etfs - eventually could move to individual equity names
2- looking for etf's that gap open higher or lower from previous close(% of gap will be optimized later)
3 - after a period of time you would purchase above that periods high price(conversely would short below the period low price)
4 - stops would be in 2 stages
4a - stop below moving avg on time frame(would be optimized)
4b - stop on trade below low price of period of time(conversely if short entered)

Eventually building in scaling trade size and profit targets would be added.

This strategy has been produced in Trade Station before but now want to collaborate with some one(or multiple people) on here in this Python/Quantopian language.

Hi Mike,
Have you had any luck finding someone to help? I have a project posted here too with no responses.

Hey Terry, my guess is you will receive similar responses I got - if you even get any. I received people telling me they had interest in working together and then telling me they wanted salary of $3-5k. I laughed as I thought Quantopian was a site for collaborative work. Appears more of a place for coders or people who have worked at a quant fund to troll for ideas or paid work. I eventually found someone to help not from Quantopian and moved forward. Good luck and circle back if you find anyone on here interested in working collaboratively. I will do the same.

I'm sorry, but why would anyone do this for free? Collaboration is one thing, but, "code me this trading algorithm which may or may not be any good" is not collaboration, that's a working arrangement.

It's no different than being approached by dozens of startup entrepreneurs on the "business side" who are looking for a Technical Co-Founder to implement their idea for an iPhone app, which may or may not be any good, for free (or for "equity" in a company which will likely be dissolved if successful).

Personally, I have a ton of things to work on, from my paid job, to my own algorithms, to research and development on the next algorithms - I don't have free time to do free work for people, who does? I contribute freely to this forum to help people in general, and occasionally with specifics, but that doesn't mean I don't value my time.

I agree with Simon. The feeling I had from the this post was exactly as Simon said: "code me this trading algorithm which may or may not be any good"

It would have been different if you had said you have a successful strategy, that you have already tested elsewhere and you are willing to disclose this good strategy with someone willing to take the burden of porting that to Quantopian. In this case is a win win for both participants in the agreement, but as the proposal stated in this post it doesn't sound fair or simply appealing.

For example I don't even have the time to test every idea I have, because it takes time and time is limited :) I have to make choices. I guess that a collaboration request should contain some sort of return value for the person in charge of the development.

Then, of course, there could be people with no idea but good in coding, just waiting for an idea to code. But judging from the answers of this post, I don't believe there are many.

Hi Mike,

I wouldn't be too dismayed. You can learn to write the code yourself, and will be much better off in the long run. Once you get the basic code running, you can post it to the forum for help. The "secret sauce" (if any) will come in your selection of the ETFs and optimization approach. So, to get started, just pick some ETFs arbitrarily, and use some best-guess parameters.

The $3K-$5K estimate is probably not that far off. If you'll be putting in $100K+, that's only 5% start-up cost.


All right everybody chill! I'm not looking for free!
I want to learn how to write the code. I am starting from ground zero. Where does a total newb start? Below is my post from July that has no responses. That is why I asked the question to Mike.


I have recently been trained in the do's and don'ts when trading OTM vertical option spreads. Specifically SPY. My mentor has proprietary code which I inlay on the chart. This gives me either call or put trading points. It has worked very well in testing and I have traded it live with great success. I have now tested a more aggressive ATM strategy that has had the same great results. It does however require me to pay very close attention to the short leg of the spread. I have a job still so it is difficult to manage from my phone.

I am manually calculating a trailing stop as the short strike moves lower and exiting the spread when the stop is reached. As an alternative, the strategy also uses 25 point Renko bars to smooth out the noise and trigger a back ratio trade on the short leg if spy moves against me(sell one short contract for every Renko in the wrong direction). This method has proven very effective in keeping the trade running during 2-3 Renko pull backs. Here are the scenarios:

1 - Manually enter a vertical spread.
Once entered, attach code to the spread and monitor the short leg. Trigger the exit trade with either a trailing percentage or point stop.

2- Manually enter a vertical spread.
Once entered, attach code to the spread and monitor the Renko bars. Trigger the buying back of one short contract for each bar. Trigger the the closing of the whole spread after X number back ratio trades.

I have no experience writing code like this and do not have the time to learn it. Anyone interested in a project for a fee?

EDIT: I forgot to mention the strategy closes all positions end of day. No overnight positions.

You might have received no responses because options trading is not supported on Quantopian. There might be some folks lurking who could implement is from scratch, but I don't know what they would charge.

Perhaps Tradestation/Amibroker/Ninjatrader would be better suited for this...

Thanks Simon, Matthieu explained the same. He recommended Alta5 and I am looking at Tradestation also.