| Author |
Message |
![[Post New]](/community/templates/default/images/icon_minipost_new.gif) 25/02/2009 20:30:27
|
jerry_long
Joined: 25/02/2009 19:19:58
Messages: 5
Offline
|
I'm trying to write a couple of simple modules, a marketdata module and a strategy module in a separate project. I am using maven with the eclipse plugin. How do I set up the maven dependencies to your project so I can write these modules? Maybe there is a simple archetype for this? Is it possible to depend on the source directly rather than your repository?
|
|
|
 |
![[Post New]](/community/templates/default/images/icon_minipost_new.gif) 26/02/2009 02:25:37
|
anshul
Joined: 26/02/2009 01:29:29
Messages: 34
Offline
|
Jerry,
If you are looking for a simple template module, a good example will be the CSV Module that reads a CSV file and emits each row as a hash map to the data flows. You can find the maven project for that module in our codebase here.
And in case you haven't already, you can read through the org.marketcetera.module javadoc for module API description. Do note that the API is not stable and can change in future releases.
Authoring marketdata and strategy modules is non trivial. Can you elaborate what you want to implement..
We already support java and ruby strategy languages. Do you want to implement a strategy module that supports a different language?
When you say
Is it possible to depend on the source directly rather than your repository?
were you asking if there is a maven repo where we publish our artifacts so that you can depend on them? Currently we do not publish our artifacts to a maven repository.
If you are building the platform from our codebase, you can have your module's maven project depend on our maven artifacts. You can see an example of that in the CSV module's maven project.
This message was edited 1 time. Last update was at 26/02/2009 02:26:13
|
|
|
 |
![[Post New]](/community/templates/default/images/icon_minipost_new.gif) 26/02/2009 12:20:19
|
jerry_long
Joined: 25/02/2009 19:19:58
Messages: 5
Offline
|
I haven't used Maven before and so my questions might seem simple. From the documentation, I am assuming that modules are the location for extensibility for the Marketcetera engine. I'm trying to implement two modules. The first is a marketdata adapter to a data source that I am currently using. The second is just a simple trading strategy to test out the engine. I would like to use Maven to specify the builds for these modules as that's what you are using. However, I am a little confused about how I do that without placing my modules within your (downloaded) source tree, e.g. how do I setup the pom.xml correctly for a module outside your source tree?
Thanks again.
This message was edited 1 time. Last update was at 26/02/2009 18:30:26
|
|
|
 |
![[Post New]](/community/templates/default/images/icon_minipost_new.gif) 26/02/2009 20:33:37
|
anshul
Joined: 26/02/2009 01:29:29
Messages: 34
Offline
|
Jerry,
Since we currently do not post our artifacts up on a maven repo, there's no easy way for you to build your modules outside of our source tree using maven unless you are willing to deploy our jars into a maven repository manually. This is something that we are aware of and are working on fixing. We'll send a note to the community when we publish our artifacts to an external maven repo.
As far as developing market data adapter goes, you can look at the implementation of our marketdata adapter that connects to our exchange simulator here. Until we post our artifacts to an external repo, you can create a copy of marketcetera sub-directory within marketdata directory and develop your module there.
For testing strategies, are you sure you want to author your own strategy module? You should be able use the strategy module that we provide as a part of the platform and run your ruby or java strategy within it. We include some sample ruby strategies in our strategy agent install. You can find instructions on how to run strategies within strategy agent here. You can find our strategy API documentation here.
Do you think the current Strategy API will be sufficient for your use-case? If not, we'll be interested in hearing the kinds of enhancements that might make the API more useful for you.
|
|
|
 |
![[Post New]](/community/templates/default/images/icon_minipost_new.gif) 02/03/2009 15:23:23
|
jerry_long
Joined: 25/02/2009 19:19:58
Messages: 5
Offline
|
You're right I'll use the java strategy module that you provide. I'm still not sure if I need a maven project within your source tree to do that. In terms of the API. I'll let you know after I've used it a bit more ... the one thing I noticed before is that the timing functions are not designed for simulations as they rely on the computer's clock not the tick times. I saw that the CEP allows you to do that but I still have no experience with that.
|
|
|
 |
![[Post New]](/community/templates/default/images/icon_minipost_new.gif) 06/03/2009 02:50:49
|
anshul
Joined: 26/02/2009 01:29:29
Messages: 34
Offline
|
Jerry,
We were able to publish marketcetera 1.1.0 artifacts to our maven repository at http://repo.marketcetera.org/maven/
Let us know if you run into issues using those artifacts.
In terms of using external time (ie. using the timestamp on the market data event instead of system time to derive the notion of current time), yes, CEP allows you to do that and the cep-esper module exposes an option to configure it to use external time.
It's unclear to me how external time will be used within a strategy. If you have any exemplar use-cases on how external time might be used within a strategy, they will help us in figuring out how external time support should be built into the strategy API.
For simple use-cases I'd think external time functions offered by the cep module can be used to make up for lack of external time support in the strategy API.
Anshul
|
|
|
 |
![[Post New]](/community/templates/default/images/icon_minipost_new.gif) 06/03/2009 14:29:08
|
jerry_long
Joined: 25/02/2009 19:19:58
Messages: 5
Offline
|
Thanks Anshul! That's great. I'm currently using the compiled code , but will experiment using external dependencies too.
In terms of external time. The basic thing is that you have to have it if you want to simulate. The simplest example is that a strategy has a timeout on an order at which point it will cancel it. In simulation you have to base the timeout on simulated time, not real time. Another example is that some strategies are sensitive to the time of the day, either only functioning at certain times or changing their behavior based on the time. Again you can only simulate if you are using external time. I have no experience with the CEP and how fast it is, but as this is a functionality that would operate very frequently it might be good to have it be integrated and not be a bottle neck.
I was wondering if you might help answer some basic questions for me about the marketceterafeed module? I'm wading through the code and I'm getting a little lost through the layers of abstraction. Some questions:
1) What's a token, and what's it used for?
2) What's the difference between a token and a handle?
3) What's an event translator used for?
4) What's a message translator used for?
5) Why is it a bean?
6) How does it work?
--a) Where does it get the external data? What's the method? Who is actually calling it? When is it called?
--b) How is the data distributed? What method and who calls it? How do you make sure that the strategy is ready to receive the data? What on the strategy end is processing the data?
--c) When a feed is instantiated what methods are called? In what order, when and who calls them?
--d) How does a dataflow connect between a strategy and a feed? What specific code and methods?
This message was edited 1 time. Last update was at 06/03/2009 14:29:43
|
|
|
 |
![[Post New]](/community/templates/default/images/icon_minipost_new.gif) 07/03/2009 00:43:18
|
ytalmor
Joined: 12/02/2009 00:24:08
Messages: 130
Offline
|
Jerry,
Thanks for raising these questions. Right now the best way to find answers to your questions is looking at the Marketcetera market data adapter source code that we provide as part of the platform. Beyond that it is hard to explain such topics over email, in a forum, etc. The best suggestion I can make is start with our sample and extend it or write a simple adapter with limited functionality.
Thanks,
Yoram
|
|
|
 |
|
|