opstrat icon indicating copy to clipboard operation
opstrat copied to clipboard

yf_plotter using the wrong spot price

Open jeffgoot opened this issue 3 years ago • 3 comments

The yf_plotter(...) function appears to always use the MSFT spot price regardless of the ticker passed. Thus, the displayed payoff chart always has the wrong spot price which makes the chart way off when prices are either significantly lower or higher than MSFT's.

Example: AMD vertical call spread. Notice that even though AMD's spot price on 6/24/2022 EOD was $87.08, the displayed spot price was $267.70, MSFT's spot price. image

jeffgoot avatar Jun 25 '22 18:06 jeffgoot

Once the change in PR #9 was introduced, the payoff chart now shows both the correct spot price and the visible window. Here's a screenshot of the updated output of the original test code.

image

jeffgoot avatar Jun 25 '22 18:06 jeffgoot

Please merge this fix.

5amfung avatar Sep 23 '23 05:09 5amfung