code: def df_quarter_to_date(df: DataFrame) -> DataFrame:
      """Yields the Quarter-to-Date (QTD) DataFrame"""
      now = Timestamp.now()
      for m in [1, 4, 7, 10]:
          if now.month <= m:
              in_qtr = df.index >= datetime(now.year, m, 1).strftime(
                  "%Y-%m-01"
              )
              if any(in_qtr):
                  return df[in_qtr]
      return df[df.index >= now.strftime("%Y-%m-01")]
  
file_path: pandas-ta/pandas_ta/utils/_time.py
imports: from datetime import datetime
  from time import localtime, perf_counter
  from typing import Tuple
  from pandas import DataFrame, Timestamp
  from pandas_ta import EXCHANGE_TZ, RATE
label_desc: Use image node_id 3 for calling a global function with example usage: df_quarter_to_date(df) and returns: df, df