The capm_returns function should not amend the prices dataframe when the returns_data is True.
Currently, if returns_data is True, the returns dataframe is equal to the prices dataframe. A new column is added for the market returns as "mkt" which impacts as well the prices dataframe.
This behavior is not expected and the prices dataframe should be copied before.
The capm_returns function should not amend the prices dataframe when the returns_data is True.
Currently, if returns_data is True, the returns dataframe is equal to the prices dataframe. A new column is added for the market returns as "mkt" which impacts as well the prices dataframe.
This behavior is not expected and the prices dataframe should be copied before.