py-backtesting-lib 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Backtesting/__init__.py +0 -0
- Backtesting/analysis/__init__.py +11 -0
- Backtesting/analysis/persistence/__init__.py +5 -0
- Backtesting/analysis/persistence/event_sink.py +133 -0
- Backtesting/analysis/reports/__init__.py +5 -0
- Backtesting/analysis/reports/console_report.py +73 -0
- Backtesting/analysis/result.py +42 -0
- Backtesting/definition/__init__.py +7 -0
- Backtesting/definition/configs/__init__.py +8 -0
- Backtesting/definition/configs/base.py +31 -0
- Backtesting/definition/core/__init__.py +22 -0
- Backtesting/definition/core/domain_models.py +165 -0
- Backtesting/definition/experiment.py +142 -0
- Backtesting/definition/plugins/__init__.py +3 -0
- Backtesting/definition/plugins/base_interfaces.py +126 -0
- Backtesting/definition/plugins/plugin_registry.py +26 -0
- Backtesting/execution/__init__.py +22 -0
- Backtesting/execution/books/__init__.py +11 -0
- Backtesting/execution/books/order_book.py +130 -0
- Backtesting/execution/books/position_book.py +136 -0
- Backtesting/execution/books/trade_book.py +88 -0
- Backtesting/execution/engine.py +57 -0
- Backtesting/execution/event.py +44 -0
- Backtesting/execution/market_data.py +108 -0
- Backtesting/execution/pipeline.py +105 -0
- Backtesting/execution/portfolio.py +72 -0
- Backtesting/experiments/base.yaml +32 -0
- Backtesting/main.py +148 -0
- Backtesting/plugins/__init__.py +13 -0
- Backtesting/plugins/brokers/__init__.py +3 -0
- Backtesting/plugins/brokers/instant_market_fill.py +26 -0
- Backtesting/plugins/market_data/__init__.py +3 -0
- Backtesting/plugins/market_data/dummy_data_provider.py +32 -0
- Backtesting/plugins/money_managers/__init__.py +3 -0
- Backtesting/plugins/money_managers/fixed_quality.py +36 -0
- Backtesting/plugins/strategies/SMA_crossovr.py +52 -0
- Backtesting/plugins/strategies/__init__.py +3 -0
- py_backtesting_lib-0.1.0.dist-info/METADATA +281 -0
- py_backtesting_lib-0.1.0.dist-info/RECORD +42 -0
- py_backtesting_lib-0.1.0.dist-info/WHEEL +4 -0
- py_backtesting_lib-0.1.0.dist-info/entry_points.txt +2 -0
- py_backtesting_lib-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: py-backtesting-lib
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A modular, experiment-driven framework for deterministic trading strategy backtests.
|
|
5
|
+
Project-URL: Homepage, https://github.com/zhirodadkhah/python-bakctesting-lib
|
|
6
|
+
Project-URL: Repository, https://github.com/zhirodadkhah/python-bakctesting-lib
|
|
7
|
+
Project-URL: Documentation, https://github.com/zhirodadkhah/python-bakctesting-lib/tree/main/docs
|
|
8
|
+
Author-email: "Abdullah Dadkhah (Zhiro)" <zhirodadkhah@gmail.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: duckdb>=0.9.0
|
|
22
|
+
Requires-Dist: pydantic>=2.0
|
|
23
|
+
Requires-Dist: pyyaml>=6.0
|
|
24
|
+
Requires-Dist: typer>=0.9.0
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# py-backtesting-lib
|
|
28
|
+
|
|
29
|
+
**Project:** Python Backtesting
|
|
30
|
+
**Purpose:** A modular, experiment-driven framework for executing deterministic trading strategy backtests. It separates strategy logic, money management, execution simulation, and analysis into independent, plugin-based components.
|
|
31
|
+
**Maintainer:** Abdullah Dadkhah (Zhiro)
|
|
32
|
+
**Last Updated:** 2026-07-25
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
This project is a Python framework for running deterministic backtests on historical market data. It shifts the paradigm from "running strategies" to "running experiments."
|
|
38
|
+
|
|
39
|
+
The framework is built on Domain-Driven Design principles, strictly separating the Definition of a backtest from its Execution and Analysis. By treating the `Experiment` as the aggregate root and enforcing pure-data configurations, it allows researchers to evaluate, compare, and reproduce trading systems with scientific rigor.
|
|
40
|
+
|
|
41
|
+
## Vision
|
|
42
|
+
Trading research often mixes strategy logic with execution, position management, and reporting, making strategies difficult to reuse, debug, and compare.
|
|
43
|
+
|
|
44
|
+
This framework aims to provide a clean, decoupled simulation environment where:
|
|
45
|
+
* **Strategies** only decide what they want to do (emitting pure `Signals`).
|
|
46
|
+
* **Money Managers** decide how much to trade (sizing `Signals` into `Orders`).
|
|
47
|
+
* **The Execution Engine** simulates the broker (processing `Orders` into `Fills`).
|
|
48
|
+
* **The Books & Portfolio** track the exact state (Order, Position, and Trade books).
|
|
49
|
+
* **The Event Bus** records every micro-action as an immutable artifact.
|
|
50
|
+
* **Analysis Plugins** consume the final results to produce metrics and reports.
|
|
51
|
+
|
|
52
|
+
The goal is to make every backtest 100% reproducible, infinitely extensible, and easy to analyze.
|
|
53
|
+
|
|
54
|
+
## Core Architecture
|
|
55
|
+
The framework is divided into three distinct Bounded Contexts:
|
|
56
|
+
|
|
57
|
+
### 1. Experiment Definition (The "What")
|
|
58
|
+
Everything needed to describe a backtest. Contains no execution logic.
|
|
59
|
+
* **Plugin Registry:** Catalog of available Strategies, Money Managers, Brokers, and Reporters.
|
|
60
|
+
* **Pure Data Configurations:** Serializable parameters (YAML/JSON) that bind to plugins using a standardized two-part structure: `name` (plugin identifier) + `params` (flexible configuration dictionary).
|
|
61
|
+
* **The Experiment:** The aggregate root that encapsulates the entire setup. Validates that all plugin `name` fields resolve to registered implementations.
|
|
62
|
+
|
|
63
|
+
### 2. Execution (The "How")
|
|
64
|
+
The "dumb" orchestrator and runtime objects. It knows nothing of reporting or persistence.
|
|
65
|
+
* **Execution Engine:** The synchronous, single-threaded event loop that iterates over market data bar-by-bar.
|
|
66
|
+
* **The Pipeline:** `Strategy` → `Signal` → `Money Manager` → `Order` → `Broker` → `Fill`.
|
|
67
|
+
* **The Books:** Separated subsystems for `OrderBook`, `PositionBook`, and `TradeBook` (state is mutated only via `apply_` methods driven by events).
|
|
68
|
+
* **Event Bus:** An immutable event log (`SignalGenerated`, `OrderFilled`, etc.) allowing full state reconstruction.
|
|
69
|
+
* **Mark-to-Market First:** Portfolio equity is updated with current market prices before strategies generate signals on each new bar.
|
|
70
|
+
|
|
71
|
+
### 3. Analysis (The "Result")
|
|
72
|
+
Consumes the output of the execution to produce insights.
|
|
73
|
+
* **Experiment Result:** An immutable aggregate containing final Portfolio state, Book snapshots, and the full Event Log.
|
|
74
|
+
* **Report Plugins:** Modular analyzers that are pure functions of the `ExperimentResult`.
|
|
75
|
+
* **Event Persistence:** All domain events are persisted to DuckDB/SQLite as they occur, enabling full state reconstruction by replaying events from disk.
|
|
76
|
+
|
|
77
|
+
## Features
|
|
78
|
+
* **Experiment-Driven Reproducibility:** Save the exact state of a backtest in a single YAML file. Rerun it years later with identical results.
|
|
79
|
+
* **Plugin Architecture:** Easily swap Strategies, Money Managers, Brokers, and Reporters without touching the core engine.
|
|
80
|
+
* **First-Class Signals:** Strategies emit intent (`Signal`) rather than orders, completely decoupling alpha generation from risk/account sizing.
|
|
81
|
+
* **Immutable Event Sourcing:** Every state change is logged as an event. Debug any point in the backtest by replaying the event log.
|
|
82
|
+
* **Separated State Books:** Clean separation of `OrderBook`, `PositionBook`, and `TradeBook`. Trades are only archived when net position hits zero.
|
|
83
|
+
* **Deterministic Execution:** Guaranteed identical results across runs. Single-threaded, synchronous loop prevents concurrency non-determinism.
|
|
84
|
+
* **Financial Precision:** Uses Python's `Decimal` for all financial math to prevent IEEE 754 floating-point drift.
|
|
85
|
+
|
|
86
|
+
## Scope
|
|
87
|
+
**In Scope:** Historical backtest execution, experiment definition, plugin architecture, first-class Signal/Order management, broker simulation, separated state tracking, portfolio management, immutable event logging, console reporting, CLI interface, CSV/Dummy Market Data, DuckDB persistence.
|
|
88
|
+
|
|
89
|
+
**Out of Scope:** Live broker APIs, technical indicator libraries, ML models, parameter optimization (grid search), GUI/dashboards, live websockets, cloud storage.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Configuration
|
|
94
|
+
Instead of writing code to configure a run, you define an Experiment using pure data. The framework uses a strict `name` + `params` structure for all plugins.
|
|
95
|
+
|
|
96
|
+
**Example `experiments/beta_test.yaml`:**
|
|
97
|
+
```yaml
|
|
98
|
+
experiment:
|
|
99
|
+
name: "SMA Crossover Beta Test"
|
|
100
|
+
metadata:
|
|
101
|
+
author: "Zhiro"
|
|
102
|
+
version: "1.0"
|
|
103
|
+
|
|
104
|
+
configs:
|
|
105
|
+
strategy:
|
|
106
|
+
name: "SMA_Crossover_Strategy"
|
|
107
|
+
params:
|
|
108
|
+
fast_period: 5
|
|
109
|
+
slow_period: 10
|
|
110
|
+
symbol: "DUMMY"
|
|
111
|
+
|
|
112
|
+
money_management:
|
|
113
|
+
name: "Fixed_Qty_MoneyManager"
|
|
114
|
+
params:
|
|
115
|
+
trade_quantity: 10.0
|
|
116
|
+
|
|
117
|
+
broker:
|
|
118
|
+
name: "Simple_Market_Broker"
|
|
119
|
+
params:
|
|
120
|
+
commission_per_trade: 1.50
|
|
121
|
+
initial_capital: 100000
|
|
122
|
+
|
|
123
|
+
market_data:
|
|
124
|
+
name: "Dummy_Market_Data"
|
|
125
|
+
params:
|
|
126
|
+
num_bars: 50
|
|
127
|
+
symbol: "DUMMY"
|
|
128
|
+
start_price: 100.0
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Sample Plugins vs. Custom Implementation
|
|
134
|
+
|
|
135
|
+
To help you get started and verify the framework is working, this repository includes a `plugins/` directory with **Sample Plugins** (SMA Crossover Strategy, Fixed Quantity Money Manager, Simple Market Broker, and Dummy Market Data). These are used for the integrated beta test.
|
|
136
|
+
|
|
137
|
+
### ⚠️ Important: You Must Implement Your Own Plugins
|
|
138
|
+
The framework provides the **Engine**, the **Interfaces**, and the **Event Sourcing** infrastructure. It **does not** provide a library of trading strategies or alpha signals.
|
|
139
|
+
|
|
140
|
+
The sample plugins in the `plugins/` directory are strictly for demonstration and testing purposes. To run your own trading logic, you must:
|
|
141
|
+
1. Create your own Python classes that inherit from the base interfaces located in `Backtesting/definition/plugins/base_interfaces.py` (`Strategy`, `MoneyManager`, `Broker`, `MarketDataProvider`).
|
|
142
|
+
2. Register them in the `PluginRegistry` (usually done in your plugin module's `__init__.py`).
|
|
143
|
+
3. Reference their registered `name` in your YAML configuration file.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Running the Backtest
|
|
148
|
+
|
|
149
|
+
There are two ways to interact with this project: via the **CLI** (for quick runs and testing) or as a **Framework** (for integration into larger research pipelines).
|
|
150
|
+
|
|
151
|
+
### 1. Running via CLI (`main.py`)
|
|
152
|
+
The CLI is built using Typer. Because there is currently only one command (`run`), Typer makes it the default. Therefore, you **do not** type the word "run" in the command.
|
|
153
|
+
|
|
154
|
+
**Command:**
|
|
155
|
+
```bash
|
|
156
|
+
python -m Backtesting.main -c experiments/beta_test.yaml
|
|
157
|
+
# OR
|
|
158
|
+
python -m Backtesting.main --config experiments/beta_test.yaml
|
|
159
|
+
```
|
|
160
|
+
*Note: Always execute via `python -m Backtesting.main` to ensure relative imports resolve correctly.*
|
|
161
|
+
|
|
162
|
+
### 2. Using as a Framework (Python API)
|
|
163
|
+
If you want to integrate the backtesting engine into a larger Python application, a Jupyter Notebook, or an optimization loop, you can import the core components directly:
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
from Backtesting.definition import Experiment
|
|
167
|
+
from Backtesting.definition.plugins.plugin_registry import resolve
|
|
168
|
+
from Backtesting.execution.engine import ExecutionEngine
|
|
169
|
+
from decimal import Decimal
|
|
170
|
+
|
|
171
|
+
# 1. Import your custom plugins to trigger their registration
|
|
172
|
+
import my_custom_plugins
|
|
173
|
+
|
|
174
|
+
# 2. Load the experiment definition
|
|
175
|
+
experiment_def = Experiment.from_yaml("path/to/my_experiment.yaml")
|
|
176
|
+
experiment_def.validate()
|
|
177
|
+
|
|
178
|
+
# 3. Resolve and instantiate plugins
|
|
179
|
+
strategy = resolve(experiment_def.strategy_config.name)()
|
|
180
|
+
strategy.initialize(experiment_def.strategy_config.params)
|
|
181
|
+
# ... instantiate MM, Broker, and Market Data similarly ...
|
|
182
|
+
|
|
183
|
+
# 4. Run the engine
|
|
184
|
+
engine = ExecutionEngine(
|
|
185
|
+
strategy=strategy,
|
|
186
|
+
money_manager=mm,
|
|
187
|
+
broker=broker,
|
|
188
|
+
initial_cash=Decimal('100000'),
|
|
189
|
+
market_data_provider=market_data
|
|
190
|
+
)
|
|
191
|
+
engine.run()
|
|
192
|
+
|
|
193
|
+
# 5. Access final state
|
|
194
|
+
print(f"Final Equity: {engine.portfolio.get_equity(engine.position_book)}")
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Technology Stack
|
|
200
|
+
| Component | Technology |
|
|
201
|
+
| :--- | :--- |
|
|
202
|
+
| **Language** | Python 3.10+ |
|
|
203
|
+
| **Data Validation** | Pydantic (for pure data configs) |
|
|
204
|
+
| **Event Persistence** | DuckDB / SQLite |
|
|
205
|
+
| **Data Storage** | Parquet / CSV (for market data) |
|
|
206
|
+
| **Testing** | Pytest |
|
|
207
|
+
| **CLI Framework** | Typer |
|
|
208
|
+
|
|
209
|
+
## Requirements & Installation
|
|
210
|
+
**Software:** Python 3.10+, Git
|
|
211
|
+
**Supported Platforms:** Linux, Windows, macOS
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
git clone <repository>
|
|
215
|
+
cd <project>
|
|
216
|
+
python -m venv .venv
|
|
217
|
+
source .venv/bin/activate # Linux/macOS
|
|
218
|
+
# .venv\Scripts\activate # Windows
|
|
219
|
+
pip install -e .
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Project Structure
|
|
223
|
+
The codebase is strictly organized by the three Bounded Contexts:
|
|
224
|
+
|
|
225
|
+
```text
|
|
226
|
+
project/
|
|
227
|
+
│
|
|
228
|
+
├── Backtesting/
|
|
229
|
+
│ ├── definition/ # Bounded Context 1: Experiment Definition
|
|
230
|
+
│ │ ├── configs/ # Pure data configuration models (Pydantic)
|
|
231
|
+
│ │ ├── plugins/ # Plugin registry and base interfaces (ABCs)
|
|
232
|
+
│ │ ├── core/ # Domain models (MarketBar, Signal, Order, Fill, Events)
|
|
233
|
+
│ │ └── experiment.py # The Experiment Aggregate Root
|
|
234
|
+
│ │
|
|
235
|
+
│ ├── execution/ # Bounded Context 2: Execution Engine
|
|
236
|
+
│ │ ├── engine.py # The "dumb" orchestrator / event loop
|
|
237
|
+
│ │ ├── pipeline.py # Signal -> Order -> Fill processing
|
|
238
|
+
│ │ ├── books/ # OrderBook, PositionBook, TradeBook
|
|
239
|
+
│ │ ├── portfolio.py # Balance, Equity, Margin tracking
|
|
240
|
+
│ │ ├── event.py # In-memory Event Bus
|
|
241
|
+
│ │ └── market_data.py # CSV Market Data Provider
|
|
242
|
+
│ │
|
|
243
|
+
│ ├── analysis/ # Bounded Context 3: Analysis & Reporting
|
|
244
|
+
│ │ ├── result.py # Experiment Result aggregate
|
|
245
|
+
│ │ ├── reports/ # Report plugins (Console Trade Report)
|
|
246
|
+
│ │ └── persistence/ # DuckDB/SQLite event sink
|
|
247
|
+
│ │
|
|
248
|
+
│ └── main.py # CLI entry point (Typer)
|
|
249
|
+
│
|
|
250
|
+
├── plugins/ # User implementations (Strategies, MMs, Brokers)
|
|
251
|
+
│ ├── strategies/ # e.g., SMA Crossover
|
|
252
|
+
│ ├── money_managers/ # e.g., Fixed Quantity
|
|
253
|
+
│ ├── brokers/ # e.g., Instant Market Fill
|
|
254
|
+
│ └── market_data/ # e.g., Dummy Data Generator
|
|
255
|
+
│
|
|
256
|
+
├── experiments/ # YAML configuration files
|
|
257
|
+
├── tests/ # Unit and integration tests (Pytest)
|
|
258
|
+
└── docs/ # Deep-dive documentation
|
|
259
|
+
├── ARCHITECTURE.md
|
|
260
|
+
├── DECISIONS.md
|
|
261
|
+
└── JOURNAL.md
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Documentation
|
|
265
|
+
Additional deep-dive documentation is available in:
|
|
266
|
+
* `docs/ARCHITECTURE.md` - Detailed breakdown of the Bounded Contexts and Domain Model.
|
|
267
|
+
* `docs/DECISIONS.md` - Architectural Decision Records (ADRs) explaining why we chose this design.
|
|
268
|
+
* `docs/JOURNAL.md` - Development log, debugging notes, and progress tracking.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## License
|
|
273
|
+
|
|
274
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
275
|
+
|
|
276
|
+
### What changed in this version:
|
|
277
|
+
1. **Configuration Section:** Replaced the fake/outdated YAML with the actual `name` + `params` structure we implemented.
|
|
278
|
+
2. **Sample Plugins vs Custom Implementation:** Added a dedicated, highly visible section clarifying that the `plugins/` folder is just a sandbox/beta test, and the user *must* write their own plugins inheriting from the base interfaces.
|
|
279
|
+
3. **Running the Backtest:** Split into two clear subsections. Fixed the Typer CLI command (`python -m Backtesting.main -c ...`) and added a Python API example for using it as a framework.
|
|
280
|
+
4. **Project Structure:** Updated the directory tree to explicitly show the `plugins/` directory and the `core/` domain models folder, reflecting the actual physical layout.
|
|
281
|
+
5. **Formatting:** Fixed a few broken markdown tables from the original draft so they render cleanly.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Backtesting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
Backtesting/main.py,sha256=NacKDwMkDm5YgM1c685mbdAfENVh7ByhlNbt1dPYPic,5728
|
|
3
|
+
Backtesting/analysis/__init__.py,sha256=_bSRGjWdVJtkZJUCD3fzbTrf9ugRX-7lkZfUcR77UDw,267
|
|
4
|
+
Backtesting/analysis/result.py,sha256=yTDJpO8iDvb4B-wS1R-9PMRDD7vbpFYBO-lgv87_sTA,1647
|
|
5
|
+
Backtesting/analysis/persistence/__init__.py,sha256=vH8hAgFg_bQ31fDEeFYG7C9_5Wa2A9c0XpCTHa0cCGU,118
|
|
6
|
+
Backtesting/analysis/persistence/event_sink.py,sha256=5pgLAD4FeQWGqZz7KVea344B6Q91D63aO4EzVFEQ9tE,5692
|
|
7
|
+
Backtesting/analysis/reports/__init__.py,sha256=EjaEFX3aBm6_Al5Xt-pm5kP7E60lFM0cBea8O7WhFIo,124
|
|
8
|
+
Backtesting/analysis/reports/console_report.py,sha256=wrWDtn6CCACNpy8kccEcTGwDcwe0ul01kgmV7Imm4ZQ,3139
|
|
9
|
+
Backtesting/definition/__init__.py,sha256=JjcG5Tru7Ulc5xHGTLonn4S3CwJyhJA6aI5ZSsbiZEk,178
|
|
10
|
+
Backtesting/definition/experiment.py,sha256=GzhLSwYCZiu5-V5dcHylTsHCSGedUfA4cYzakWUl8Vw,5701
|
|
11
|
+
Backtesting/definition/configs/__init__.py,sha256=0dHqQ4ZaMIMkJojkCEg953OkOUcYrYwXnzPuIgzdN5s,197
|
|
12
|
+
Backtesting/definition/configs/base.py,sha256=PVuGelO5wXeAfMaSJf5K3jxCeFJu3lIo-KbdnEeE5TY,806
|
|
13
|
+
Backtesting/definition/core/__init__.py,sha256=BZJ977cbOEV8orUDMh8MHThrUO1hFzEz6SZb-v96VJI,353
|
|
14
|
+
Backtesting/definition/core/domain_models.py,sha256=R7vzVcs2JZnS-19NPC86HV9zISaOLCBZfoZ3W9jyYzM,4724
|
|
15
|
+
Backtesting/definition/plugins/__init__.py,sha256=89sScFlihnV1t08anGLxlWzLBLacU3Dq2lVLjnTtYVs,174
|
|
16
|
+
Backtesting/definition/plugins/base_interfaces.py,sha256=H0nH0UlgioUOxDVgLOlWNr2gZ-O8MOEDmDOdJFipWRo,3480
|
|
17
|
+
Backtesting/definition/plugins/plugin_registry.py,sha256=w2sOYAl6CgbRcbYLZl4sRQId3P9ymeCrWLzzeSloI5Y,950
|
|
18
|
+
Backtesting/execution/__init__.py,sha256=NmhgpBSA-uTKsi0k0xFyN4C8FYApy9TjIXH-Zow0BH4,548
|
|
19
|
+
Backtesting/execution/engine.py,sha256=h5T5Z-YFom12P7Ejz2gZyKb-Ph0XDRF3K4q7ZbSHt_A,2577
|
|
20
|
+
Backtesting/execution/event.py,sha256=L5b-y5W-EVtAteqRtcHqoL2qngVF86t7f1PoUpXNX9E,2014
|
|
21
|
+
Backtesting/execution/market_data.py,sha256=W9JasXLfUzd57E7m92jpFvOdv6czQmw3RXKPhJ3LUa0,3704
|
|
22
|
+
Backtesting/execution/pipeline.py,sha256=4GTM4YmYdIdymxUVVsG1t8OG2BQwiDa0iPqb-OyXZBA,4551
|
|
23
|
+
Backtesting/execution/portfolio.py,sha256=cmh6gB9589PGdR4w2vWoyLFD2HPpkE_FlKhnuxhnOec,3397
|
|
24
|
+
Backtesting/execution/books/__init__.py,sha256=usqdDPX3MrwEnDUmF3Uh6iDn6dqjvZo5F_j7Cu0lMQo,236
|
|
25
|
+
Backtesting/execution/books/order_book.py,sha256=4qkdXxmZEmhoKE41au82jojoTpUBlNPxSqGxvK75MUk,5493
|
|
26
|
+
Backtesting/execution/books/position_book.py,sha256=6qajc7sUzip5dtGErIZ_DgghFoAZg04Ji7yjQ84jGg8,6832
|
|
27
|
+
Backtesting/execution/books/trade_book.py,sha256=rixBFyrTPK1vOJ8U_fKwN8TrobjUespr9E62qyK4V4M,4674
|
|
28
|
+
Backtesting/experiments/base.yaml,sha256=0q0adKP65cMLiXaGJgbyrUltM01uNEk8tYKaLd7VeaA,654
|
|
29
|
+
Backtesting/plugins/__init__.py,sha256=Zv8HPO6Dkf9Kxfup_kc-iG-SIoQWmse4EiKWuV5V7OE,564
|
|
30
|
+
Backtesting/plugins/brokers/__init__.py,sha256=f5jwXlPjWGUnlkKxRMifu43mfTBRAstF5RZhHAwsQxA,85
|
|
31
|
+
Backtesting/plugins/brokers/instant_market_fill.py,sha256=nFajDyp2_xC6L3BJsNQfJMdf5o4_MUlU_RGlWYkJKHQ,902
|
|
32
|
+
Backtesting/plugins/market_data/__init__.py,sha256=oVP9FC_d1S5XAXSVcZKEHPT7oZdp7QdJry6sao4EpIM,95
|
|
33
|
+
Backtesting/plugins/market_data/dummy_data_provider.py,sha256=YakUzyUVGtbAsexPuIE8KK5wA9_XrlhYU6T72zccPpc,1243
|
|
34
|
+
Backtesting/plugins/money_managers/__init__.py,sha256=mWxK7zEwTQNycsGFBaQTj5fLGnoktJg6jey930FK1B8,83
|
|
35
|
+
Backtesting/plugins/money_managers/fixed_quality.py,sha256=DEDoFzaPpmUKawcByiJYQ4r6ZzPQhziHCIaHsgSzuLQ,1266
|
|
36
|
+
Backtesting/plugins/strategies/SMA_crossovr.py,sha256=aO8jno-tMhEyMWecs9n4Yj4m880Q3Xf-gV5zyRZO8HM,2007
|
|
37
|
+
Backtesting/plugins/strategies/__init__.py,sha256=EjJ1HHT2Yu_WbEsRBI7dvBJi7Dip5lPHlFEV9B4z1VM,82
|
|
38
|
+
py_backtesting_lib-0.1.0.dist-info/METADATA,sha256=_DHAB8V_l-Ioe83Y7CQuT73nAqRC9X-aelOJ3n6RmxU,13965
|
|
39
|
+
py_backtesting_lib-0.1.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
40
|
+
py_backtesting_lib-0.1.0.dist-info/entry_points.txt,sha256=I8q6v1O6C4-uqM_1ClRFNYo5fifjM-r1I50-AUyrqiI,53
|
|
41
|
+
py_backtesting_lib-0.1.0.dist-info/licenses/LICENSE,sha256=gQliMpcFUTqae9Gw1GROYQLhsbFShKqafABSVi1WHlE,1081
|
|
42
|
+
py_backtesting_lib-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Abdullah Dadkhah (Zhiro)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|