Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
returns on a portfolio
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all, I have a matrix called ETNWED which is a set of historical prices of 34 Shares. The size is 294x34 where there is 295 weeks and 34 shares, and the entries are their prices.
Ok additionally I have a matrix called Returns, which is the MONEY MADE at each time and for each share. This is also size of 294x34. So lets say for instance in Returns(10,2) =2. This mean that in week 10 our share number 2 made 2 dollars.
Now I want to produce a final return after 294 weeks. I am quite confused on how to do this.
My initial method was:
- Every week (ie, for i=1:294) do the sum of money made (ie sum of rows of returns) / sum of money invested (so this is the sum of the rows of ETNWED (but only the sum of the values which generated a return)).
Then I just added 1 and then did Prod of all of this to get final return.
If somebody can give me some advice I would really appreciate it.
Thanks,
2 commentaires
Walter Roberson
le 20 Juil 2012
I am uncertain whether the prices and returns are per share (and there is something that tells you how many shares you have), or if the prices and returns are total over all of your shares?
The prices... is there some kind of forced buy at those prices, or are the prices there to allow you to make decisions about which share mix to buy?
Rick Rosson
le 20 Juil 2012
Modifié(e) : Rick Rosson
le 22 Juil 2012
How many shares of each stock do you have in your portfolio? If you have one share of each stock, then that is fine. Otherwise, you will need a 34 element array to represent the number of shares for each issue.
Also, does the matrix called Returns represent the change in the stock price alone, or does it also include any cash dividends that may have been paid?
Likewise, have you accounted for any stock splits or stock dividends that may have occurred during the time frame of your data set? If so, how are they represented?
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!