sorry, i don't have an answer.

there seems to be NAN errors for options data with volume errors or low numbers for open interest.

i tried a couple things , but wasn't able to trap and ignore the errors.

tested after market closed.

Code:

```
#cu10_test
# https://usethinkscript.com/threads/trying-to-determine-if-an-option-is-overvalued-or-undervalued.15847/
#Trying to determine if an option is overvalued or undervalued.
#ezrollin Start dateToday at 7:23 AM
#I'm trying to figure out if an option is overvalued or undervalued based on past prices and especially VS the stock's price.
#I doubt I can add in a stocks price to a script that is used on an option chain screen.
#So I'm just trying to start off looking at an average but I get errors like NaN.
#def averagePrice = (close[5] + close[4] + close[3] + close[2] + close[1]) / 5.0;
#plot data = averagePrice;
#plot data = if isnan(averagePrice) then 0 else averagePrice;
# doesnt work. plot still has NAN's
#def c1 = if isnan(close[1]) then 0 else close[1];
#def c2 = if isnan(close[2]) then 0 else close[2];
#def c3 = if isnan(close[3]) then 0 else close[3];
#def c4 = if isnan(close[4]) then 0 else close[4];
#def c5 = if isnan(close[5]) then 0 else close[5];
# doesnt work. plot still has NAN's
def c1 = if isnan(volume[1]) then 0 else close[1];
def c2 = if isnan(volume[2]) then 0 else close[2];
def c3 = if isnan(volume[3]) then 0 else close[3];
def c4 = if isnan(volume[4]) then 0 else close[4];
def c5 = if isnan(volume[5]) then 0 else close[5];
def averagePrice = (c1 + c2 + c3 + c4 + c5) / 5;
plot data = averagePrice;
#
```

stock: AXP