├── README.markdown └── model.markdown /README.markdown: -------------------------------------------------------------------------------- 1 | # Portfolio-Analysis-Model 2 | This repo contains full documentation detailing the model used to analyse User Portfolios in Simply Wall St. 3 | 4 | Open sourcing our analysis model supports our committment to full transparency and allows our users to fully understand the logic behind the selection of the metrics used. 5 | 6 | ## License 7 | 8 | The company analysis model described in MODEL.markdown has been made open source under a [Creative Commons license Attribution-NonCommercial-ShareAlike 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/). 9 | -------------------------------------------------------------------------------- /model.markdown: -------------------------------------------------------------------------------- 1 | Simply Wall St Portfolio Analysis Model 2 | ======================================= 3 | 4 | Overview of the model 5 | --------------------- 6 | 7 | The Simply Wall Street (SWS) app is designed to help make you a better investor by allowing you to make non-emotional long term investment decisions. It is recommended you read our [Company Analysis Model](http://github.com/SimplyWallSt/Company-Analysis-Model/blob/master/MODEL.markdown) documentation before this, as it is based upon the results of that analysis. 8 | 9 | For many investors their Portfolio is nothing more than a list of stocks with positive or negative returns. The aim of the SWS Portfolio infographic report is to improve the users understanding of their Portfolio and therefore make better decisions by: 10 | 11 | - Understanding what kind of Portfolio they currently have; 12 | 13 | - Realization of their Portfolio value versus the price; 14 | 15 | - Understanding of the individual companies that make up their Portfolio; 16 | 17 | - Understanding their returns relative to a benchmark (e.g. the market or another Portfolio). 18 | 19 | We encourage users to decide upon and following a strategy once equipped with the information and tools provided by SWS. 20 | 21 | To assist in this process Simply Wall St is able to analyse a Portfolio of stocks based on the results of our analysis of the individual companies and an analysis of returns. 22 | 23 | The differences between a Watchlist, Holdings and Portfolio 24 | ----------------------------------------------------------- 25 | 26 | A Watchlist is a Portfolio without any tractions or value associated with the holdings. A Holdings Portfolio is a Watchlist with a number of shares assigned to each holding, a bit like a weighted Watchlist and finally a Portfolio has full transaction detail. 27 | 28 | To calculate returns on Watchlists and Holdings we create one Buy transaction per Holding for the period selected. 29 | 30 | ### Watchlists 31 | 32 | We back calculate the original number of shares in the Buy transaction so that the final value of each holding is equally weighted. 33 | 34 | ### Holdings 35 | 36 | We use the number of shares assigned to each stock or holding for the Buy transactions. 37 | 38 | ### Portfolio 39 | 40 | We account for all recorded transactions. 41 | 42 | The Portfolio Snowflake 43 | ----------------------- 44 | 45 | The Portfolio Snowflake is calculated from the weighted average of the individual Snowflakes that make up the Portfolio. ETFs and Funds are ignored from this. 46 | 47 | ### Best and Worst Contributor 48 | 49 | The best and worst contribute to each score on the Portfolio Snowflake is calculated by: 50 | 51 | Contributor value = Score \ Weighting 52 | 53 | The Best (Highest) and Worst (Lowest) scores from each holdings are the contributors. 54 | 55 | Portfolio Return Calculation 56 | ---------------------------- 57 | 58 | Simply Wall St uses the dollar-weighted (aka money-weighted) method to calculate Portfolio returns where applicable. 59 | 60 | This method measures investment performance taking account of the size and timing of cash flows. For individual investors who have control of their accounts the dollar-weighed calculation is recommended as the more appropriate method. The alternate method is the time-weighted return which is typically used by fund managers who cannot control when new funds are deposited or removed from their accounts. 61 | 62 | To calculate the dollar-weighed return: 63 | 64 | 1. The average investment period (average years invested, AYI) is calculated by weighting the length of time that each capital input (e.g. Buy) was invested for; 65 | 66 | 2. The Simple Total Return is the gain divided by the average years invested; 67 | 68 | 3. The Annualised growth rate is the annual gain per year required to achieve the total gain. 69 | 70 | Note: if the AYI is less than 1 year no Annual growth rate is provided as this number is meaningless. An example of this would be short term volatility extrapolated over a year. 71 | 72 | ### Example Dollar-Weighted Return Calculation 73 | 74 | We start with the output from the SWS Returns Report for comparison, note this example uses Capital Gains only. 75 | 76 | **Simply Wall St Calculation Report** 77 | 78 | Ticker Transaction Type Date Price/Amount Shares Bought Sold Years 79 | Nasdaq:AMZN Buy 1/05/2013 $248.23 10 $2,482.30 - 3.39 80 | Nasdaq:AMZN Buy 19/01/2016 $571.77 5 $2,858.85 - 0.67 81 | Nasdaq:AMZN Sell 9/05/2016 $679.75 -10 - -$6,797.50 82 | Totals $5,341.15 -$6,797.50 1.93 83 | 84 | Current Position 85 | Net original cost Total shares Current Price Current Value Capital Gain 86 | -$1,456.35 5 $778.52 $3,892.60 $5,348.95 87 | 88 | Total Return: 100.15% 89 | 90 | 91 | **Dollar-Weighted Return Example Calculation** 92 | Gain = Total Gain from Sales + Current Value - Total Bought 93 | $5,348.95 =$6,797.50 + $3,892.60 - $5,341.15 94 | 95 | Return = Total Gain / Total Capital Invested 96 | 100.15% = $5,348.95 / $5,341.15 97 | 98 | 99 | **Compound Annual Growt Rate (CAGR) Example** 100 | CARG = ( 1 + Total Return ) ^ ( 1 / Avg. Years) - 1 101 | 43.33% = ( 1 + 1.0015 ) ^ ( 1 / 1.93 ) - 1 102 | 103 | 104 | **Comparison to Common Broker Method** 105 | Avg Cost of Current Holding = Total Shares * Weighted Avg. Buy Price 106 | $1,780.38 = 5 * $356.08 107 | 108 | Return = ( Current Value - Average Cost ) / Average cost 109 | 118.64% = ( $3,892.60 - $1,780.38 ) / $1,780.38 110 | 111 | 112 | 113 | 114 | 115 | 116 | ### Corporate Actions 117 | 118 | Regardless of Portfolio type any corporate actions are included. 119 | 120 | #### Dividends 121 | 122 | Any dividends paid are included in the returns calculation. 123 | 124 | If the option for dividend reinvestment is selected then any dividends paid are converted into the equivalent number of shares on the day of the action. 125 | 126 | ### Dividend Reinvestment 127 | Dividends can be reinvested on a per stock basis. This converts any dividend payments to an equivalent fractional share purchase on that day at 0 cost. 128 | 129 | #### Splits 130 | 131 | Any stock splits (or consolidations) are included in the returns calculation. If a stock split results in a fractional share this is rounded up the nearest whole number of shares, as per common practice. 132 | 133 | ### Currency Conversion 134 | 135 | If a stock is held in a different currency to that of the Portfolio then conversions are done based on end of day prices on: 136 | 137 | - Any Buy or Sell transactions 138 | - The current value of the Portfolio + the current value of any dividend payments which have not been reinvested 139 | 140 | #### Example Currency Conversion Calculation 141 | **Example currency conversion calculation** 142 | USD EUR Exchange Rate 143 | Buy 100 shares @ $10 $1,000 €1,400 1.4 144 | Current Value $1,200 €1,800 1.5 145 | 146 | Gain from Currency €100 147 | Gain from Price $200 €280 148 | 149 | Currency gain from Capital Gain €20 150 | 151 | Combined gain €400 152 | 153 | Current Value of original gain €300 (1.5 x $200) 154 | Net Currency Gain (Difference of combined - original) €100 155 | 156 | 157 | 158 | 159 | Remaining Portfolio Data 160 | ------------------------ 161 | 162 | The remaining Portfolio data such as Value, Future etc is calculated from the weighted average of the individual company results (e.g. PE Ratio). We impose fair limits on the various metrics to ensure extremely outlier do not skew the result, an example being a stock with a PE ratio of 2000x. 163 | 164 | The following exceptions/ notes are made: 165 | 166 | ### Volatility 167 | 168 | Unlike all the other Portfolio data ETF’s and funds are included in the Volatility calculation which uses the average 5 year Beta value weighted by current holding value. 169 | 170 | ### Value 171 | 172 | #### Portfolio Intrinsic Value based on Free Cash Flows 173 | 174 | To calculate the Intrinsic Value of the Portfolio the sum of individual Intrinsic values for each holding are multiplied by the number of shares held. 175 | 176 | For some smaller market cap companies, or financial firms, we are sometimes unable to calculate an intrinsic value. Shares in these companies are ignored in the calculations and for this reason the total value is sometimes lower than that of the total Portfolio value. 177 | 178 | #### PE, PEG and PB market ratios 179 | 180 | When calculating the weighted average for the Portfolio any companies with negative ratios are ignored. 181 | 182 | ### Future Performance 183 | 184 | Companies that are missing analyst consensus estimates for future growth are ignored from the weighted average of 1 and 3 year earnings growth. 185 | 186 | ### Health 187 | 188 | Banks and finance firms are ignored when calculating the weighted average debt to equity ratio. 189 | --------------------------------------------------------------------------------