Search
× Search
Saturday, December 21, 2024

Archived Discussions

Recent member discussions

The Algorithmic Traders' Association prides itself on providing a forum for the publication and dissemination of its members' white papers, research, reflections, works in progress, and other contributions. Please Note that archive searches and some of our members' publications are reserved for members only, so please log in or sign up to gain the most from our members' contributions.

Algorithmic Trading with Wolfram Mathematica

photo

 Kerry Litvin, Founder and President at H-Bar Omega LLC

 Wednesday, April 22, 2015

Has anyone built an API to interface between Wolfram Mathematica and a brokerage such as Interactive Brokers? I am asking this because recently several individual investor sites have come on-line that cater to investors with mathematical/scientific/programming/economics backgrounds who would like to use their professional skills to develop trading algorithms for their personal investments. Chief among these are Quantopian, QuantConnect, and Rizm. Quantopian has an API based on Python that allows you to link to an Interactive Brokers account, QuantConnect has an API based on C#, and Rizm is a proprietary graphical interface somewhat akin to LabView. I have used Mathematica throughout my professional career and can do a great deal of sophisticated analysis using the program. The few things I can't do with it are link to a brokerage and "live trade" or "paper trade" with a customized mathematical/statistical algorithm written in Mathematica. Wolfram has a Finance Platform add-on to Mathematica that can only connect to Bloomberg so it is not really tailored for the individual investor community primarily because of the costs involved. I thank you ahead for your thoughts, comments, and advice.


Print

6 comments on article "Algorithmic Trading with Wolfram Mathematica"

photo

 John Weiksnar, Syndicated Capital, Inc.

 Thursday, April 23, 2015



I believe WA has a group that interfaces directly with large institutions. Try contacting https://www.wolfram.com/finance-platform/


photo

 Kerry Litvin, Founder and President at H-Bar Omega LLC

 Thursday, April 23, 2015



John, thank you for the information. I did speak with the Wolfram people. The only additional information I obtained is that a link to Reuters might be in the works. No real assistance with regard to a usable API to link to a brokerage such as IB for individual investors at this time. This will have to come from the Mathematica users coimmunity.


photo

 Yair Altman, MATLAB expert consultant

 Thursday, April 23, 2015



I know this doesn't directly answer your question, but Mathematica users often also use either Python or Matlab, which could answer your needs, since they both have IB connectors.


photo

 Kerry Litvin, Founder and President at H-Bar Omega LLC

 Friday, April 24, 2015



Yair, in lieu of an appropriate API linking Mathematica to a brokerage I've been using the Quantopian website which utilizes Python. The Quantopian API allows for a connection to IB. I would still much prefer to use Mathematica as opposed to having to learn Python from the ground up.


photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Saturday, May 9, 2015



did one for matlab, but always liked wolfram's owner he is very charismatic.


photo

 Kerry Litvin, Founder and President at H-Bar Omega LLC

 Tuesday, May 12, 2015



I understand the concerns about speed when compared to lower level languages such as C++ however Mathematrica does allow one to directly utilize the GPU with CUDA which in and of itself provides a tremendous computational speed up. From Wolfram: Every calculation is scalable to large dimension arrays using parallelization across CPUs and GPUs. See also http://www.wolfram.com/broadcast/video.php?sx=GPU&v=923


and


http://www.wolfram.com/broadcast/video.php?sx=GPU&v=1026


Also see this article from JonathanKinlay.com Quantitative Research and Trading:


A Comparison of Computer Languages posted on February 24, 2015.


http://jonathankinlay.com/index.php/2015/02/comparison-programming-languages/


A few of his conclusions were:


C++ and Fortran are still considerably faster than any other alternative, although one needs to be careful with the choice of compiler.


Mathematica is only about three times slower than C++, but only after a considerable rewriting of the code to take advantage of the peculiarities of the language. The baseline version of the algorithm in Mathematica is considerably slower.


Mathematica’s syntax is just as demanding and uncompromising as C++ – a missed comma or incorrectly placed bracket is just as critical. But, the point is, while in C++ the syntactical rigor is just annoying, in Mathematica it’s worth putting up with because the productivity is so much greater. A competent programmer can produce, in a single line of Mathematica code, a program that would require hundreds, if not thousands of lines of C++ code to accomplish. Sure, he might get the syntax wrong at first: but it’s only a single line of code and the interactive gui interface makes debugging very simple.


That said, while Mathematica can be very tedious to use for procedural programming, it excels in three areas:


1. Symbolic programming. Anything involving mathematical symbols and equations – Mathematica is #1


1. User interface. In Mathematica, it is trivial to build a sophisticated, dynamic gui in no time at all, again, often in 1-2 lines of code


1. Functional programming. Anything that can be thought of as a function, Mathematica handles extremely well. We are not talking about finding a square root here: I mean extremely complex functions that, again, might take hundreds of lines of code in another language.


It is also worth pointing out that Mathematica comes supplied with functionality that Matlab provides only through numerous, costly add-on packages.


I would add to his comments by stating that the current version of Mathematica also includes machine learning functionality which provides new avenues to explore with regard to algorithmic trading using all sorts of data in addition to numeric.


I think for an individual trader connecting with the home use license version to a brokerage for personal use ought to be allowable (admittedly I haven't read the details of the home use agreement) but if you're not selling your algorithms or work developed in Mathematica to anyone and your not trading on anyone's behalf for a fee using these algorithms then you're not using the product commercially for gain.

Please login or register to post comments.

TRADING FUTURES AND OPTIONS INVOLVES SUBSTANTIAL RISK OF LOSS AND IS NOT SUITABLE FOR ALL INVESTORS
Terms Of UsePrivacy StatementCopyright 2018 Algorithmic Traders Association