RFC - Limit Order Book Package

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RFC - Limit Order Book Package

Khanh Nguyen-2
Hello,

I am working with Andraw Liu, under the supervision of David Kane and
Jeff Enos ("backtest" and "portfolio" packages) to create a Limit
Order Book package that will model a limit order book.

Our initial version of the package is on R-Forge at
https://r-forge.r-project.org/projects/limitob/

We would appreciate suggestions and comments as to what functionality
the package should have. Currently, we have implemented the following
functions

--- "show", "summary", "plot", "display",
--- "best.bid", "best.ask",
--- "bid.price.levels", "ask.price.levels", "total.price.levels",
--- "bid.orders", "ask.orders", "total.orders",
--- "mid.point", "inside.market", "spread", "snapshot",
---  "add.order", "remove.order", "replace.order", "market.order"

Additionally, we were wondering what a good name for the package would
be--Limit Order Book sounds kind of clunky and we were thinking that
maybe "order.book", "orderbook", "limitorderbook",  simply "lob" would
work better. Suggestions on that would be helpful too!

We will summarize any responses we receive and send an email to the
listserv in a week.

Regards,

Andrew and Khanh

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: RFC - Limit Order Book Package

Daniel Cegiełka
Hi
It's interesting. Jeff Ryan plan to add Order Book in to IBrokers package.

http://code.google.com/p/ibrokers/source/browse/trunk/WISHLIST

In quantstrat package you can find some "??order book??" for
placeOrder() function. I think it will be nice if this limitob could
be easily integrated with this kind off packages.

https://r-forge.r-project.org/scm/viewvc.php/pkg/quantstrat/R/orders.R?view=markup&revision=332&root=blotter

regards,
daniel



2010/6/9 Khanh Nguyen <[hidden email]>:

> Hello,
>
> I am working with Andraw Liu, under the supervision of David Kane and
> Jeff Enos ("backtest" and "portfolio" packages) to create a Limit
> Order Book package that will model a limit order book.
>
> Our initial version of the package is on R-Forge at
> https://r-forge.r-project.org/projects/limitob/
>
> We would appreciate suggestions and comments as to what functionality
> the package should have. Currently, we have implemented the following
> functions
>
> --- "show", "summary", "plot", "display",
> --- "best.bid", "best.ask",
> --- "bid.price.levels", "ask.price.levels", "total.price.levels",
> --- "bid.orders", "ask.orders", "total.orders",
> --- "mid.point", "inside.market", "spread", "snapshot",
> ---  "add.order", "remove.order", "replace.order", "market.order"
>
> Additionally, we were wondering what a good name for the package would
> be--Limit Order Book sounds kind of clunky and we were thinking that
> maybe "order.book", "orderbook", "limitorderbook",  simply "lob" would
> work better. Suggestions on that would be helpful too!
>
> We will summarize any responses we receive and send an email to the
> listserv in a week.
>
> Regards,
>
> Andrew and Khanh
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: RFC - Limit Order Book Package

Daniel Cegiełka
Sample Order Book code you can find in QuickFAST package (FIX protocol engine).

http://code.google.com/p/quickfast/source/browse/branches/?r=145#branches/OrderBook/src/OrderBook

daniel



W dniu 9 czerwca 2010 20:08 użytkownik Daniel Cegiełka
<[hidden email]> napisał:

