Skip to content

CallumAlexander/Market-Maker-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Market Maker Simulation

More like a python simulation of a market maker, rather than a market maker simulator
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This is just a hobby project with me trying to simulate how a Market Making entity within a financial market environment might perform using order flow and taking advantage of the bid-ask spread on certain assets. The inspiration for this project came when I was watching 'Eat the Rich: The GameStop Saga' on Netflix. One of the episodes explains Citadel's involvement in the drama, where it acted as a market maker for Robinhood trading GME.

(back to top)

Current Trading Strategy

The trading strategy of the market maker is designed to facilitate the buying and selling of securities. When a "buy" order is received, the market maker checks if the order price is equal to or greater than their "ask" price (the minimum price they are willing to sell the securities for). If it meets this condition and they have enough cash to cover the purchase, they execute the order. The market maker then adds the purchased securities to their inventory and deducts the cost from their available cash.

On the other hand, when a "sell" order is received, the market maker checks if the order price is equal to or less than their "bid" price (the maximum price they are willing to pay to buy the securities). If it meets this condition and they have enough securities in their inventory, they execute the order. The market maker then deducts the sold securities from their inventory and adds the revenue from the sale to their available cash.

If the order conditions are not met (either for "buy" or "sell"), the market maker does not execute the order.

This strategy allows the market maker to profit from the difference between their buying and selling prices, known as the bid-ask spread. By adjusting their bid and ask prices, the market maker can control the spread and manage their profitability. The strategy focuses on quick execution of trades and maintaining an inventory of securities to facilitate trading for buyers and sellers in the market.

Unfortunately, as per this current version of the simulation, this is not a very good strategy as it likes to take heavy losses! (for now...)

Getting Started

Under development

Prerequisites

Under development

Installation

Under development

Usage

To run this Python project, follow the steps below:

  1. Ensure you have Python installed: Before running the project, make sure you have Python installed on your system. You can download the latest version of Python from the official Python website (https://www.python.org/downloads/) and follow the installation instructions.

  2. Set up the environment: It is recommended to create a virtual environment to manage project dependencies and isolate them from other Python projects. Open a terminal or command prompt in the project directory and create a new virtual environment: python -m venv venv

  3. Activate the virtual environment:

    • On Windows: venv\Scripts\activate
    • On macOS and Linux: source venv/bin/activate
  4. Install project dependencies: With the virtual environment activated, install the required project dependencies using pip: pip install -r requirements.txt. Make sure you have the requirements.txt file containing the list of required packages and their versions for the project.

  5. Run the main script: Once the environment is set up and dependencies are installed, you can execute the main script of the project by running: python main.py. The main.py file is the entry point of the project, and running this command will start the project's execution.

  6. Observe the output: Depending on the project's current state, this could be quite interesting or obscenely boring.

To deactivate the virtual environment: When you are finished with the project, you can deactivate the virtual environment by running: deactivate

For more examples, please refer to the Documentation which is currently a work in progress, if at all existent.

(back to top)

Roadmap

  • Update the README
    • Update the installation section
    • Update the prerequisites section
    • Update the Usage section
  • Get a license
    • Add license to the Readme

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community truly remarkable, as they foster learning, inspiration, and innovation. Your contributions are incredibly valuable and deeply appreciated.

If you have any suggestions to enhance this project, please consider forking the repository and creating a pull request. Alternatively, you can open an issue with the "enhancement" tag. Your input is highly valued.

And, of course, don't forget to give this project a star! Thank you once again for your support and contributions!

  1. Clone the Project locally
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Callum Alexander

Project Link: https://github.com/CallumAlexander/Market-Maker-Simulator

(back to top)

Acknowledgments

  • 'Eat the Rich: The GameStop Saga' for inspiring this hobby project.

(back to top)

About

More like a python simulation of a market maker, rather than a market maker simulator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages