<jupyter_start><jupyter_text>Catalyst Frame<jupyter_code>import pytz
import pandas as pd
from datetime import datetime
from plot_crypto_classification import CpcSet, Cpc, PAIR
import targets_features as t_f

from catalyst.utils.run_algo import run_algorithm
from catalyst.protocol import BarData

def initialize(context):
    context.handle_count = 0
    print("init")
    context.cpcs = CpcSet(PAIR, t_f.DATA_PATH, '/Users/tc/tf_models/crypto')



def handle_data(context, data: BarData):
    
    if (context.handle_count < 1):
        catalyst2picklepandas(context, data)
#        feature_normalize(fn)

        context.handle_count = context.handle_count + 1
    return None
        

def analyze(context=None, results=None):
    pass

start = datetime(2018, 12, 18, 0, 0, 0, 0, pytz.utc)
# end = datetime(2018, 9, 24, 0, 0, 0, 0, pytz.utc)
end = datetime(2018, 12, 18, 0, 0, 0, 0, pytz.utc)
results = run_algorithm(initialize=initialize,
                        handle_data=handle_data,
                        analyze=analyze,
                        start=start,
                        end=end,
                        exchange_name='binance',
                        data_frequency='minute',
                        quote_currency ='usdt',
                        capital_base=10000 )<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09297052154195011, 'fraction_numerical': 0.03325774754346183, 'mean_word_length': 2.4479166666666665, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '516057', 'license': 'MIT', 'n_tokens_mistral': 457, 'n_tokens_neox': 403, 'n_words': 96, 'path': 'Catalyst2PandasData.ipynb', 'repo_name': 'tcae/Catayst2Pandas', 'size': '1323'}