1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Declare Function CMSUValue Lib "P:\FWC MSU\release\EMPERFADDIN.dll" _
( _
ByVal Sbeg As Double, _
ByVal Sval As Double, _
ByVal v As Double, _
ByVal r As Double, _
ByVal q As Double, _
ByVal divprotected As Long, _
ByVal tsrtarget As Long, _
ByVal window As Long, _
ByVal T As Double, _
ByRef paymatrixFP() As Double, _
ByVal Payout_Rows As Long, _
ByVal Iterations As Long, _
ByVal Interpolation As Long _
) _
As Double
Public Function CUV(Sbeg As Double, Sval As Double, v As Double, r As Double, q As Double, divprotected As Long, tsrtarget As Long, window As Long, T As Double, paymatrixFP As Range, Payout_Rows As Long, Iterations As Long, Interpolation As Long) As Double
Dim inputArray As Variant
Dim a As Double, b As Double
Dim p() As Double
Dim i As Long, j As Long
inputArray = paymatrixFP.Value
a = UBound(inputArray, 1)
b = UBound(inputArray, 2)
ReDim p(1 To a, 1 To b)
For i = 1 To a
For j = 1 To b
p(i, j) = inputArray(i, j)
Next j
Next i
CUV = CMSUValue(Sbeg, Sval, v, r, q, divprotected, tsrtarget, window, T, p, Payout_Rows, Iterations, Interpolation)
End Function
| |