{"repo":"jmcph4/PyOBSim","free":true,"listed":false,"github":"https://github.com/jmcph4/PyOBSim","clone":"git clone https://github.com/jmcph4/PyOBSim.git","description":"A Python module for market simulation","language":"Python","stars":24,"topics":["python","market-simulator","order-book","lob","limit-order-book","market","fintech","finance","trading","stock-market"],"license":"MIT","category":"trading","readme_excerpt":"PyOBSim - the Python Order Book Simulator # --- PyOBSim is a Python module facilitating market simulation by implementing an order book and other utilities. PyOBSim aims to make testing of trading algorithms clean and simple. Running simulations is straightforward: simply provide an order flow and fire away: from pyobsim import # build our participants alice = participant.Participant(\"Alice\", 100, 0) # $100, no units bob = participant.Participant(\"Bob\", 0, 120) # $0, 120 units sim = simulation.Simulation(\"My Simulation\", [], [alice, bob]) sim.load(\"order flow.csv\") # load our order flow from CSV file sim.run() print(sim) This gives us our summary: Simulation My Simulation --- Statement of Accounts Alice: $100.0 with 0 units Bob: $0.0 with 120 units --- Market as at present 'GOOG' If we want to inspect the book for GOOG : print(sim.books[\"GOOG\"]) We get: Book for GOOG Spread is $0.5 === Ask Price Quantity -------------------------------------------------------------------------------- $1.0 100 $0.5 10 -------------------------------------------------------------------------------- Price Quantity Bid","default_branch":null,"files":null,"tree":[],"storefront":"/r/jmcph4","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jmcph4/PyOBSim/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}