看板 CCUfinGrad94 關於我們 聯絡資訊
Function putcall(cpflag As String, s, k, v, r, t, d) d1 = (Log(s / k) + (r - d + v ^ 2 / 2) * t) / (v * t ^ 0.5) d2 = d1 - v * t ^ 0.5 If cpflag = "c" Then putcall = s * Exp(-d * t) * WorksheetFunction.NormSDist(d1) - k * Exp(-r * t) * WorksheetFunction.NormSDist(d2) ElseIf cpflag = "p" Then putcall = k * Exp(-r * t) * WorksheetFunction.NormSDist(-d2) - s * Exp(-d * t) * WorksheetFunction.NormSDist(-d1) End If End Function -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.123.218.41 ※ 編輯: jjgg0209 來自: 140.123.218.41 (11/01 01:07)
joseph0937:這是啥火星文啊?還是你忘了轉換? 11/01 02:33
fredang:請問一下這一段要補在哪裡?? 11/01 08:55
jjgg0209:依據經驗這段要貼在原程式putcall出現之前 11/01 10:41
jjgg0209:放在整個程式的最前面應該就可以了,還沒試不確定^^ 11/01 10:43
jjgg0209:大家可以到我的網路硬碟下載Word檔B-S程式,和注意事項 11/02 21:31
pcer:學弟妹,這是EXCEL VBA 的程式碼,如果需要幫忙,可與我聯絡딠 11/02 23:54
Joe0130:學長真是個大好人 >.<.. 11/03 01:30
wakau:pcer是vba魔人... ^^ 11/04 12:47
floraii:pcer是vba魔人. ^^ 11/05 14:31