Skip to content

Commit

Permalink
load tunes
Browse files Browse the repository at this point in the history
  • Loading branch information
VladKochetov007 committed Sep 12, 2021
1 parent 028b2ac commit 405f7de
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/docs/quick_trade/quick_trade_tuner/tuner.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### save_tunes

### load_tunes

## Choise

## Arange
Expand Down
6 changes: 6 additions & 0 deletions quick_trade/quick_trade_tuner/tuner.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import defaultdict
from itertools import product
from json import dump
from json import load
from typing import Any
from typing import Dict
from typing import Iterable
Expand Down Expand Up @@ -152,6 +153,11 @@ def save_tunes(self, path: str = 'returns.json'):
with open(path, 'w') as file:
dump(self.result_tunes, file)

def load_tunes(self, path: str = 'returns.json'):
utils.logger.debug('loading tunes from %s', path)
with open(path, 'r') as file:
self.result_tunes = load(file)


class Choise(TunableValue):
pass
Expand Down
2 changes: 1 addition & 1 deletion quick_trade/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
winrate: {}%
mean deviation: {}%""" # .format(Trader.losses, Trader.trades, Trader.profits, Trader.year_profit, Trader.winrate, Trader.mean_deviation)

__version__: str = "6.6.1"
__version__: str = "6.6.2"
__author__: str = 'Vlad Kochetov'
__credits__: List[str] = [
"Hemerson Tacon -- Stack overflow",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with open('README.md') as file:
long_desc = file.read()

__version__ = "6.6.1"
__version__ = "6.6.2"

setup(
name='quick_trade',
Expand Down

0 comments on commit 405f7de

Please sign in to comment.