prosperity3bt 0.3.0__tar.gz → 0.4.0__tar.gz
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.
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/PKG-INFO +3 -2
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/__main__.py +4 -4
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/datamodel.py +1 -1
- prosperity3bt-0.4.0/prosperity3bt/resources/round0/__init__.py +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/runner.py +3 -8
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt.egg-info/PKG-INFO +3 -2
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt.egg-info/SOURCES.txt +1 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/pyproject.toml +1 -1
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/LICENSE +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/README.md +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/__init__.py +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/data.py +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/file_reader.py +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/models.py +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/open.py +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/parse_submission_logs.py +0 -0
- /prosperity3bt-0.3.0/prosperity3bt/resources/__init__.py → /prosperity3bt-0.4.0/prosperity3bt/py.typed +0 -0
- {prosperity3bt-0.3.0/prosperity3bt/resources/round0 → prosperity3bt-0.4.0/prosperity3bt/resources}/__init__.py +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/resources/round0/prices_round_0_day_-2.csv +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/resources/round0/trades_round_0_day_-2_nn.csv +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt.egg-info/dependency_links.txt +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt.egg-info/entry_points.txt +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt.egg-info/requires.txt +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt.egg-info/top_level.txt +0 -0
- {prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: prosperity3bt
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: Backtester for IMC Prosperity 3 algorithms
|
5
5
|
Author-email: Jasper van Merle <jaspervmerle@gmail.com>
|
6
6
|
License: MIT License
|
@@ -42,6 +42,7 @@ Requires-Dist: jsonpickle>=4.0.2
|
|
42
42
|
Requires-Dist: orjson>=3.10.15
|
43
43
|
Requires-Dist: tqdm>=4.67.1
|
44
44
|
Requires-Dist: typer>=0.15.2
|
45
|
+
Dynamic: license-file
|
45
46
|
|
46
47
|
# IMC Prosperity 3 Backtester
|
47
48
|
|
@@ -6,7 +6,7 @@ from importlib import import_module, metadata, reload
|
|
6
6
|
from pathlib import Path
|
7
7
|
from typing import Annotated, Any, Optional
|
8
8
|
|
9
|
-
from typer import Argument,
|
9
|
+
from typer import Argument, Option, Typer
|
10
10
|
|
11
11
|
from prosperity3bt.data import has_day_data
|
12
12
|
from prosperity3bt.file_reader import FileReader, FileSystemReader, PackageResourcesReader
|
@@ -174,7 +174,7 @@ def format_path(path: Path) -> str:
|
|
174
174
|
def version_callback(value: bool) -> None:
|
175
175
|
if value:
|
176
176
|
print(f"prosperity3bt {metadata.version(__package__)}")
|
177
|
-
|
177
|
+
sys.exit(0)
|
178
178
|
|
179
179
|
|
180
180
|
app = Typer(context_settings={"help_option_names": ["--help", "-h"]})
|
@@ -186,11 +186,11 @@ def cli(
|
|
186
186
|
days: Annotated[list[str], Argument(help="The days to backtest on. <round>-<day> for a single day, <round> for all days in a round.", show_default=False)],
|
187
187
|
merge_pnl: Annotated[bool, Option("--merge-pnl", help="Merge profit and loss across days.")] = False,
|
188
188
|
vis: Annotated[bool, Option("--vis", help="Open backtest results in https://jmerle.github.io/imc-prosperity-3-visualizer/ when done.")] = False,
|
189
|
-
out: Annotated[Optional[Path], Option(help="
|
189
|
+
out: Annotated[Optional[Path], Option(help="File to save output log to (defaults to backtests/<timestamp>.log).", show_default=False, dir_okay=False, resolve_path=True)] = None,
|
190
|
+
no_out: Annotated[bool, Option("--no-out", help="Skip saving output log.")] = False,
|
190
191
|
data: Annotated[Optional[Path], Option(help="Path to data directory. Must look similar in structure to https://github.com/jmerle/imc-prosperity-3-backtester/tree/master/prosperity3bt/resources.", show_default=False, exists=True, file_okay=False, dir_okay=True, resolve_path=True)] = None,
|
191
192
|
print_output: Annotated[bool, Option("--print", help="Print the trader's output to stdout while it's running.")] = False,
|
192
193
|
match_trades: Annotated[TradeMatchingMode, Option(help="How to match orders against market trades. 'all' matches trades with prices equal to or worse than your quotes, 'worse' matches trades with prices worse than your quotes, 'none' does not match trades against orders at all.")] = TradeMatchingMode.all,
|
193
|
-
no_out: Annotated[bool, Option("--no-out", help="Skip saving the output log to a file.")] = False,
|
194
194
|
no_progress: Annotated[bool, Option("--no-progress", help="Don't show progress bars.")] = False,
|
195
195
|
original_timestamps: Annotated[bool, Option("--original-timestamps", help="Preserve original timestamps in output log rather than making them increase across days.")] = False,
|
196
196
|
version: Annotated[bool, Option("--version", "-v", help="Show the program's version number and exit.", is_eager=True, callback=version_callback)] = False,
|
@@ -13,7 +13,7 @@ ObservationValue = int
|
|
13
13
|
|
14
14
|
|
15
15
|
class Listing:
|
16
|
-
def __init__(self, symbol: Symbol, product: Product, denomination:
|
16
|
+
def __init__(self, symbol: Symbol, product: Product, denomination: int):
|
17
17
|
self.symbol = symbol
|
18
18
|
self.product = product
|
19
19
|
self.denomination = denomination
|
File without changes
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import os
|
2
2
|
from contextlib import closing, redirect_stdout
|
3
3
|
from io import StringIO
|
4
|
-
from typing import Any
|
5
4
|
|
6
5
|
from IPython.utils.io import Tee
|
7
6
|
from tqdm import tqdm
|
8
7
|
|
9
8
|
from prosperity3bt.data import LIMITS, BacktestData, read_day_data
|
10
|
-
from prosperity3bt.datamodel import Observation, Order, OrderDepth, Symbol, Trade, TradingState
|
9
|
+
from prosperity3bt.datamodel import Listing, Observation, Order, OrderDepth, Symbol, Trade, TradingState
|
11
10
|
from prosperity3bt.file_reader import FileReader
|
12
11
|
from prosperity3bt.models import (
|
13
12
|
ActivityLogRow,
|
@@ -32,11 +31,7 @@ def prepare_state(state: TradingState, data: BacktestData) -> None:
|
|
32
31
|
|
33
32
|
state.order_depths[product] = order_depth
|
34
33
|
|
35
|
-
state.listings[product] =
|
36
|
-
"symbol": product,
|
37
|
-
"product": product,
|
38
|
-
"denomination": 1,
|
39
|
-
}
|
34
|
+
state.listings[product] = Listing(product, product, 1)
|
40
35
|
|
41
36
|
|
42
37
|
def create_activity_logs(
|
@@ -269,7 +264,7 @@ def match_orders(
|
|
269
264
|
|
270
265
|
|
271
266
|
def run_backtest(
|
272
|
-
trader
|
267
|
+
trader,
|
273
268
|
file_reader: FileReader,
|
274
269
|
round_num: int,
|
275
270
|
day_num: int,
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: prosperity3bt
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: Backtester for IMC Prosperity 3 algorithms
|
5
5
|
Author-email: Jasper van Merle <jaspervmerle@gmail.com>
|
6
6
|
License: MIT License
|
@@ -42,6 +42,7 @@ Requires-Dist: jsonpickle>=4.0.2
|
|
42
42
|
Requires-Dist: orjson>=3.10.15
|
43
43
|
Requires-Dist: tqdm>=4.67.1
|
44
44
|
Requires-Dist: typer>=0.15.2
|
45
|
+
Dynamic: license-file
|
45
46
|
|
46
47
|
# IMC Prosperity 3 Backtester
|
47
48
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{prosperity3bt-0.3.0 → prosperity3bt-0.4.0}/prosperity3bt/resources/round0/prices_round_0_day_-2.csv
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|