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