Back

Math Libraries?

We're adding C# math/science libraries at the moment so its an ideal time to take requests -- I've personally used ILNumerics and will try and add that in, are there any others you'd like to see added in QC? Please post direct link to download page if possible, and ideally open source or we'll need to negotiate the licensing terms.
Update Backtest






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.



+1 IlNumerics
1

ILNumerics turned out to be a pain & doesn't support Mono yet -- but we've added:

Math.NET Numerics: http://mathnetnumerics.codeplex.com/documentation
Just add using MathNet.Numerics; to your code, and can top into full matrix math :)

and R.NET - http://rdotnet.codeplex.com/documentation
So now you can run R-Scripts in QuantConnect. Cluster computing with C#, R and terabytes of data. This is so much fun! Load this library with using RDotNet;
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.


Good stuff
0

Hi, I'm totally new to this. Where would one start to learn so that they could even engage others in questions on a site like this?

Thanks. Don - equitymaven.blogspot.com
0

Hey @Don - first step would be learning as much basic C# as you can. There are many materials for this on the web, but the Khan Academy probably has the most user friendly set: https://www.khanacademy.org/cs/tutorials/all-tutorials

Then, load up a basic template and you can start with the QuantConnect QuickStart - this will get your to back-testing an algorithm: https://www.quantconnect.com/docs/QuickStart

Feel free to reach out on the forums, I'm sure other users could use help as well
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.


We released a new blog post on this topic -- the top C# numerical libraries:

https://www.quantconnect.com/blog/top-numerical-libraries-for-c/
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.


R.NET have a great limitation - you can't run same instances of R in one time, It's connected with the R core and Windows kernel limitations. Novaday there are some methods for parallel coding on R.NET - use "snow" and other packages for parallel coding in the R and try to load different instances of R.dll same ways.
Also a great limitation is that R doesn't support GPU. There are some R ligraries for same packages, but...

http://hybriddsp.com/ - see CUDAfy project here. Good GPU (CUDA, OpenCL) computation library.
0

Oh, sorry, forgot to add that R.NET have troubles using with LINQ, PLINQ, lambdas and procedures calling - have great memory leaks in .NET 4.0 and Win7 x64 Ultimate in MSVS 2012 Ult
0

Interesting thank you @Dmitriy, I suppose the demand for R-parallel is fairly low since we offer multiple machines (running 10-50 whole separate boxes) which is a higher level. And again same with CUDA -- if the point is to run tests faster; we can do with hundreds of machines instead of one machine with lots of GPU's. Do you want to use CUDA explicitly?

We can add the Cudafy library if there is a little demand. I heard from a couple of users who were also interested in it.
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.


Thnxs, Jared.
The main idea of parallelizm here is a parallel computing same parts of original code. For example, I need to analyse an information about OHLC (4 time series). Using R without "snow" or other MPI or OpenMP packages you'll never do it parallel without any tricks like renaming libraries and etc. For example, I have strategy with 1-2 parameters, which needs much computations for ARIMA-GARCH-Wavelets. But I need to run it in serial mode, novaday I learn "snow" package for realize my code through MPI. One step of computation is approx. 3-6 sec. I have 2000-3000 candles. And I need to have it less than 0.1-0.2 sec. No idea how to do this for real-time trading... R isn't a good idea for real-time strategies without using any internal gpu or parallel computing packages...

CUDAfy is a good solution, but it needs to have good practice in parallel computing on GPU - it's so specific. ;-) And, one GPU may be faster than 100-200 cpu (if a programmer has straight hands ;-) ), cause GPU has less costs of data transaction. ;-)

Ah, and other great problem I've already written - memory leaks in R when it's used with R.NET+MSVS2012+.NET 4.0+lambdas. I have no idea now why it's happend, but trying to understand...
0

Good points @Dmitriy, I just checked for you and our worker nodes don't have GPU's so can't support CUDA sadly. We could possibly setup a private cloud with a dedicated machine if you like but its fairly expensive ($2.1/hr).

Re: R.NET Memory leaks - I can't see anything documented on the web, is there any way I can repeat the bug? We're using R.NET on Ubuntu in QuantConnect.
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.


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