Matlab in Finance

Discussion in 'Trading Software' started by nitro, Sep 29, 2004.

  1. prophet

    prophet

    A few hours to whip something up using the Matlab sockets package. It won't be efficient and won't scale to more than a few symbols. It is better to implement the socket (and buffering if necessary) logic in C and then call the DLL from Matlab. Or something like that.
     
    #31     Oct 5, 2004
  2. jbusse

    jbusse

    Did anyone go to the MathWorks seminar?
     
    #32     Oct 20, 2004
  3. nitro

    nitro

    I went to the seminar.

    It was relatively elementary and I doubt many here would have found it interesting that already have experience with Matlab .

    For those that asked me to ask questions of Matlab personel, the answer to the questions about other data feeds is that nothing is in the works now. However, the product manager said that if there was enough of a request, they would consider it.

    I strongly suggest that as many people as possible let the product manager know. The product manager is:

    Robert Quinn
    508-647-7869

    My impression of Matlab was very positive. This is a tremendous environment to do research in and the flexibility thru addon modules and the support in the form of books and forums is exhaustive.

    nitro
     
    #33     Oct 21, 2004
  4. dchang0

    dchang0

    Matlab's student edition is only $99. I contacted Mathworks about how the student edition might be "crippled," and they said, "Other than some toolboxes not being available for the student version and the student version not being able to be updated, it is a fully functional version of the [full] software (Matlab Release 14)."

    I tried Octave--it's not directly compatible with Matlab m files. Some modification will be necessary, but exactly how much modification, I don't know.
     
    #34     Oct 21, 2004
  5. linuxtrader

    linuxtrader Guest

    We use both: today they are nearly the same with repsect to performance for many operations.

    However, they are different beasts: Matlab is much more suited for general numerical work and its integration with other systems. Hence, it is more popular with engineers in traditional areas like EE, control systems etc.

    Mathematica is a far superior symbolic environment. Many types of models are much more easily handled in Mathematica and for a mathematician or physicist, Mathematica is much more useful in everyday work. Many financial modeling techniques are better handles in Mathematica.

    So, we keep mathematica for modeling and matlab for some calculations but both are on the block to be phased out in favor of other solutions and we are only matining these fro legacy applications. We will keep mathematica for prototyping models however.
     
    #35     Oct 21, 2004
  6. dchang0

    dchang0

    May I ask what other solutions you are planning to switch to? (I'm still floating around looking for a new framework or platform to base the next five to ten years of development on...)
     
    #36     Oct 21, 2004
  7. jbusse

    jbusse

    Matlab has a compiler that will convert Matlab programs into standalone C programs. Given this flexibility, one could potentially write a program in Matlab that analyzes stock data, and then use the Matlab compiler to create a C program. The C program could then be used to analyze stock data. Since the datafeeds that Matlab currently works with are expensive ($2000+ per month), I'm wondering if this feature could be used to connect Matlab-based code to a cheaper datafeed, such as eSignal. I.e., is anyone familiar with software that can connect programs written in C to a datafeed? The software would import stock data from a data provider and pass it along to the C program for analysis. Is this something that Medved's Quotetracker is capable of?
     
    #37     Oct 27, 2004
  8. Basically, if someone (other than us) writes the needed plugin for Matlab to be able to get data from QT, then it will work
     
    #38     Oct 27, 2004
  9. prophet

    prophet

    This is exactly what I do for my systems, except that I use a blend of M-to-C translated code and hand written C for extra performance where it counts since I do per-tick analysis.

    I originally thought I could take my Matlab backtesting code, compile it to C, link it in with a real time data feed API and go. It wasn't that simple. Efficient backtesting code in Matlab must be written differently than efficient real time code in Matlab or C. In backtesting I use a lot of vector/matrix operations, caching of interediates, usually operating on a whole-day of data in a single vector/matrix operation. This is very fast and expressive (easy to prototype) in Matlab, but won't work in real time. So my real time Matlab code is about 50% different than the backtesting code. This is very efficient combination in both processing performance and code expressiveness. It scales to about 200 tick-based systems/server. The RT matlab code can be easily modified.

    Unfortunately, I only recommend this for experienced Matlab and C programmers. It took a lot of time. The faster and more expressive approach is to use something like Trading With Matlab http://www.gloriosia.com/. Maybe someone can ask the TWM people to write an interface to quotetracker.

    As I said earlier in this thread, someone should be able to spend a day writing one or two Matlab-callable MEX functions (C compiled to a DLL) that establish a TCP socket connection to QT and then check for received data. I'm sure one can find existing code to do similar stuff from http://www.mathworks.com/matlabcentral/fileexchange/loadCategory.do or google. You can also do this with Matlab's built-in socket support, though it will be slower and won't scale very high.
     
    #39     Oct 27, 2004
  10. Hi guys,

    we have been working with Mathlab developing quantitative trading strategies at Fortis Bank several years ago. Then we realized that we need a unified framework supporting complete scenario of quantitative trading - from data acquisition to FIX connectivity, yet providing MathLab level calculation / data analysis engine. That's how QuantStudio project was born. You can read a discussion about Mathlab vs real world strategy development/trading here

    http://www.smartquant.com/platform.php

    Cheers,
    Anton
     
    #40     Nov 3, 2004