max run up returns the largest consecutive gain from previous loss, I have came up with my own calculations using excel formular, but I want to turn all these into an user defined function coding in VB (but I don't know how to code in VB).
in the spreadsheet attached:
Col A & B are manual inputs
Col C calculates the cumulative NAV/price
Col D returns the NAV whenever there's a negative month occurs
Col E returns the Max NAV ( if that month's NAV is the largest within the period )
Col F calculates the rate of return - by using the (latest Max NAV - previous negative month's nav)/previous negative month's nav
I want something like..
"=maxrunup(B3:B92)" which will return the max runup as in cell H5
"=runupstart(B3:B92)" which will return the start date when it starts like in cell I5
"=runupend(B3:B92)" which will return the end date when it finishes like in cell J5
thanks
Bookmarks