Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I capture a date? | Excel Discussion (Misc queries) | |||
Excel screen capture to capture cells and row and column headings | Excel Discussion (Misc queries) | |||
want to capture date | Excel Discussion (Misc queries) | |||
Capture the Workbook Name | Excel Worksheet Functions | |||
How to capture row number | Excel Programming |