hashABCD / opstrat

Option visualization python package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yf_plotter using the wrong spot price

jeffgoot opened this issue · 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

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

Please merge this fix.