programming language designed for trading?

Discussion in 'Strategy Building' started by falconair, Oct 8, 2007.

  1. jenek

    jenek

    nice joke.
    IPO will in 2008
     
    #21     Oct 11, 2007
  2. You need to understand the basics first.
    For instance, Tradestation employes a circular buffer in an elegant fashion. With this concept, all price references are easy to accomplish: C = Close; C[1] = prior close, etc.
    Plus, all computed/derived variables retain this same "memory" of the recent past as stored in the buffer.

    The easy language interpreter has built-in "smarts" to know exactly how large the circular buffer should be based on the referencing in the code. This is a powerful feature. For instance, if you employe a 30 period moving average, then it makes a buffer for at least 30 "items". However, it does not permit any trades to occur until the buffer is initialized with real values. Again, all of this is done automatically.

    In addition, their referencing was enhanced to accomodate multiple data streams or time-frames.
    C(2) = Close of data stream #2.

    Also, the concept of interval is important: Tradestation permits price "bars" to be defined by time, ticks, or volume.

    Finally, the concepts of signal and strategy is important to understand....each signal can invoke buy or sell orders....and multiple signals can be assigned to a strategy.

    So, when you understand the above, then you can then design and build these same features into your own trading platform with Java, C++, dot-net, whatever. Heck, if you are REALLY AMBITIOUS, you can create an interpreter with one of these languages and re-create the functionality of Easy Language as embodied in all of it's keywords.
     
    #22     Oct 11, 2007
  3. We have constructions like

    Bars.Ago(10).Close

    or

    Bars[10].Close

    in OpenQuant.

    I am rather talking about language constructions reflecting a specific concept / subject / field that can not be expressed in another language. For example Event Processing Languages introduce time concept, i.e. offer operators like before, after, etc. that deal with events on time axis. This changes program flow and this is something conceptual. Introducing Close, High or Sell as reserved language words isn't imho.

    Well, I am just trying to understand what a "trading language" is, nothing personal :)

    Regards,
    Anton
     
    #23     Oct 11, 2007
  4. Good question! Others have already pointed out that the difference in syntax often does make a difference for those who are not used to seeing computer code.

    I am actually even more interested in the semantics of the language than the syntax.

    "BUY 100 AAPL LIMIT AT 24.5" can be trivially translated to a made up programming language function by anyone as
    "BuyLimit("AAPL", 100, 24.5);"

    What if you wanted add stop price, perhaps some execution instructions, in English you would change your sentence slightly. In a programming language, the API designer would have to provide a large number of very similar functions (BuyLimit, BuyStop, BuyLimitStop, Buy, etc.)

    It is possible for use to use a programming langauge which lets us define some basic concepts and lets us combine them in any way which makes sense (usually the domain of 'functional' programming languages). The questions is: what are these "basic" concepts and should they be combined?

    buy, sell, bid, ask, last, volume, etc. are some obvious "basic concepts." Is it helpful to also have 'concepts' related to execution: cancel-after-x-seconds, rout-to-destination, vwap-price, percent-of-market? What if we also add risk: value-at-risk, dollars-at-risk, time-horizon, etc., etc.

    Obviously these are very vague ideas at the moment :)
     
    #24     Oct 11, 2007
  5. I'm not a programmer so I'd easily get lost in a true programming language. My familiarity with programming is actually in large part based on my familiarity with trading platform specific "languages". Here's a brief outline of what I've heard and my impressions.

    Metastock formula language is basically composed of quick shorthand instructions. It sacrifices flexibility, power, and presentation for ease of use. Looping is not elegantly accomplished if at all and referencing the occurence of a specific event in the past can be a chore.

    Amibroker formula language is basically the Metastock formula language combined with C extensions from what I've heard. More flexible and more powerful. EasyLanguage I presume has similar characteristics.

    Neither of the above are very daunting for the programming uninitiated.

    The following however looked like Greek to me when I first started out and have largely remained that way:

    Wealth-Lab language I hear is based on Pascal.

    MetaQuotes formula language is based on C.
     
    #25     Oct 11, 2007
  6. Corey

    Corey

    Jane Street Capital uses O'Caml.

    Using the functional family of languages -- especially those known for speed (O'Caml) or those known for multiprogramming (Erlang, Alice), can be extremely beneficial because compilation guarantees that type errors will not exist. This sort of thing is VERY important when you are talking about a high frequency system with extremely rigid constraints and requirements.
     
    #26     Oct 11, 2007
  7. There has got to be a way to avoid reinventing the wheel each time a system needs to be built.

    I would ask the FIX vendors about what is already available in the form of real time trading for equities and futures, I'm sure they can send you in the direction of a real time ready to use library that has a data feed and also has access to the broker via Fix.

    Anyone know if this is commonplace among vendors that deal with pro traders / funds?
     
    #27     Oct 12, 2007
  8. FIX has nothing to do with programming language, it's a communication protocol. On the other hand it offers a pretty good business object model developed by professional community. We use it as a business object model in our software.
     
    #28     Oct 13, 2007
  9. I know that Open, So your saying your software works with FIX? That seems unique for a retail product.
     
    #29     Oct 13, 2007
  10. Murray Ruggiero

    Murray Ruggiero Sponsor

    We also have a developers kit in beta for developing addin's in .NET. The examples are in VB. NET.
     
    #30     Oct 13, 2007