> Hi
> It's interesting. Jeff Ryan plan to add Order Book in to IBrokers package.
>
> http://code.google.com/p/ibrokers/source/browse/trunk/WISHLIST
>
> In quantstrat package you can find some "??order book??" for
> placeOrder() function. I think it will be nice if this limitob could
> be easily integrated with this kind off packages.
>
> https://r-forge.r-project.org/scm/viewvc.php/pkg/quantstrat/R/orders.R?view=markup&revision=332&root=blotter
>
> regards,
> daniel
>
>
>
> 2010/6/9 Khanh Nguyen <[hidden email]>:
>> Hello,
>>
>> I am working with Andraw Liu, under the supervision of David Kane and
>> Jeff Enos ("backtest" and "portfolio" packages) to create a Limit
>> Order Book package that will model a limit order book.
>>
>> Our initial version of the package is on R-Forge at
>> https://r-forge.r-project.org/projects/limitob/
>>
>> We would appreciate suggestions and comments as to what functionality
>> the package should have. Currently, we have implemented the following
>> functions
>>
>> --- "show", "summary", "plot", "display",
>> --- "best.bid", "best.ask",
>> --- "bid.price.levels", "ask.price.levels", "total.price.levels",
>> --- "bid.orders", "ask.orders", "total.orders",
>> --- "mid.point", "inside.market", "spread", "snapshot",
>> ---  "add.order", "remove.order", "replace.order", "market.order"
>>
>> Additionally, we were wondering what a good name for the package would
>> be--Limit Order Book sounds kind of clunky and we were thinking that
>> maybe "order.book", "orderbook", "limitorderbook",  simply "lob" would
>> work better. Suggestions on that would be helpful too!
>>
>> We will summarize any responses we receive and send an email to the
>> listserv in a week.
>>
>> Regards,
>>
>> Andrew and Khanh
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions should go.
>>
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: RFC - Limit Order Book Package

Rob Forler
In reply to this post by Khanh Nguyen-2
Would also probably be valuable to model hidden orders.

-Rob

On Wed, Jun 9, 2010 at 12:27 PM, Khanh Nguyen <[hidden email]>wrote:

> Hello,
>
> I am working with Andraw Liu, under the supervision of David Kane and
> Jeff Enos ("backtest" and "portfolio" packages) to create a Limit
> Order Book package that will model a limit order book.
>
> Our initial version of the package is on R-Forge at
> https://r-forge.r-project.org/projects/limitob/
>
> We would appreciate suggestions and comments as to what functionality
> the package should have. Currently, we have implemented the following
> functions
>
> --- "show", "summary", "plot", "display",
> --- "best.bid", "best.ask",
> --- "bid.price.levels", "ask.price.levels", "total.price.levels",
> --- "bid.orders", "ask.orders", "total.orders",
> --- "mid.point", "inside.market", "spread", "snapshot",
> ---  "add.order", "remove.order", "replace.order", "market.order"
>
> Additionally, we were wondering what a good name for the package would
> be--Limit Order Book sounds kind of clunky and we were thinking that
> maybe "order.book", "orderbook", "limitorderbook",  simply "lob" would
> work better. Suggestions on that would be helpful too!
>
> We will summarize any responses we receive and send an email to the
> listserv in a week.
>
> Regards,
>
> Andrew and Khanh
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: RFC - Limit Order Book Package

Jeffrey Ryan
In reply to this post by Khanh Nguyen-2
Hi Khanh,

Sounds excellent!  One note on integration ease/etc.  In general S4 is
toxic.

Is there a particular reason for using S3 over S4?  I realize this isn't
on-topic per se, but it will affect other packages ability to use (and use
in general, as interoperability is the name of the game these days)

S4 really isn't excellent for much at present, in my biased though rather
lengthy experience in this area.

Aside from general obfuscation and bugginess to S4 itself, the only other
thing it can do that S3 can't do directly is dispatch on multiple args and
provide some sort of protection with respect to types per slot.

If we restrict to a paradigm where objects only are altered with accessor
functions (recommended), then all the type checking can be handled there.
 Multiple args as far as I can tell don't/won't come into play here though.
 At least not in a way that would warrant all the "bad" of S4.

Additionally S4 is not overly friendly to large objects, as any slot
manipulation does a full object copy.  Order book is large almost by
definition.

As another possible point of interest, you could take a look at the RTAQ
package to see what they did for TAQ data.

Take it or leave it, for general widespread use and all the benefits of
that, S4 isn't going to be a friend on this.

Awesome potential and work thus far though, and awesome work so far on
RQuantLib et al...

My [S]3c. ;-)

Jeff

On Wed, Jun 9, 2010 at 12:27 PM, Khanh Nguyen <[hidden email]>wrote:

