Be the first to rate this file! 170 downloads (last 30 days) File Size: 33.11 KB File ID: #23514

Order book simulation

by Dimitri Shvorob

 

01 Apr 2009

No BSD License  

(a naive artificial stock market)

Download Now | Watch this File

File Information
Description

Submission presents a set of classes that can be used to simulate operation of an exchange order book allowing market and limit orders. My focus has been on overall design - as adapted to Matlab - and a few implementation details have been skipped; notably, limit orders are not crossed with one another.

Please see the included PDF and run OrderBookDemo.m to test the code. A ‘live’ price-volume chart will appear and run for one minute; once the simulation concludes, you can inspect order and trade histories by examining active objects. You will need to re-start Matlab to re-run the simulation.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Scrolling display, The Object of My Callback

MATLAB release MATLAB 7.7 (R2008b)
Zip File Content  
Other Files
Order Book/CharKeyHashtable.m,
Order Book/DataVendor.m,
Order Book/Exchange.m,
Order Book/Order Book.pdf,
Order Book/Order.m,
Order Book/OrderBook.m,
Order Book/OrderBookDemo.m,
Order Book/OrderHeap.m,
Order Book/OrderQueue.m,
Order Book/OrderWrapper.m,
Order Book/PriorityQueue.m,
Order Book/Queue.m,
Order Book/RandomOrderStrategy.m,
Order Book/Settings.m,
Order Book/Strategy.m,
Order Book/TickerTape.m,
Order Book/TimerDriven.m,
Order Book/TradeAnnouncement.m,
Order Book/TradeConfirmation.m,
Order Book/Trader.m,
Order Book/TradeRecord.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
order book exchange continuous double auction Dimitri Shvorob 01 Apr 2009 14:14:45
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com