# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: 'Python 3.9.7 64-bit (''py-quant-fin-d8An81W4-py3.9'': poetry)'
#     language: python
#     name: python3
# ---

# %load_ext autoreload
# %autoreload 2

from quantfin.market.investment_universe import InvestmentUniverse

univ = InvestmentUniverse(reference_index="NASDAQ 100")

# TODO: when calling get_returns arguments are not evaluated if previous result is cached
univ.get_returns(required_pct_obs=0.3)
univ.returns.columns

univ.get_returns(required_pct_obs=0.9)
univ.returns.columns

corr = univ.returns.corr()

univ.returns.columns

StarcoderdataJupyterScriptsDedupFiltered