# Path: speculator/market.py
# TARGET_CODES = {'bearish': 0, 'neutral': 1, 'bullish': 2}
#         DIRECTION = 'last'
#     TARGET_NAMES = {v: k for k, v in TARGET_CODES.items()}
# class Market:
#     def __init__(self, json=None, symbol='USDT_BTC', unit='month', count=6, period=86400):
#     def get_json(self):
#     def set_features(self, partition=1):
#     def set_long_features(self, features, columns_to_set=[], partition=2):
# def set_targets(x, delta=10):
# def eval_features(json):
# def target_code_to_name(code):
# def setup_model(x, y, model_type='random_forest', seed=None, **kwargs):


import argparse
import pandas as pd
from datetime import datetime as dt
from speculator import market
from speculator import models
                              'technical analysis calculation'))
    parser.add_argument('-sy', '--symbol', default='USDT_BTC',
                        help=('Currency pair, symbol, or ticker, from Poloniex'
                              'Examples: USDT_BTC, ETH_ZRX, BTC_XRP'))
    parser.add_argument('-sd', '--seed', default=None, type=int,
                        help=('Random state seed to be used when generating '
                              'the Random Forest and training/test sets'))
    parser.add_argument('-l', '--long', nargs='*',
                        help=('List of features to enable longer calculations. '
                              'Example "--long rsi": 14 day RSI -> 28 day RSI'))
    parser.add_argument('-d', '--delta', default=25, type=int,
                        help=('Price buffer in the neutral zone before'
                              'classifying a trend as bullish or bearish'))
    parser.add_argument('-t', '--trees', default=10, type=int,
                        help=('Number of trees (estimators) to generate in '
                              'the Random Forest, higher is usually better'))
    parser.add_argument('-j', '--jobs', default=1, type=int,
                        help=('Number of jobs (CPUs for multithreading) when '
                              'processing model fits and predictions'))
    parser.add_argument('--proba', default=False, action='store_true',
                        help='Display probabilities of the predicted trend')
    parser.add_argument('--proba_log', default=False, action='store_true',
                        help=('Display logarithmic probabilities of the '
                              'predicted trend'))
    return parser.parse_args()

def main():
    args = get_args()
    assert args.partition > 0, 'The data must be partitioned!'


# Path: speculator/market.py
# TARGET_CODES = {'bearish': 0, 'neutral': 1, 'bullish': 2}
#         DIRECTION = 'last'
#     TARGET_NAMES = {v: k for k, v in TARGET_CODES.items()}
# class Market:
#     def __init__(self, json=None, symbol='USDT_BTC', unit='month', count=6, period=86400):
#     def get_json(self):
#     def set_features(self, partition=1):
#     def set_long_features(self, features, columns_to_set=[], partition=2):
# def set_targets(x, delta=10):
# def eval_features(json):
# def target_code_to_name(code):
# def setup_model(x, y, model_type='random_forest', seed=None, **kwargs):


# Path: speculator/main.py
import argparse
import pandas as pd
from datetime import datetime as dt
from speculator import market
from speculator import models

                              'technical analysis calculation'))
    parser.add_argument('-sy', '--symbol', default='USDT_BTC',
                        help=('Currency pair, symbol, or ticker, from Poloniex'
                              'Examples: USDT_BTC, ETH_ZRX, BTC_XRP'))
    parser.add_argument('-sd', '--seed', default=None, type=int,
                        help=('Random state seed to be used when generating '
                              'the Random Forest and training/test sets'))
    parser.add_argument('-l', '--long', nargs='*',
                        help=('List of features to enable longer calculations. '
                              'Example "--long rsi": 14 day RSI -> 28 day RSI'))
    parser.add_argument('-d', '--delta', default=25, type=int,
                        help=('Price buffer in the neutral zone before'
                              'classifying a trend as bullish or bearish'))
    parser.add_argument('-t', '--trees', default=10, type=int,
                        help=('Number of trees (estimators) to generate in '
                              'the Random Forest, higher is usually better'))
    parser.add_argument('-j', '--jobs', default=1, type=int,
                        help=('Number of jobs (CPUs for multithreading) when '
                              'processing model fits and predictions'))
    parser.add_argument('--proba', default=False, action='store_true',
                        help='Display probabilities of the predicted trend')
    parser.add_argument('--proba_log', default=False, action='store_true',
                        help=('Display logarithmic probabilities of the '
                              'predicted trend'))
    return parser.parse_args()

def main():
    args = get_args()
    assert args.partition > 0, 'The data must be partitioned!'


    m = market.Market(symbol=args.symbol, unit=args.unit,