# I'm a programmer and need a formula for calculating overal ROI

 HOME ยป Personal Finance

I'm programming a web app to track my hedge fund performance. I'd like to find my overall ROI for all time.If I had a beginning balance and my current balance then finding the ROI is easy. For instance ((current balance / beginning balance) * 100) to get the percentage.Where I am having difficulty is in the fact that each week there are debits/credits to the account.So how can I accurately figure a lifetime ROI when each week I'm adding/removing funds?Here is an example weekly report.9

 Related to : I'm a programmer and need a formula for calculating overal ROI In need for a formula for calculating an ID to a point in 2d space Personal Finance Basicly I am trying to figure out a formula that calculates a unique identification number for a dot in 2 dimensional space. Conditions : if f(x,y) = c then there is no other X1, Y1 so that f(X1,Y1) = c both x and y are integers and c must be also an integer (double may not be suited since its precision is questionable and im not sure if it's suited to use as a key in hashtable). Calculating image pixel values (e.g. the mean) of Contour-inliers using mask & ROI in OpenCV Personal Finance The problemI want to calculate e.g. the mean value of the pixel values belonging to a contour given as a vector of Points given by OpenCV. The image is rather big compared to the contour, that's why i wanted to set a ROI as big as the bounding_box of the Contour and do the masking afterwards. However, this does not really work. I get only zeros as result for mean calculation.The code with line numbers```(1) Mat crop = Mat(*img, bounding_box); //img is the original image (may be 1024*1024)(2) Mat mask = Mat::zeros(crop.rows, crop.cols, CV_8UC1); //the mask with the size of cropped image(3)vector 1200 percentageWidth = 65From the above I can work out manually that:If screenWidth = 760 percentageWidth = 82.What is the formula I need so I can change percentageWidth on a screen width change?CheersSteveW I'm a programmer and need a formula for calculating overal ROI Personal Finance I'm programming a web app to track my hedge fund performance. I'd like to find my overall ROI for all time.If I had a beginning balance and my current balance then finding the ROI is easy. For instance ((current balance / beginning balance) * 100) to get the percentage.Where I am having difficulty is in the fact that each week there are debits/credits to the account.So how can I accurately figure a lifetime ROI when each week I'm adding/removing funds?Here is an example weekly report.9