Metadata-Version: 2.4
Name: simtrading-engine
Version: 0.1.0
Summary: A Python backtesting engine for trading strategies, designed for SimTrading platform.
Author-email: Arthur Hottier <contact@simtrading.fr>
License: MIT License
        
        Copyright (c) 2025 Arthur Hottier
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/ArthurHtr/trading-plateform
Project-URL: Bug Tracker, https://github.com/ArthurHtr/trading-plateform/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: tqdm
Requires-Dist: pandas
Requires-Dist: numpy
Dynamic: license-file

# SimTrading Engine

A lightweight and flexible Python backtesting engine designed for testing trading strategies with the SimTrading platform.

## Features

- **Event-driven Architecture**: Simulates market data replay candle by candle.
- **Strategy Interface**: Easy-to-implement `BaseStrategy` class.
- **Remote & Local Execution**: Run backtests locally or connect to a remote platform.
- **Detailed Reporting**: Generates comprehensive logs and metrics (PnL, Drawdown, etc.).

## Installation

You can install the package from PyPI:

```bash
pip install simtrading-engine
```

Or from source:

```bash
pip install -e .
```

## Usage

### Defining a Strategy

Create a new class inheriting from `BaseStrategy`:

```python
from simtrading.backtest_engine.strategy.base import BaseStrategy
from simtrading.backtest_engine.entities.order_intent import OrderIntent, OrderSide, OrderType

class MyStrategy(BaseStrategy):
    def on_bar(self, context):
        # Your logic here
        pass
```

### Running a Backtest

```python
from simtrading.runners.local_runner import run_local_backtest
# or
from simtrading.runners.remote_runner import run_remote_backtest
from my_strategy import MyStrategy

strategy = MyStrategy()

# See examples in the repository for more details.
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
