What can I do with MATLAB? Or should I rather learn Python?

Discussion in 'App Development' started by Howard, Aug 30, 2014.

  1. Howard

    Howard

    Hello everyone,

    I'm currently enrolled in a mathematics course in school where we're introduced to MATLAB, but not in depth. It's fairly superficial, I think.

    I've always had a plan to learn programming, both to aid me as a trader, but just as much for solving engineering and scientific problems. Python seems to be a popular language for the latter these days and initially what I was recommended to learn elsewhere, but since I'm now getting introduced to and have to learn some basic MATLAB anyway, I wondered if perhaps I should settle with MATLAB and become proficient with that instead.

    You may probably wonder what I plan to do with MATLAB in trading and the answer is that I'm not quite sure yet, although have some ideas. I have experience as a point and click trader, but I'm currently not trading, so this is more of a long term project.

    I expect to utilize MATLAB for backtesting, modeling and statistical analysis of intraday time series. I also have a model that I used to update manually in Excel by end of day which collected and compiled various statistics and metrics of intraday price data utilizing a program that I had made by a programmer. It would be very nice if I could set up MATLAB to receive real time data and compute these as the day evolves.

    Any thoughts?

    Thanks in advance.
     
    eusdaiki likes this.
  2. braman09

    braman09

    MATLAB is used extensively in finance/economics/trading/investing/engineering etc. for quite sometime.
    MATLAB is proprietary and licensing is quite expensive. Fast forward about 10 years, open source has taken over and now FOSS s/w like R, Python etc etc is much more popular. With off-the-shelf pc's with linux OS
    the cost of entry is cheaper. Of course, you have to be curious how things work beyond your immediate need, and be willing to spend a lot of time learning.

    Of course, if you don't want to be bothered about the other peripheral things, expenses are not an issue since you are a hotshot trader. So, the mileage varies ! -br
     
    Howard likes this.
  3. Howard

    Howard

    Thank you for your reply.

    Do you have any experience with either yourself?

    I'm aware that MATLAB has been very popular in a broad area of different fields and probably still is, but are you saying that will change for the future?

    Cost is currently not an issue. I use MATLAB for free with full functionality, I think, through my school's license. Later on, I can still buy it using a student license for a fairly friendly price.
     
  4. Howard likes this.
  5. IAS_LLC

    IAS_LLC

    Matlab is great! It is the first coding language I learned, and it provided me with an easy transition to C++ and all of the other languages. The syntax is C++ ish, but it is much looser. I don't use it for my trading because of the cost (although the $149 license is tempting... and worth it). In my day job as an engineer, I use matlab to prototype and test complex algorithms prior to converting them to C++ for "tactical" implementation. The biggest benifit of matlab, in my opinion, is its visualization tools and its built in math functions (cholesky decomp, matrix inverse, PDE solvers, etc...). My company pays 10's of thousands of dollars a year for matlab, and it is worth every penny.
     
    Howard and eusdaiki like this.
  6. ramora

    ramora

    If you are interested in Python, Coursera has a class starting in a few weeks.

    https://www.coursera.org/course/interactivepython "An Introduction to Interactive Programming Python"

    What is interesting about this class is they have developed an online development environment at codesulptor.org to do the exercises. Very easy to learn, open source, runs anywhere.

    This class is from an interactive 'game' point of view, which is fine for learning,

    Also starting soon "Computational Investing Part 1" which starts with Excel models and quickly moves to Python by the 3rd week. https://www.coursera.org/course/compinvesting1 This class goes into the Python data and stats much more.

    All courses are free....

    Good luck,
     
    stepan7, Howard and eusdaiki like this.
  7. If you have the opportunity to learn matlab today, then learn it. Once you are done with this class, you can tackle Python, there's plenty of online resources that'll help you during that step. The experience you'll get at Matlab will help you with Python (or any other language for that matter). From language to language the syntax and libraries change but basic constructs like loops, matrices, vectors, logic controls (if-else, switch, etc) are very similar; the practice of breaking down a problem into smaller pieces, writting it out till it works the first time and then optimizing is the same on any language you choose, and practice with any language will help you get sharper at it.
    Some background...
    I started programming a couple of years ago, by taking a Python class on coursera, followed by Andrew Ngs machine learning class in Octave (open source clone to matlab), later I took several other courses in those languages and in R... and spent a healthy amount of time "translating" between one language and another in order to force myself to really understand the code.
    Long story short, today I spend most of my day working on SQL and C++, those weren't anywhere near my radar when I started but that's where my work has lead me, and so far it gets more fun every day (parsing through 1 million lines of market quotes on a txt file in <4 seconds can be a lot of fun!)
    Dont get married to one language, at least not on day 1... learn a few languages, appreciate the differences and similarities between them, these features make each language's strengths & weaknesses...
    move out of your comfort zone every few months and learn a new one... and let us know how it goes for you. :)
     
    Howard likes this.
  8. Computational Investming Pt1 is a really fun hands-on, project based class. I highly recommend it.
     
    Howard likes this.
  9. Howard

    Howard

    Thanks, man. Sounds good! I'm motivated. = )

    Thanks very much, ramora.

    Not sure if I can make it on this round (see post below), but I'll certainly consider it on the next round.

    Perhaps I can squeeze in the Computational Investing course. Sounds very interesting.

    Thank you very much for your considerate reply and for sharing your background in programming.

    Since I have to learn some basic MATLAB now anyway, I think I'll stick with that for now, having a lot on my plate already. When my current course is finished, perhaps I should reconsider whether I continue exploring MATLAB or start learning a new language.

    It seems like become somewhat proficient with MATLAB first is a smart choice though and I probably won't get there just with the course at school.

    Actually, I bought this book several years back when I was planning to learn MATLAB, so I planned on using that for my education now, unless someone got a better suggestion. Already finished chapter one which was rather basic.

    I also have a book from Ernie Chan lying around on Quantitative Trading which I seemed to recall contained some stuff on MATLAB.
     
    eusdaiki likes this.
  10. Do you use any of that for trading? or is the SQL C++for another job?

    I've been looking at that Machine learning class but thought I would take Linear Algebra first. How was the course?
     
    #10     Sep 1, 2014