<jupyter_start><jupyter_text>Disclaimer  Data CollectionThe data collection process consists of collecting US stock listings, creating a universe of leveraged ETFs, then collecting 1 minute bars for the leveraged ETFs.  Collect ETF listingsFirst collect US Stock listings:<jupyter_code>from quantrocket.master import collect_usstock_listings
collect_usstock_listings()<jupyter_output><empty_output><jupyter_text>Define universe of leveraged ETFs Next we download a CSV of several leveraged ETFs:<jupyter_code>from quantrocket.master import download_master_file
download_master_file(
    "leveraged_etfs.csv",
    exchanges="ARCX",
    sec_types="ETF", 
    symbols=[
        "SPXL", # DIREXION DLY S&P 500 BULL 3X
        "TNA",  # DIREXION DLY SM CAP BULL 3X
        "ERX",  # DIREXION DLY ENERGY BULL 3X
        "TMF",  # DRX DLY 20+ YR TREAS BULL 3X
        "UPRO", # PROSHARES ULTRAPRO S&P 500
        "DRN",  # DRX DLY REAL ESTATE BULL 3X
        "YINN", # DRX DLY FTSE CHINA BULL 3X
        "UDOW", # PROSHARES ULTRAPRO DOW30
        "URTY", # PROSHARES ULTRAPRO RUSS2000
        "FAS",  # DIREXION DAILY FIN BULL 3X
        "EDC",  # DIREXION DLY EMG MKT BULL 3X
        "RUSL", # DIREXION DLY RUSSIA BULL 3X
        "JNUG", # DIREXION DLY JR GOLD BULL 3X
        "NUGT", # DRX DLY GOLD MINERS BULL 3X
    ])<jupyter_output><empty_output><jupyter_text>Then upload the CSV to create the "leveraged-etf" universe:<jupyter_code>from quantrocket.master import create_universe
create_universe("leveraged-etf", infilepath_or_buffer="leveraged_etfs.csv")<jupyter_output><empty_output><jupyter_text>Collect historical dataNext, we create a Zipline bundle for collecting 1-min bars.<jupyter_code>from quantrocket.zipline import create_usstock_bundle
create_usstock_bundle("usstock-1min")<jupyter_output><empty_output><jupyter_text>Then collect the data for the leveraged ETFs:<jupyter_code>from quantrocket.zipline import ingest_bundle
ingest_bundle("usstock-1min", universes="leveraged-etf")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0806930693069307, 'fraction_numerical': 0.014356435643564357, 'mean_word_length': 4.645251396648045, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '473069', 'license': 'Apache-2.0', 'n_tokens_mistral': 775, 'n_tokens_neox': 720, 'n_words': 188, 'path': 'trend_day/Part1-Data-Collection.ipynb', 'repo_name': 'quantrocket-codeload/trend-day', 'size': '2020'}