Up Capture
I am trying to write a function to measure (given a set
of investment returns) the Investment's compound return
when the Benchmark was up divided by the Benchmark's
compound return when the Benchmark was up (Upcapture
Ratio). I have written the equation and it works except
for the part calculating the fund's returns when the
benchmark was up (see FUNDAP below). Thank you for the
help.
Public Function UPCAPTURE(FUNDRETURNS As RANGE, BMRETURNS
As RANGE) As Double
Set subsetfundreturns = Intersect
(FUNDRETURNS.Parent.UsedRange, FUNDRETURNS)
Set subsetbmreturns = Intersect
(BMRETURNS.Parent.UsedRange, BMRETURNS)
Dim FUNDAP As Double
Dim BMAP As Double
Dim FUNDRNGCELL As RANGE
Dim BMRNGCELL As RANGE
BMAP = 1
For Each BMRNGCELL In subsetbmreturns
If BMRNGCELL.Value 0 Then
BMAP = BMAP * (1 + BMRNGCELL.Value)
End If
Next BMRNGCELL
'THIS IS WHERE I NEED TO CALCULATE SIMILAR TO BMAP ABOVE
(But measuring the fund's returns when the benchmark was
up):
FUNDAP = ????
UPCAPTURE = (FUNDAP - 1) / (BMAP - 1)
End Function
|