midastrader


Namemidastrader JSON
Version 1.0.25 PyPI version JSON
download
home_pageNone
SummaryA robust backtesting and live trading engine designed for seamless strategy development and deployment. It supports user-defined strategies, multi-threaded execution, and integrations with brokers and data sources.
upload_time2025-03-01 21:11:37
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseApache-2.0
keywords algorithmic-trading event-driven-backtest quantitative-finance finance markets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MidasTrader

[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
[![pypi-version](https://img.shields.io/pypi/v/midastrader.svg)](https://pypi.org/project/midastrader/)

MidasTrader is a robust trading system designed for seamless transitions between backtesting and live trading without requiring changes to user code. It integrates a flexible architecture combining a data engine, execution engine, and core components that streamline the strategy development process. The system is built with a multi-threaded design where each component communicates via a shared message bus.

### Key Components

1. **Core Engine**:

   - Central to the system, the Core Engine includes:
     - **Order Book**: Tracks market depth and price movements.
     - **Portfolio Server**: Manages and tracks portfolio allocations and positions.
     - **Performance Tracking**: Calculates and monitors key trading metrics.
     - **Order Management System**: Handles order placement, modifications, and cancellations.
     - **Base Strategy**: A foundation for user-defined strategies.

2. **Data Engine**:

   - Connects to user-defined data sources:
     - **Midas Server**: Access historical data via the Midas ecosystem.
     - **Binary Data Files**: Handles local files encoded with the Midas Binary Encoding Library.
     - **External Sources**: Currently supports Databento, with more integrations planned.

3. **Execution Engine**:

   - Facilitates live trading by connecting to brokers:
     - Currently supports Interactive Brokers.
     - Users can configure broker details in the `config.toml` file.

## Installation

You can install `midastrader` directly from [PyPI](https://pypi.org/project/midastrader/):

```bash
pip install midastrader
```

## Configuration

### Configuration File (`config.toml`)

Define system parameters, including data sources, execution settings, and strategy configuration.

- Example : [config.toml](example/config.toml)

### Strategy File (`logic.py`)

Strategies are implemented by extending the `BaseStrategy` class. Define your custom logic in Python.

- Example : [logic.py](example/logic.py)

## Usage

#### CLI Mode

Run the system using the following commands:

```bash
# Backtest Mode
midas path/to/config.toml backtest

# Live Mode
midas path/to/config.toml live
```

#### Application Mode

Alternatively, you can use the system programmatically in your application:

```python
from midas.cli import run

# Backtest Mode
run("path/to/config.toml", "backtest")

# Live Mode
run("path/to/config.toml", "live")
```

## Supported Features

<!-- | ✅  | Alpha Vantage           | -->
<!-- | ❌  | Yahoo Finance (Planned) | -->
<!-- | ❌  | Quandl (Planned)        | -->

|     | **Data Vendors** |
| --- | ---------------- |
| ✅  | Databento        |

|     | **Brokers**         |
| --- | ------------------- |
| ✅  | Interactive Brokers |

<!-- | ✅  | TD Ameritrade       | -->
<!-- | ❌  | E\*TRADE            | -->
<!-- | ❌  | Robinhood           | -->

## Future Plans

- Add more data sources.
- Integrate additional brokers.

## Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request with suggestions or improvements.

## License

This project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "midastrader",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "algorithmic-trading, event-driven-backtest, quantitative-finance, finance, markets",
    "author": null,
    "author_email": "Anthony Baxter <anthonybaxter819@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a6/81/91a8156e97e04067bec18b99c1bf2a57aa7fdcc7722748432c6b3e1450fb/midastrader-1.0.25.tar.gz",
    "platform": null,
    "description": "# MidasTrader\n\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n[![pypi-version](https://img.shields.io/pypi/v/midastrader.svg)](https://pypi.org/project/midastrader/)\n\nMidasTrader is a robust trading system designed for seamless transitions between backtesting and live trading without requiring changes to user code. It integrates a flexible architecture combining a data engine, execution engine, and core components that streamline the strategy development process. The system is built with a multi-threaded design where each component communicates via a shared message bus.\n\n### Key Components\n\n1. **Core Engine**:\n\n   - Central to the system, the Core Engine includes:\n     - **Order Book**: Tracks market depth and price movements.\n     - **Portfolio Server**: Manages and tracks portfolio allocations and positions.\n     - **Performance Tracking**: Calculates and monitors key trading metrics.\n     - **Order Management System**: Handles order placement, modifications, and cancellations.\n     - **Base Strategy**: A foundation for user-defined strategies.\n\n2. **Data Engine**:\n\n   - Connects to user-defined data sources:\n     - **Midas Server**: Access historical data via the Midas ecosystem.\n     - **Binary Data Files**: Handles local files encoded with the Midas Binary Encoding Library.\n     - **External Sources**: Currently supports Databento, with more integrations planned.\n\n3. **Execution Engine**:\n\n   - Facilitates live trading by connecting to brokers:\n     - Currently supports Interactive Brokers.\n     - Users can configure broker details in the `config.toml` file.\n\n## Installation\n\nYou can install `midastrader` directly from [PyPI](https://pypi.org/project/midastrader/):\n\n```bash\npip install midastrader\n```\n\n## Configuration\n\n### Configuration File (`config.toml`)\n\nDefine system parameters, including data sources, execution settings, and strategy configuration.\n\n- Example : [config.toml](example/config.toml)\n\n### Strategy File (`logic.py`)\n\nStrategies are implemented by extending the `BaseStrategy` class. Define your custom logic in Python.\n\n- Example : [logic.py](example/logic.py)\n\n## Usage\n\n#### CLI Mode\n\nRun the system using the following commands:\n\n```bash\n# Backtest Mode\nmidas path/to/config.toml backtest\n\n# Live Mode\nmidas path/to/config.toml live\n```\n\n#### Application Mode\n\nAlternatively, you can use the system programmatically in your application:\n\n```python\nfrom midas.cli import run\n\n# Backtest Mode\nrun(\"path/to/config.toml\", \"backtest\")\n\n# Live Mode\nrun(\"path/to/config.toml\", \"live\")\n```\n\n## Supported Features\n\n<!-- | \u2705  | Alpha Vantage           | -->\n<!-- | \u274c  | Yahoo Finance (Planned) | -->\n<!-- | \u274c  | Quandl (Planned)        | -->\n\n|     | **Data Vendors** |\n| --- | ---------------- |\n| \u2705  | Databento        |\n\n|     | **Brokers**         |\n| --- | ------------------- |\n| \u2705  | Interactive Brokers |\n\n<!-- | \u2705  | TD Ameritrade       | -->\n<!-- | \u274c  | E\\*TRADE            | -->\n<!-- | \u274c  | Robinhood           | -->\n\n## Future Plans\n\n- Add more data sources.\n- Integrate additional brokers.\n\n## Contributing\n\nContributions are welcome! Feel free to open an issue or submit a pull request with suggestions or improvements.\n\n## License\n\nThis project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A robust backtesting and live trading engine designed for seamless strategy development and deployment. It supports user-defined strategies, multi-threaded execution, and integrations with brokers and data sources.",
    "version": "1.0.25",
    "project_urls": null,
    "split_keywords": [
        "algorithmic-trading",
        " event-driven-backtest",
        " quantitative-finance",
        " finance",
        " markets"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "db00a4c11ab2a83c7e61a424af7e06b64721453766c5f3b9499da6858a534768",
                "md5": "62ddc8382e4b3455a4de4af7b2ba2ab9",
                "sha256": "54ca85f352b34cf2e4f643af59f7725be7a44f42fac116d02238d6c595ff4800"
            },
            "downloads": -1,
            "filename": "midastrader-1.0.25-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "62ddc8382e4b3455a4de4af7b2ba2ab9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 112776,
            "upload_time": "2025-03-01T21:11:35",
            "upload_time_iso_8601": "2025-03-01T21:11:35.464223Z",
            "url": "https://files.pythonhosted.org/packages/db/00/a4c11ab2a83c7e61a424af7e06b64721453766c5f3b9499da6858a534768/midastrader-1.0.25-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a68191a8156e97e04067bec18b99c1bf2a57aa7fdcc7722748432c6b3e1450fb",
                "md5": "012dcdae4e296f74db14c768ef566d59",
                "sha256": "93943fd68416e41c97c2b31419a3acca7f63dde70075ae8d06a3fa61e63c01cc"
            },
            "downloads": -1,
            "filename": "midastrader-1.0.25.tar.gz",
            "has_sig": false,
            "md5_digest": "012dcdae4e296f74db14c768ef566d59",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 88768,
            "upload_time": "2025-03-01T21:11:37",
            "upload_time_iso_8601": "2025-03-01T21:11:37.369512Z",
            "url": "https://files.pythonhosted.org/packages/a6/81/91a8156e97e04067bec18b99c1bf2a57aa7fdcc7722748432c6b3e1450fb/midastrader-1.0.25.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-03-01 21:11:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "midastrader"
}
        
Elapsed time: 1.28692s