I’m considering the script language for Humai Trader, which will be used to define custom indicators, buy-sell signals etc. I took a look at the script world in Java now. There are some choices newer than several years ago, such as, groovy, beanshell etc.
There is an interesting article: Choosing a Java scripting language: Round two in javaworld comparing these script languages, which is almost the same point as my view:
Here’s what he says:
Jython is one of the fastest scripting interpreters. From looking at the Website, it seems that Jython development is about to renew, which is good news. There are several good books on Jython. If you like the Python language, Jython is a solid choice.
BeanShell is not as fast as the quickest of the interpreters, but the 2.0 release supports loading of ordinary Java source, which is a strong selling point. I tried loading and running several Java source programs as scripts and found BeanShell to work fine, which is impressive. The libraries are well-organized and make integration simple. If performance is not the single most important criteria for your scripting interpreter and you want to write Java scripts, look at BeanShell.
Rhino is the winner of the performance benchmarking test and also supports Java-like syntax in its scripting. There are plenty of books on JavaScript available. Rhino appears to be well supported, and the distribution includes a useful debugger.
JRuby brings the feature set of Ruby to the table. It isn’t the fastest of the interpreters, but if Ruby syntax and functionality is important to you, take a look at this interpreter. I ran version 0.8, which seemed to work just fine for my simple tests.
Groovy has attracted quite a bit of attention and development effort in the Java community. It is one of the fastest interpreters on the benchmarking tests, even without compiling the scripts down to classfiles. The syntax is Java-like and supports some powerful features that Java doesn’t. This is an interesting addition to the programmer’s toolkit that has a lot of potential.
So, the choice may be JavaScipt, the major reasons are:
- JavaScipt (JSR 223) will be integrated in Mustang (the next version of JDK)
- JavaScipt is the winner of the performance benchmarking test
- JavaScipt is one of the mostly used language in web world, it’s a familiar for many users
- There are plenty of books on JavaScript available
- The footprint
The only issue is: Is there a lightweight javascipts editor module available for NetBeans Platform?
January 4, 2006 at 9:32 am
Beanshell syntax is so close to java that makes it easy to use (especially if the program is already in java).
thanks,
rob
January 4, 2006 at 8:08 pm
Actually, what I most concern is a syntax awared editor module for NetBeans :)
January 6, 2006 at 11:59 pm
no matter what script language, user defined function is what I am looking for.
February 3, 2006 at 10:05 pm
Who cares about speed? What is most important is speed of development — whatever interface allows you to write the cleanest indicator wins in my mind.
February 9, 2006 at 10:28 am
The most important aspect is the API usability.
For example, if I want my sell signal to happen “after a drop of 1% of the MA(10)”. How hard/easy would it be to code that?
On top of that you may want the sell signal to happen if several conditions ocurre.
February 27, 2006 at 5:51 pm
What about adding support for all BSF (http://jakarta.apache.org/bsf/) compatible languages. As far as I know all of those that you mentioned are BSF compliant. But then you would still have to choose an ‘official’ one to implement the built-in macros in.
March 2, 2006 at 8:46 pm
What about a declarative rule-based approach? Look at this great decision tables technique: http://drools.org/Decision+Tables
With decision tables one can specify conditions for firing alarms like “after a drop of 1% of the MA(10)”
I think that classic procedural scripting languages are of little use here. I don’t see useful algorithms that has to be programmed in extension to the BlogTrader core. The most needed algorithm is a simple loop thru the collection of stocks applying checks and firing alarm signals, though the checks are best expressed in a declarative manner, as rules. Of course, you can do the same thing with JavaScript, but that would be less user-friendly and more error-prone.
March 13, 2008 at 1:40 pm
$anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsbook,ncaa,ncaa Betting,…
$anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsbook,ncaa,ncaa Betting,nc…