Skip to content

Commit

Permalink
1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DogsTailFarmer committed Jun 21, 2023
1 parent 010092c commit b804ea6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
5 changes: 3 additions & 2 deletions martin_binance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "1.3.1b5"
__version__ = "1.3.1"
__maintainer__ = "Jerry Fedorenko"
__contact__ = "https://github.com/DogsTailFarmer"

Expand All @@ -30,6 +30,7 @@
LAST_STATE_PATH = None
BACKTEST_PATH = None


def init():
if CONFIG_FILE.exists():
print(f"Client config found at {CONFIG_FILE}")
Expand All @@ -52,4 +53,4 @@ def init():


if __name__ == '__main__':
init()
init()
5 changes: 3 additions & 2 deletions martin_binance/backtest/OoTSP.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "1.3.1b5"
__version__ = "1.3.1"
__maintainer__ = "Jerry Fedorenko"
__contact__ = "https://github.com/DogsTailFarmer"

Expand All @@ -21,6 +21,7 @@

PARAMS_FLOAT = ['PRICE_SHIFT', 'KBB']


def try_trade(mbs, **kwargs):
for key, value in kwargs.items():
print(key, value)
Expand Down Expand Up @@ -64,7 +65,7 @@ def objective(trial):
message="Enter number of cycles, from 50 to 500",
ignore=lambda x: x["mode"] == "Plot from saved",
default='150',
validate=lambda _, c: 2 <= int(c) < 500,
validate=lambda _, c: 10 <= int(c) < 500,
),
]

Expand Down
4 changes: 2 additions & 2 deletions martin_binance/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "1.3.0-4"
__version__ = "1.3.1"
__maintainer__ = "Jerry Fedorenko"
__contact__ = 'https://github.com/DogsTailFarmer'
##################################################################
Expand Down Expand Up @@ -1675,7 +1675,7 @@ def collect_assets(self) -> ():
fs = f2d(0)
return ff, fs

def message_log(self, msg: str, log_level=LogLevel.INFO, tlg: bool = False, color=Style.WHITE) -> None:
def message_log(self, msg: str, log_level=LogLevel.INFO, tlg=False, color=Style.WHITE) -> None:
if tlg and color == Style.WHITE:
color = Style.B_WHITE
if log_level in (LogLevel.ERROR, LogLevel.CRITICAL):
Expand Down
5 changes: 3 additions & 2 deletions martin_binance/margin_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "1.3.0-3"
__version__ = "1.3.1"
__maintainer__ = "Jerry Fedorenko"
__contact__ = "https://github.com/DogsTailFarmer"

Expand Down Expand Up @@ -842,7 +842,8 @@ def session_data_handler(cls):
ds = pd.Series(cls.s_order_book)
ds.to_pickle(Path(raw_path, "order_book.pkl"))
# Save klines snapshot
json.dump(cls.klines, open(Path(raw_path, "klines.json"), 'w'))
with open(Path(raw_path, "klines.json"), 'w') as f:
json.dump(cls.klines, f)
# Save candles
for k, v in cls.candles.items():
ds = pd.Series(v)
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ dependencies = [
"pandas==2.0.2",
"dash==2.10.2",
"future==0.18.3",
"inquirer==3.1.3"
"inquirer==3.1.3",
"scikit-learn==1.2.2",
]

[tool.flit.module]
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ plotly==5.15.0
pandas==2.0.2
dash==2.10.2
future==0.18.3
inquirer==3.1.3
inquirer==3.1.3
scikit-learn==1.2.2

0 comments on commit b804ea6

Please sign in to comment.