prosperity3bt 0.3.0__py3-none-any.whl → 0.5.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.
Files changed (26) hide show
  1. prosperity3bt/__main__.py +4 -4
  2. prosperity3bt/data.py +1 -0
  3. prosperity3bt/datamodel.py +1 -1
  4. prosperity3bt/py.typed +0 -0
  5. prosperity3bt/resources/round1/__init__.py +0 -0
  6. prosperity3bt/resources/round1/prices_round_1_day_-1.csv +30001 -0
  7. prosperity3bt/resources/round1/prices_round_1_day_-2.csv +30001 -0
  8. prosperity3bt/resources/round1/prices_round_1_day_0.csv +30001 -0
  9. prosperity3bt/resources/round1/trades_round_1_day_-1_nn.csv +8307 -0
  10. prosperity3bt/resources/round1/trades_round_1_day_-2_nn.csv +8399 -0
  11. prosperity3bt/resources/round1/trades_round_1_day_0_nn.csv +8183 -0
  12. prosperity3bt/resources/round6/__init__.py +0 -0
  13. prosperity3bt/resources/round6/prices_round_6_day_0.csv +4001 -0
  14. prosperity3bt/resources/round6/prices_round_6_day_1.csv +3001 -0
  15. prosperity3bt/resources/round6/trades_round_6_day_0_nn.csv +1089 -0
  16. prosperity3bt/resources/round6/trades_round_6_day_1_nn.csv +845 -0
  17. prosperity3bt/runner.py +3 -8
  18. {prosperity3bt-0.3.0.dist-info → prosperity3bt-0.5.0.dist-info}/METADATA +6 -3
  19. prosperity3bt-0.5.0.dist-info/RECORD +32 -0
  20. {prosperity3bt-0.3.0.dist-info → prosperity3bt-0.5.0.dist-info}/WHEEL +1 -1
  21. prosperity3bt-0.3.0.dist-info/RECORD +0 -19
  22. /prosperity3bt/resources/round0/{prices_round_0_day_-2.csv → prices_round_0_day_-1.csv} +0 -0
  23. /prosperity3bt/resources/round0/{trades_round_0_day_-2_nn.csv → trades_round_0_day_-1_nn.csv} +0 -0
  24. {prosperity3bt-0.3.0.dist-info → prosperity3bt-0.5.0.dist-info}/entry_points.txt +0 -0
  25. {prosperity3bt-0.3.0.dist-info → prosperity3bt-0.5.0.dist-info/licenses}/LICENSE +0 -0
  26. {prosperity3bt-0.3.0.dist-info → prosperity3bt-0.5.0.dist-info}/top_level.txt +0 -0
prosperity3bt/__main__.py CHANGED
@@ -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, Exit, Option, Typer
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
- raise Exit()
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="Path to save output log to (defaults to backtests/<timestamp>.log).", show_default=False, dir_okay=False, resolve_path=True)] = None,
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,
prosperity3bt/data.py CHANGED
@@ -7,6 +7,7 @@ from prosperity3bt.file_reader import FileReader
7
7
  LIMITS = {
8
8
  "RAINFOREST_RESIN": 50,
9
9
  "KELP": 50,
10
+ "SQUID_INK": 50,
10
11
  }
11
12
 
12
13
 
@@ -13,7 +13,7 @@ ObservationValue = int
13
13
 
14
14
 
15
15
  class Listing:
16
- def __init__(self, symbol: Symbol, product: Product, denomination: Product):
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
prosperity3bt/py.typed ADDED
File without changes
File without changes