![](/img/trans.png)
[英]Trying to get value in column of dataframe using another columns data using function?
我目前有一個數據框“Finaldf”,其中包含一列(underlying_price、strike、rate、days_to_exp、price、IV)。 看起來像這樣- 輸出- 我有一個 function 來計算“最終”數據框的“ImpVol”列,如下所示: 所以,我試着像這樣計算“IV”列 - ...
[英]Trying to get value in column of dataframe using another columns data using function?
我目前有一個數據框“Finaldf”,其中包含一列(underlying_price、strike、rate、days_to_exp、price、IV)。 看起來像這樣- 輸出- 我有一個 function 來計算“最終”數據框的“ImpVol”列,如下所示: 所以,我試着像這樣計算“IV”列 - ...
[英]Mibian returning “NameError: name 'norm' is not defined…” when using with xlwings
我試圖使用 xlwings 編寫 Excel UDF 從 Mibian 庫返回財務選項計算。 我試過下面的代碼。 然后從 Excel 調用 function 並使用以下=BSPutOptionImpVol(45,32,1,127,0.95) 它返回以下錯誤: “NameError:名稱'norm ...
[英]Mibian options doesn't seem to work for different volatility values Python
我正在使用Python模塊調用Mibian來計算調用和放置選項。 Mibians Black-Scholes公式的參數如下: 假設我計算AAPL(Apple.inc)股票的看漲期權,基礎價格為143.14,執行價格為100,利率為1%,到期17天,波動率為19.42。 AAPL ...
[英]Trying to iterate through a list but I keep recieving an error
我試圖獲得不同股票價格的期權看漲期權價格。 我不斷收到錯誤消息,指出float()參數必須是字符串或數字。 這是代碼: 這是錯誤代碼: ...
[英]Pandas DataFrame.apply() and mibian
我正在嘗試使用包含不同部分期權數據的熊貓數據框來計算隱含波動率。 對於隱含的波動性,我正在使用mibian 。 這是代碼: 當我完成所有這些操作時,它在optionsData的第一個元素上設置了impvol,但隨后似乎給了我這個錯誤: 我必須缺少一些簡單的東西。 我嘗試將每 ...