Anyone up for collaberating on replicating Chan scripts in Python?

Discussion in 'Automated Trading' started by dtrader98, Jul 21, 2009.

  1. Hey All,

    I've been trying to familiarize myself with Python and found one of the things I miss is working as a team for inspiration. I figure that we can take some of Chan's (Quant trading) models and re-write write them in Python; this way no one is giving up any secret sauce. I am aware that there are tools to translate matlab directly to scilab, etc... But that sort of defeats the purpose.

    I've tried to do this on here with other tools, but the only feedback I got was a lot of , yes 'I want to participate,' responses, along with commentary and downloads of my work, but no work from others. Also, someone tried with the Matlab forum, and it never really took off. So, I'm looking for someone/small team to actually do work.

    You need to have access to E Chan's book, quantitative trading and know or want to learn how to write in Python. We can choose which scripts to emulate. We will work offline. PM me if you are interested.

    I just briefly looked over the book, so it will also be fun to verify some of his ideas.
    If you are already a python guru, and want to understand any concepts that are not familiar in the book, you can also benefit from learning the concepts hands on.
     
  2. nitro

    nitro

    I remember looking at these scripts and seeing if they would translate to Scilab and/or Octave. I seem to remember that they did not, at least not without some effort. I could be wrong...

    I am a little confused. So the reason for this project is you want to learn python since you can get it running or have it running on Matlab and or scilab? What is your particular expertise? What part of the scripts would you work on porting and what would like others to work on?


     
  3. Hi Nitro,

    I know you are pretty familiar with programming from looking at some of your past posts (a lot more than me).

    My goal is to simply pick up python to the point where I can run pretty much about anything I can imagine for purposes of prototyping fast. I've mentioned elsewhere that the time required to prototype in java and others is just a pain if you don't use it every day.

    I've run some scripts in python and find it relatively easy to understand and implement matrix based ideas (since unlike say, vba, there are plenty of packages available already). However,
    I would say although I'm proficient at programming, I like to learn new and faster languages that come out, and Python is one of the languages I've been toying with lately. Most of these matrix based OS languages are similar, and are the wave of the future IMO (there are so much academic/community development efforts on models, it's a dream).

    With regards to delegating tasks, we play it by ear. Pick a topic (goal was to use any of Chan's scripts excel or matlab that look interesting) and we can try to brainstorm on how best to break it down and work independently on pieces. Someone more experienced in Python or programming in general, would likely have more of a leadership role. If someone feels they are carrying too much load, it will quickly become obvious as their participation will terminate. I think If you've worked in teams before, you know how to gauge these types of things.

    It's a simple way to do some work (with a little inspiration), rather than bs on chit chat all day; and hopefully learn something new in the process.

    dt98
     
  4. nitro

    nitro

    Hi dtrader98,

    Ok, so you are a java programmer and want to learn python because you think this would come up faster in python?

    I guess I am a little confused still. Imo if you don't know what part you want to work on, and break down the problem into what needs to be done, it will likely turn into chaos. Hence my question as to what you were proposing what piece you would work on. It sounds like you would like to work on the core algorithm of porting the cointegration part?


     
  5. I have found python to be faster at implementing concepts in my head, than java... It's that simple, I think.
    However, like any language, I have to familiarize myself with the syntax (like slicing quirks not using 1st element);
    and the best way to do so is practice on examples, just like back in school.:)
    I doubt the execution time would be faster, just less complex. Cointegration would be a good idea; I didn't want to limit the topic list. Not sure why you would see it as chaotic? If someone like yourself were on board, you could architect from a top level and break down the tasks. I mean the algorithms are already there; how hard can it be?

    I'll just continue to work on the tasks myself, if anyone is interested PM me.
    I just thought, with the myriad of interested learners on the board, perhaps some might be interested in actually doing some work and truly learning. This is an opportunity to do so, with some benefit to myself as well.
     
  6. nitro

    nitro

    Ok.

    I was wondering what part of it you were thinking of doing, or what script in particular.

    If the idea is just to learn python, there are lots of ways to do that without specifically porting the Chan scripts :confused:

    I suggest the following. Imo you should port the (a) script(s) to Java first, and then ask the help of a Python expert. That seems to be more likely to succeed, imo, and it will be easier for you to see how it is done in python once you see how the concepts port over from java to python.

     
  7. The idea behind Chan scripts is that they are
    1) of interest to board members and traders
    2) Already implemented in formal syntax
    (what more could you want).
    3) Easy for others to obtain copies as a common top level problem.

    Heck, we could try to work on a script to solve the Riemann hypothesis, although I doubt it would go as smoothly.:p

    I can learn Python on my own thanks.
    Just looking for the myriad of interested other learners, who want some kinship on the effort.

    P.S. Going from matlab/excel to java and back to Python is a waste of efficiency IMO.
    Matlab is closer to Python to begin with.
    I haven't thoroughly looked through the scripts yet, but I don't recall seeing much OOP.
     
  8. nitro

    nitro

    Right, but I think you will get a much better response if you ported the scripts first to java, as very few programmers know matlab. Since you appear to know both, that intermediate step would seem logical. But if you advertise that you have java ported matlab script, you will get lots of people willing to join and help turn it into python.
     
  9. What about doing something in F#? I would be interested in that as well as Python.
     
  10. That sounds like a good idea. However, I've got too many languages under my plate at the moment. I prefer languages that have a pretty good set of examples and semi-mature package development somewhere. F# seems relatively new.
    dt98
     
    #10     Jul 22, 2009