fixed some bugs, improved the backtesting and strategy table. Possible now to specify which features we want to use in the backtesting api

This commit is contained in:
Gert
2018-05-23 20:51:07 -07:00
parent a51746c255
commit 1b77d66e2c
6 changed files with 131 additions and 91 deletions

View File

@@ -13,6 +13,9 @@ def get_trade_table():
:return:
"""
if 'tradeTable' not in os.environ:
os.environ['tradeTable'] = "FreqTradeTable"
table_name = os.environ['tradeTable']
existing_tables = boto3.client('dynamodb').list_tables()['TableNames']
if table_name not in existing_tables:
@@ -55,6 +58,9 @@ def get_strategy_table():
provides us access to the strategy table and if it doesn't exists creates it for us
:return:
"""
if 'strategyTable' not in os.environ:
os.environ['strategyTable'] = "FreqStrategyTable"
table_name = os.environ['strategyTable']
existing_tables = boto3.client('dynamodb').list_tables()['TableNames']
@@ -62,7 +68,7 @@ def get_strategy_table():
if table_name not in existing_tables:
try:
db.create_table(
TableName=os.environ[table_name],
TableName=table_name,
KeySchema=[
{
'AttributeName': 'user',