> Hello,
>
> I am working with Andraw Liu, under the supervision of David Kane and
> Jeff Enos ("backtest" and "portfolio" packages) to create a Limit
> Order Book package that will model a limit order book.
>
> Our initial version of the package is on R-Forge at
> https://r-forge.r-project.org/projects/limitob/
>
> We would appreciate suggestions and comments as to what functionality
> the package should have. Currently, we have implemented the following
> functions
>
> --- "show", "summary", "plot", "display",
> --- "best.bid", "best.ask",
> --- "bid.price.levels", "ask.price.levels", "total.price.levels",
> --- "bid.orders", "ask.orders", "total.orders",
> --- "mid.point", "inside.market", "spread", "snapshot",
> ---  "add.order", "remove.order", "replace.order", "market.order"
>
> Additionally, we were wondering what a good name for the package would
> be--Limit Order Book sounds kind of clunky and we were thinking that
> maybe "order.book", "orderbook", "limitorderbook",  simply "lob" would
> work better. Suggestions on that would be helpful too!
>
> We will summarize any responses we receive and send an email to the
> listserv in a week.
>
> Regards,
>
> Andrew and Khanh
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>



--
Jeffrey Ryan
[hidden email]

ia: insight algorithmics
www.insightalgo.com

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: RFC - Limit Order Book Package

Patrick Burns-2
I think Jeff's points are on topic in that
having the best financial toys to play with
is in all of our interests.

I'm quite neutral on the subject.  My code is
S3, but so it can be compatible with S-PLUS.
A priori I think Jeff's opinions are likely
to be very good, and I don't have any solid
experience myself with S4.

But I'm confused.  The Bioconductor code is all
S4 and the genomics data they deal with is
usually huge.

Pat

On 09/06/2010 21:00, Jeff Ryan wrote:

> Hi Khanh,
>
> Sounds excellent!  One note on integration ease/etc.  In general S4 is
> toxic.
>
> Is there a particular reason for using S3 over S4?  I realize this isn't
> on-topic per se, but it will affect other packages ability to use (and use
> in general, as interoperability is the name of the game these days)
>
> S4 really isn't excellent for much at present, in my biased though rather
> lengthy experience in this area.
>
> Aside from general obfuscation and bugginess to S4 itself, the only other
> thing it can do that S3 can't do directly is dispatch on multiple args and
> provide some sort of protection with respect to types per slot.
>
> If we restrict to a paradigm where objects only are altered with accessor
> functions (recommended), then all the type checking can be handled there.
>   Multiple args as far as I can tell don't/won't come into play here though.
>   At least not in a way that would warrant all the "bad" of S4.
>
> Additionally S4 is not overly friendly to large objects, as any slot
> manipulation does a full object copy.  Order book is large almost by
> definition.
>
> As another possible point of interest, you could take a look at the RTAQ
> package to see what they did for TAQ data.
>
> Take it or leave it, for general widespread use and all the benefits of
> that, S4 isn't going to be a friend on this.
>
> Awesome potential and work thus far though, and awesome work so far on
> RQuantLib et al...
>
> My [S]3c. ;-)
>
> Jeff
>
> On Wed, Jun 9, 2010 at 12:27 PM, Khanh Nguyen<[hidden email]>wrote:
>
>> Hello,
>>
>> I am working with Andraw Liu, under the supervision of David Kane and
>> Jeff Enos ("backtest" and "portfolio" packages) to create a Limit
>> Order Book package that will model a limit order book.
>>
>> Our initial version of the package is on R-Forge at
>> https://r-forge.r-project.org/projects/limitob/
>>
>> We would appreciate suggestions and comments as to what functionality
>> the package should have. Currently, we have implemented the following
>> functions
>>
>> --- "show", "summary", "plot", "display",
>> --- "best.bid", "best.ask",
>> --- "bid.price.levels", "ask.price.levels", "total.price.levels",
>> --- "bid.orders", "ask.orders", "total.orders",
>> --- "mid.point", "inside.market", "spread", "snapshot",
>> ---  "add.order", "remove.order", "replace.order", "market.order"
>>
>> Additionally, we were wondering what a good name for the package would
>> be--Limit Order Book sounds kind of clunky and we were thinking that
>> maybe "order.book", "orderbook", "limitorderbook",  simply "lob" would
>> work better. Suggestions on that would be helpful too!
>>
>> We will summarize any responses we receive and send an email to the
>> listserv in a week.
>>
>> Regards,
>>
>> Andrew and Khanh
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
>
>

--
Patrick Burns
[hidden email]
http://www.burns-stat.com

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.