qlib icon indicating copy to clipboard operation
qlib copied to clipboard

Implement exponential mode for annualized_return calculation in risk_…

Open DimitarSivrev opened this issue 2 years ago • 1 comments

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 avatar Feb 07 '23 04:02 DimitarSivrev

DimitarSivrev, I tried the exponential mode, but it seems still not correct. pls see here https://github.com/microsoft/qlib/issues/1512

quant2008 avatar May 14 '23 03:05 quant2008