danielktaylor / PyLimitBook

Python implementation of fast limit-order book.
MIT License
302 stars 69 forks source link

how to run your code? #1

Closed richardvancouver closed 8 years ago

richardvancouver commented 8 years ago

sudo python tseries.py? how to input data?

danielktaylor commented 8 years ago

Create a CSV file in the format described in the README and pass it into one of the 4 python programs under python 2.

richardvancouver commented 8 years ago

how to pass csv file into python?

.csv > .py ?

On Fri, Jan 15, 2016 at 8:56 AM, Dan notifications@github.com wrote:

Create a CSV file in the format described in the README and pass it into one of the 4 python programs under python 2.

— Reply to this email directly or view it on GitHub https://github.com/yoblin/PyLimitBook/issues/1#issuecomment-172014797.

danielktaylor commented 8 years ago

Unfortunately, this is not intended to be an end-user product. It is more a code sample for you to modify. If you are not familiar with Python and the command line, the project won't be very useful to you.

richardvancouver commented 8 years ago

I ran it, I used 'python .py .csv

The error I met is :

/PyLimitBook-master$ python parse.py XOM_BATS_2010-11-10.csv

Input: B,XOM,BATS,571233,100,5.0,31016608

Traceback (most recent call last): File "parse.py", line 26, in print (quotebook) File "/home/rui/Desktop/QUANT/matchingsimulation/PyLimitBook-master/book.py", line 83, in str file_str.write('%s' % v) File "/home/rui/Desktop/QUANT/matchingsimulation/PyLimitBook-master/orderList.py", line 84, in str for order in self: TypeError: iter() returned non-iterator of type 'OrderList'

On Fri, Jan 15, 2016 at 9:52 AM, Dan notifications@github.com wrote:

Closed #1 https://github.com/yoblin/PyLimitBook/issues/1.

— Reply to this email directly or view it on GitHub https://github.com/yoblin/PyLimitBook/issues/1#event-516424550.

danielktaylor commented 8 years ago

Running Python 2.7.10 with the sample data and parse.py:

LM-SJN-00876446:PyLimitBook-master $ python parse.py sample_data/XOM_BATS_2010-11-10.csv

Input: B,XOM,BATS,571233,100,5.0,31016608

------ Bids -------
100 @   5.0000

------ Asks -------

------ Trades ------
richardvancouver commented 8 years ago

The code runs OK. Another question, does your code simulate matching of prices (such as market order or limit order matching)? Thank you very much!

Best, R.Yang

On Fri, Jan 15, 2016 at 11:32 AM, Dan notifications@github.com wrote:

Running Python 2.7.10 with the sample data and parse.py:

LM-SJN-00876446:PyLimitBook-master $ python parse.py sample_data/XOM_BATS_2010-11-10.csv

Input: B,XOM,BATS,571233,100,5.0,31016608

------ Bids ------- 100 @ 5.0000

------ Asks -------

------ Trades ------

— Reply to this email directly or view it on GitHub https://github.com/yoblin/PyLimitBook/issues/1#issuecomment-172062081.

danielktaylor commented 8 years ago

No unfortunately is does not do any matching simulation.