<jupyter_start><jupyter_text>A Blank Template for Developing<jupyter_code>import xarray as xr
import numpy as np
import pandas as pd

import qnt.data    as qndata
import qnt.stepper as qnstepper
import qnt.stats   as qnstats
import qnt.graph   as qngraph
import qnt.forward_looking as qnfl
def strategy():
    data = qndata.load_data(min_date = "2015-01-01",
                        max_date = None,
                        dims     = ("time", "field", "asset"),
                        forward_order = True)
    is_liquid = data.loc[:, "is_liquid", :]
    weights   = is_liquid / is_liquid.sum("asset",skipna=True)
    weights   = weights.fillna(0.0)
    return weights
output = qnfl.load_data_calc_output_and_check_forward_looking(strategy)
data = qndata.load_data(min_date = "2015-01-01",
                        max_date = None,
                        dims     = ("time", "field", "asset"),
                        forward_order = True)
stat = qnstats.calc_stat(data, output, slippage_factor=0.05)
display(stat.to_pandas().tail())
# qnstats.print_correlation(output, data) # it does not work locally yet.
qnstepper.write_output(output)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10427350427350428, 'fraction_numerical': 0.017948717948717947, 'mean_word_length': 2.741214057507987, 'pattern_counts': {'":': 0, '<': 5, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '457062', 'license': 'MIT', 'n_tokens_mistral': 409, 'n_tokens_neox': 379, 'n_words': 86, 'path': 'book/strategy.ipynb', 'repo_name': 'qntnet/local-dev-template', 'size': '1170'}