You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having issues with the returns being calculated. When I run a longer window, more current returns suddenly jump 200% in one day. As seen below in the attached images, if I run from September 2018 to Jan 2020, the daily returns look fairly normal. However, if I open the window to Jan 2018 to Jan 2020, there is a sudden huge jump in Oct 2019. I'm not sure what is causing this. Between the 2 runs, I did not change any variables or data. I only changed the starting date.
Code used to generate the returns:
factor_data = alphalens.utils.get_clean_factor_and_forward_returns(predictive_factor,
pricing,
quantiles=5, #default is 5
bins=None,
groupby=ticker_sector,
groupby_labels=sector_names
)
I've also tried to breakout the return and factor calculations (It produces the same issues):
I also plotted all the daily returns for all individual assets in the dataset and there doesn't seem to be any difference that would cause the huge jump seen in the cumulative return by quantile graph (Jan 2018 - Jan 2020).
I will take a look through the source code. Any thoughts on what might be causing this issue is welcomed. Thanks in advance.
Problem Description
I'm having issues with the returns being calculated. When I run a longer window, more current returns suddenly jump 200% in one day. As seen below in the attached images, if I run from September 2018 to Jan 2020, the daily returns look fairly normal. However, if I open the window to Jan 2018 to Jan 2020, there is a sudden huge jump in Oct 2019. I'm not sure what is causing this. Between the 2 runs, I did not change any variables or data. I only changed the starting date.
Code used to generate the returns:
factor_data = alphalens.utils.get_clean_factor_and_forward_returns(predictive_factor,
pricing,
quantiles=5, #default is 5
bins=None,
groupby=ticker_sector,
groupby_labels=sector_names
)
I've also tried to breakout the return and factor calculations (It produces the same issues):
returns = alphalens.utils.compute_forward_returns(predictive_factor, pricing)
factor_data = alphalens.utils.get_clean_factor(predictive_factor, returns,
quantiles=5, #default is 5
bins=None,
groupby=ticker_sector,
groupby_labels=sector_names)
Versions
The text was updated successfully, but these errors were encountered: