qlib
qlib copied to clipboard
Implement exponential mode for annualized_return calculation in risk_…
My first contribution to Qlib,
Resolves #964
Description
This change allows the user to choose between accumulation mode and exponential mode when calculating the annualized_return in the risk_analysis function. The exponential mode uses the formula product of (1 + r_i) minus 1. A new parameter 'accumulation_mode' has been added to the risk_analysis function to control the mode of calculation. An error will be thrown if the parameter is not set to 'accumulation' or 'exponential'. I can resolve any issues with this change.
Types of changes
- [ ] Fix bugs
- [x] Add new feature
- [ ] Update documentation
DimitarSivrev, I tried the exponential mode, but it seems still not correct. pls see here https://github.com/microsoft/qlib/issues/1512