Dear Community,
Today we're welcoming new members from the Quantopian community after the platform announced its shutdown. QuantConnect was founded a few months apart from Quantopian, so we have some kinship and understanding of the growing pains they've gone through over the years. We're grateful for those choosing to migrate to QuantConnect to continue their quant journey.
Code Migration:
We are working on an uploader tool to take the code exported from Quantopian and make it available in QuantConnect projects. It will be ready later today and will automatically create projects in Zipline format in QC accounts. This will not yet perform code modifications to make the code work! This will need to be a manual process for now but we have an awesome support team to help you convert your code.
Migration Documentation
We have started writing a dedicated section of the documentation for the Zipline/Quantopian migrating users. You can see this documentation here, to learn the core differences in the concepts of the platforms. We highly highly recommend starting with Boot Camp. It will guide you line by line on how to build algorithms in QuantConnect with accompanying videos. We've spent a year making these tutorials and they're all entirely free.
Business Sustainability
We know you'll be keenly sensitive to the ongoing viability of your next host. Unlike Quantopian, we've taken relatively little funding and therefore have control over the direction of the business. We have designed QuantConnect and LEAN to be nimble, responsive, and light-weight. Our products have a free tier for people to explore, but "high-power" resources have a cost associated - this keeps the business viable. You'll find this on-par or cheaper than AWS - we've done that on purpose. We've engineered our systems on dedicated hardware that performs 30-50% faster than AWS, and because it's dedicated we can save costs in aggregate for you.
We've also written guides for those who want a back-up anyway. In this post, Avoiding Vendor Lock-In, we provide a step-by-step guide on how to run your own LEAN server. It will not be easy -- what we do is incredibly hard and expensive -- but you have the freedom to choose your host. We hope you'll choose us =).
Bug Reports
We try and focus the community on constructive algorithm discussion. It is not a great bug tracking tool and just creates noise - please post to support@quantconnect.com if you have bug reports.
Data Issues
We post our data issues transparently and solicit the community for help in locating and fixing the data. Please post data issues to the Data Explorer if you have any issues. This way other community members can see the issue and we can notify you when the issue is fixed. We also have built technology that automatically processes these issues and attempts to fix them.
Feature Requests
Please post to this thread. We're going to do our best to fast track the Zipline features you've come to depend on in the next 48 hours.
I know it's going to be a rough week, but hang in there the whole team at QuantConnect is working as fast as possible to make this a smooth experience for you. We're genuinely here to provide the best experience and opportunities for you as possible!
Best,
Jared
Arthur Asenheimer
Hi Joshua,
the issue is caused by the following line
ret[symbol] = (self.price[symbol][-1] - self.price[symbol][116]) / self.price[symbol][116]
because there was at least one symbol with len(self.price[symbol]) < 116.
So you could add the statement
if len(self.price[symbol]) > 116:
# your code here
But there are still a lot of bugs in the algorithm and other error messages will appear.
I recommend to complete the bootcamp and study the documentation.
A few comments in front:
- use Symbol objects instead of strings. I know pandas automatically convert it to strings since it cannot handle custom object types but you can convert it back via self.Symbol(symbol_string).
- always check if data is available before entering a position via SetHoldings:
if data.ContainsKey(symbol) and data[symbol] is not None:
self.SetHoldings(symbol, weight)
- avoid too many History() calls since they are very expensive
- AddEquity() should be located within Initialize()
- we can reduce the method calc_return() to a single line by doing:
returns = history.unstack().close.transpose().iloc[[-116, -1], :].pct_change().dropna().reset_index(drop=True).transpose().sort_values(by=0,ascending=False).rename(columns={0:"returns"})
Emiliano Fraticelli
As other before me have said, Alphalens is the most important feature Quantopian had and I think QC should implement something similar, sooner or later.
OkiTrader
I started about a 1 1/2 year ago learning python and algorithmic trading. I used to split my time between Quantopian and Quantconnect. Mainly Quantopian mainly because there was a rich history of lectures and deep dives into subjects. I am disappointed that Quantopian decided to take down their lectures before closing. On the list of my many projects, I had wanted to transfer all of the lectures into Quantconnect as a method to perfect my programming skills.
In the future, I have to use skylight to ensure I have all of my code locally as a backup.
Last, Quantconnect I hope that your platform is embraced and utilized by developers, authors, and researchers. If anything were to happen, please give us a fair warning to save our work.
Russell Cox
Hello,
Has anyone managed to convert the "Quality Companies in an Uptrend" algorithm or any variant of it please?
Regards,
Russell
Evan LaRiviere
Hi - thanks for existing! Coming over to your platform from Quantopian
Robin Gane-McCalla
I had a Quantopian Algorithm where I used both technical and fundamental data as factors for a Random Forest. I spent some time trying to move it to QC but it didn't seem like there was a straightforward way of doing it. I remember that Fundamentals data could be used to filter stocks, and started trying to store information about the fundamentals while filtering in order to use it in the next step of the process.
I gave up because it felt too much like I was using the QC for a purpose other than it was intended for, but now that Quantopian has shut down it may be worth it for me to revisit.
Any help would be appreciated
Jonathon Tzu
Russell Cox
Check out the version in the newest forum posts
Jon W
Excited to dig into QC and LEAN. One thing I really liked about zipline that I'd love to see supported: realistic continuous futures contracts. For most strategies you need some degree of continuous futures data, but are numerous problems using a single continuous series stitching back as much as 30 years. Zipline did a better job: on any backtested trading day it would give you a series based on what a continuous series would like if it were stitched together at that point in history. Notably the front month contract at that point in time will be untouched. This allows for much more realistic fills, volatility, etc. in the backtest.
Something zipline didn't do well: multiple currencies. It would be great to trade futures in different markets/currencies and the backtester understand the exhange rates allow us to properly size positions based on portfolio equity in the primary currency of the theoretical account.
Shile Wen
Hi Jon,
We are working on adding continuous futures, so continuous futures will be available for use in algorithms in the future.
Best,
Shile Wen
Adam W
Vladimir
Server Status
Vladimir
Can I edit or delete comments?
Where can I find more information about the QuantConnect Community Forum?
Derek Melchin
Hi Vladimir,
Forum posts are only able to be edited for a few minutes after they are published.
We are currently in the process of adding more documentation for the forum.
The Status page is available here.
Best,
Derek Melchin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Vladimir
Derek Melchin
I just want to thank you for helping me translate my algorithm into a QuantConnect API
in this thread, but found that this discussion is closed.
Can you unlock it because I have questions about this algorithm?
Is there any explanation for the rules of discussion?
Vladimir
Derek Melchin
Is there a way to see more than 5 of my last posts desirably all?
Jared Broad
Not at this time Vladimir, thank you for the suggestion.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Vladimir
Is there anything in the QuantConnect similar to the Quantopian
AverageDollarVolume pipeline factor?
AverageDollarVolume(mask = QTradableStocksUS(), window_length = 63)
Shile Wen
Hi Vladimir,
There is nothing similar in QC at the moment, so I suggest creating a dictionary of SimpleMovingAverage objects keyed by Symbol and update the SMA with the .DollarVolume field inside a coarse function. Furthermore, I suggest opening a new thread about this particular request.
Best,
Shile Wen
Big mak
Hi, after some browsing on algorithms/videos on QC I've noticed that a ticker needs to be defined at the beginning of an algorithm. Is there a way to loop through the entire universe of available stocks? Something like:
for every_stock in SP500:
fetch and compute data
SP500.rank('custom factor')
Shile Wen
Hi Big Mak,
Tickers don't need to be defined at the start, I suggest using Universe Selection to create a Universe of stocks that we can filter on. Please see these docs for reference.
Furthermore that statistic is ~1600 stocks at a given time, and QC/Lean can handle 2000 stocks chosen on a monthly basis.
Best,
Shile Wen
Shile Wen
Hi Alyson,
I suggest checking our our BootCamp and Udemy course to get familiar with our API. Furthermore, we provide documentation on migrating code from Quantopian to QuantConnect here.
Best,
Shile Wen
Jared Broad
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!