Skip to content

Conversation

@AndLLA
Copy link

@AndLLA AndLLA commented Oct 13, 2019

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Add the rolling type Cumulative Performance:
cumperf = df = (1.0 + df).cumprod() - 1.0
This is used for example to calculate the performance of an investment portfolio over a period of time.

@codecov-io
Copy link

Codecov Report

Merging #8379 into master will decrease coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8379      +/-   ##
==========================================
- Coverage   67.57%   67.57%   -0.01%     
==========================================
  Files         448      448              
  Lines       22527    22529       +2     
  Branches     2364     2364              
==========================================
+ Hits        15222    15223       +1     
- Misses       7167     7168       +1     
  Partials      138      138
Impacted Files Coverage Δ
superset/assets/src/explore/controls.jsx 41.26% <ø> (ø) ⬆️
superset/viz.py 71.26% <50%> (-0.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2117d1e...c2a0646. Read the comment docs.

elif rolling_type == "cumsum":
df = df.cumsum()
elif rolling_type == "cumperf":
df = (1.0 + df).cumprod() - 1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the formula, I wonder if cumret, as in cumulative return, would be more appropriate?

@stale
Copy link

stale bot commented Dec 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Dec 13, 2019
@stale stale bot closed this Dec 20, 2019
@skender18
Copy link

Any update on this feature ? It could be very interesting to simplify the computation of cumulative return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inactive Inactive for >= 30 days size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants