さまざまな株価のオプション コール価格を取得しようとしています。float() 引数は文字列または数値でなければならないというエラーが表示され続けます。コードは次のとおりです。
import mibian
price = [100,101,102,103,104]
c = 0.0
for i in price:
#BS([underlyingPrice, strikePrice, interestRate, daysToExpiration], volatility=x, callPrice=y, putPrice=z)
c[i] = mibian.BS([price, 100, 0,5], volatility=20)
print c.callPrice
エラーコードは次のとおりです。
self.underlyingPrice = float(args[0])
TypeError: float() argument must be a string or a number