Back

What's your preference C# or Python, and why?

Hi,

I'm still fairly new to the platform, and I'm currently developping my backtests using C#. I've had a few attempts at Python but I haven't decided which languange I want to "settle in" with. To help me and other curious users out, I thought I would ask everyone. Which language are you using for QuantConnect, and why do you prefer it? What do you feel the advantages/disadvantages of one language over the other is?

To answer my own question, I like lots of structure and feel comfortable with C# with it's declarations and classes. I like LINQ for Universe Selection. I'm not super familiar with Python and I chose to go with C# to learn the platform. However, I wonder if I'm missing out by not using Python's libraries like numpy or pandas.

Update Backtest








I also started with python due to rich math libraries like you meantioned, but then decided to switch to C# since its easier to Debug when using Lean - local setup.

Another advantage for python is that, there are plenty of strategies implemented in python shared by the community.

Python also has neural networks libraries, which is another advantage for me, excepted that I just learned that we should take care of memory consumption by algos. For that reason, I will implement the NN integration through a remote call, and not embedded in the algo itself.

For C#, MAth.Net library which seems quite complete to me.

0

Like the profile pic Automated!

0

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.


C# fan here. Microsoft's C# and Visual Studio combination is the best development product I've ever used. So when it comes time to develop something besides web based algos in Quantconnect you'll be in a good position with C#.

0

To be clear, I'm not against Quantconnect. If you just want to concentrate on getting an algo running without worrying about data, live trading support, and other infrastructure requirements then Quantconnect may well be the best option on the net. Working with the web IDE when one is used to intellisense, step through debugging, and all of the other toys in Visual Studio is a bit painful though. Jared should consider making Visual Studio a first class development choice for Quantconnect users in the long term IMHO.

0

i go with python because i have known it the best (use mostly emacs and elpy). i also like the jupyter notebooks and other python tools like pandas, matplotlib etc.

haven't tried c# though i've done a fair bit of mql4 which i understand is similar in syntax.

0

I like C# and Visual studio more as you can add unit tests (test driven design) and the syntax is easier to understand. However, most universities and Google use Python. Also lots of statistics and math functions are in Python. See also Quantopian. I try to use Python but most likely will go for C# where possible. Currently only using the GUI for programming and hence miss the intellisense of Visual Studio.

Other benefit of C# is that the compiler will warn you for wrong or empty objects where with Python you will discover during runtime. 

Debugging would be easier in QuantConnect if the data would run through Visual Studio and you could use the debugger.

0

Update Backtest





0

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.


Loading...

This discussion is closed