Analyzing past fund performance - What if?

I don’t have a strong finance background being an engineer so I would appreciate some pointers on how to go about gaining more knowledge in the field of past fund performance “What if?” analysis. Basically what I am trying to do is analyze past performance for a given fund in the following way: Lets say a fund holds 3 stocks: A, B and C. I want to model what the performance would have been over the past year if the Fund instead held just stocks A and B (or A, B and X) While doing this I want to also take into account the dividends etc. for all stocks. It is important that the modeling should be as accurate as possible preferably to the dollar. I am assuming that historical data for all stocks is readily available from several databases and also that it is easy to figure out the Funds fees/ expenses etc. Any pointers to where I can find good reading material or information on formulas/methods for this will be highly appreciated. Are there any software tools that will let you model this accurately. Thanks in advance.

It’s simple if you have decent data. The only hard part is acccounting for corporate actions but this is unlikely to be a problem with 2 stocks (deep pain in the butt with thousands though). You need to make a decision about rebalancing (do you keep the same allocation all year and how do you reinvest dividends?) and then just run the daily p/l. This is a simple Excel spreadsheet, not something you need software for.

Thanks JoeyDVivre. I will have to deal with potentially thousands of stocks and deal with several Mutual fund portfolios, so I will probably need some kind of a database with historical stock prices, and dividend payouts with dates etc. Also being somewhat of a newbie to the finance field I still need some pointers to good books or other sources of information on the best approach to take so that I dont end up re-inventing the wheel so to speak. Are there any well defined techniques/processes/formulas that exist? And yes I do want to account for re-balancing, with the assumption that all dividends are re-invested, since this is sort of intended as an analysis tool for 401k or IRA investements. Thanks again for your response.