请问出现AttributeError: 'int' object has no attribute '
import matplotlib.pyplot as plt
%matplotlib inline
plt.figure(figsize=(8,6))
for maturity in maturities:
data=plot_data[options_data.MATURITY==maturity]
plt.plot(data['STRIKE'],data['IMP_VOL'],
lable=maturity.date(),lw=1.5)
plt.plot(data['STRIKE'],data['IMP_VOL'],'r.')
plt.grid(True)
plt.xlable('strike')
plt.ylable('implied volatility of volatility')
plt.legend()
plt.show() |
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|
maturity是int类型,没有date属性,这是报错的原因 |
|
|
|
|