If I bought and sold the same stock for many years, how can I calculate the total gains/loses made from all of the transactions assuming that I have a column containing all of the stock's prices, a column containing all of the buy dates, and a column containing all of the sell dates?
Cross posts:
http://www.mrexcel.com/forum/excel-q...ing-stock.html
http://www.excelforum.com/showthread.php?t=1168071
I attached a sample from my large spreadsheet. Essentially, any time you see a "1," that is the date I bought the stock. I would need to calculate the percent change of the stock price from that date until the date the stock was sold, which is represented by a "-1." As you can see, the stock was bought and sold many times over the years. So I would need to calculate all of the gains/loses to determine whether the decisions would have yielded an overall positive result (gain).