Strategy java files
Hi,
Is is possible to backtest a strategy remotely if the strategy is
contained in more than one java file? I have a bunch of libraries I
want to use, and while a strategy will run locally it won't run
remotely presumably because it's not uploading the
dependancies?
Cheers
Jonathan
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Eric on 09 Mar, 2010 11:40 AM
Hi,
Indeed, only the one source file for your strategy is currently uploaded. Uploading more information is something we've been considering, though, as you can guess, it leads to many complex questions.
Could you give more details on your needs? Are any of the libraries that you want to use available as open source packages? Or are they all in source (.java) format?
Thanks,
Eric
3 Posted by jonathan on 09 Mar, 2010 12:16 PM
Hi Eric,
The library I'm most wanting to use is libsvm - an open source implementation of support vector machine learning. See http://www.csie.ntu.edu.tw/~cjlin/libsvm. Source is available in both c++ and java, but the java implementation would be easiest to work with,
Cheers
Jonathan
Support Staff 4 Posted by Eric on 09 Mar, 2010 01:31 PM
Alright, I see that the license for libsvm is BSD-style. That's good news, as it gives us more options.
We're going to see what we can do with it. I cannot promise anything for the near future, but we do want to make progress on this point somehow.
Assuming that libsvm is available in the Market Runner bundle (hence available for running strategies locally and remotely), would that be enough? Is there anything else that you would need to run your strategies remotely?
5 Posted by jonathan on 09 Mar, 2010 08:56 PM
Incorporating libsvm within the bundle would be great. I can put all my other stuff into one file easily enough. A suggestion would be to incorporate ta-lib in a future release: http://ta-lib.org/index.html. Zillions of technical indicators and bsd style licence with source in java,
Cheers
Jonathan
6 Posted by sdepiets on 16 Mar, 2010 12:44 PM
Hi Eric,
I have a problem similar than Jonathan's, I wish to make an extensive use of Object-Oriented features of Java to make a Neural Network based strategy and I get multiple classes in multiple files.
It works locally but not on the server, do you have any work-around ? I guess serialization would work pretty well.
Support Staff 7 Posted by Eric on 16 Mar, 2010 12:59 PM
Hi,
We do not currently support uploading multiple files. We'll do that at some point, but it is not our current focus. (note that Serialization cannot help here, as there would still be multiple files)
In the meantime, as a workaround, you might want to try integrating all your helper classes inside your strategy, as inner classes. It will look quite ugly, considering the amount of code, but it should work.
Also, let us know if you are using an external library in addition to writing additional classes. We might be able to integrate it in a future version of Market Runner.
Eric closed this discussion on 16 Mar, 2010 12:59 PM.