Hi,
For each day my algorithm is runned, I want to compute equity returns for the past 6 months. How can I do this without having to get_pricing daily between today and today-6months and then compute returns? My actual method gather way too many information for what I need. Here's a sample code of what i'm doing right now:
hist_PX= get_pricing(
fund_df.columns,
fields='close_price',
start_date = lookbackfrom,
end_date = today,
frequency='daily',
)
PXret = hist_PX.iloc[[0, -1]].pct_change()
Thank you Q community!