Compare commits
1 Commits
988f9c9455
...
dc2e41e550
Author | SHA1 | Date |
---|---|---|
|
dc2e41e550 |
|
@ -99,8 +99,6 @@ async def max_pain_daemon(
|
|||
"""Update the bar graph with new open interest data."""
|
||||
plot.clear()
|
||||
|
||||
intrinsic_values = get_total_intrinsic_values(oi_by_strikes)
|
||||
|
||||
for strike_str in sorted(oi_by_strikes, key=lambda x: int(x)):
|
||||
strike = int(strike_str)
|
||||
calls_val = float(oi_by_strikes[strike_str]['C'])
|
||||
|
@ -124,6 +122,8 @@ async def max_pain_daemon(
|
|||
)
|
||||
plot.addItem(bar_p)
|
||||
|
||||
for strike_str in sorted(intrinsic_values, key=lambda x: int(x)):
|
||||
strike = int(strike_str)
|
||||
total_val = float(intrinsic_values[strike_str]['total']) / 100000
|
||||
|
||||
scatter_iv = ScatterPlotItem(
|
||||
|
@ -136,7 +136,7 @@ async def max_pain_daemon(
|
|||
)
|
||||
plot.addItem(scatter_iv)
|
||||
|
||||
_, max_pain = get_intrinsic_value_and_max_pain(intrinsic_values)
|
||||
total_intrinsic_value, max_pain = get_intrinsic_value_and_max_pain(intrinsic_values)
|
||||
|
||||
vertical_line = InfiniteLine(
|
||||
pos=max_pain,
|
||||
|
|
Loading…
Reference in New Issue