ranaroussi / quantstats

Portfolio analytics for quants, written in Python
Apache License 2.0
4.82k stars 841 forks source link

is _qtd bug ? #348

Open wony-zheng opened 5 months ago

wony-zheng commented 5 months ago

def _qtd(df): date = _dt.datetime.now() for q in [1, 4, 7, 10]: if date.month <= q: return df[df.index >= _dt.datetime(date.year, q, 1).strftime("%Y-%m-01")] return df[df.index >= date.strftime("%Y-%m-01")]

when today.month == 2 ,it loc df.index >= 'xxxx-04-01'

grzesir commented 2 months ago

Check out https://github.com/Lumiwealth/quantstats_lumi, which is being updated regularly. We are a fork of this library that is being maintained by Lumiwealth