matplotlib / matplotlib/mplfinance

Feature Request: Plot percent price change on the y-axis

Open
#79 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
4.4k
Forks
678
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.

When I want to compare two stocks, I'm interested in seeing the % changes in those two stocks over a period of time. Currently when I plot two stocks in mplfinance (using a secondary y-axis), I can't see the day-to-day percent changes, I only see the day-to-day price changes, which can be on different axes and thus inaccurate to compare directly.

For example, if I want to compare SPY and GOOG over a time period, I want to see the percent changes between the two (for easy comparison) rather than their stock prices which are almost an order of magnitude apart.

Describe the solution you'd like

A plot option that lets you plot the % change and lets you specify the start value that the percent changes should be compared against.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are identified in the issue. Start by reviewing mplfinance's plot-option API and current secondary-y-axis behavior, then determine how percent-change comparison and a configurable starting value should be specified. Done means the option produces comparable percent-change plots for symbols such as SPY and GOOG, with coverage for the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.