<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Krishore Subramaniam on Medium]]></title>
        <description><![CDATA[Stories by Krishore Subramaniam on Medium]]></description>
        <link>https://medium.com/@krishore.subra?source=rss-7f18a8cdbfb4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Azx4y3wCTPPbCuGv.</url>
            <title>Stories by Krishore Subramaniam on Medium</title>
            <link>https://medium.com/@krishore.subra?source=rss-7f18a8cdbfb4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:13:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@krishore.subra/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Behind the scenes of the passive investment calculator]]></title>
            <link>https://medium.com/@krishore.subra/behind-the-scenes-of-the-passive-investment-calculator-de15d5a03766?source=rss-7f18a8cdbfb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/de15d5a03766</guid>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[stocks]]></category>
            <category><![CDATA[personal-finance]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Krishore Subramaniam]]></dc:creator>
            <pubDate>Fri, 29 Oct 2021 23:58:32 GMT</pubDate>
            <atom:updated>2021-10-29T23:58:32.822Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn how I used real US stock market data to explore how different dollar cost averaging strategies can improve your final return</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fetveC3ETDnvjdP4" /><figcaption>Photo by <a href="https://unsplash.com/@rechaoktaviani?utm_source=medium&amp;utm_medium=referral">recha oktaviani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>For the Dollar Cost Averaging (DCA) enthusiasts out there, I designed a simple tool to analyse different passive investing strategies. Having built a manual version of this calculator for myself in Excel, I thought I would have a go at creating a web app so that anyone can play around with it and perhaps get some useful insights.</p><p>This article explains how the calculator works to provide you with transparency on why you get the numbers you do. I will go through how the inputs generate the calculator’s outputs, and how you might use this information to your benefit.</p><p>If you haven’t tried the calculator yet, feel free to play around with it <a href="https://passiveinvestmentcalculator.com/">here</a> before reading the article.</p><h3><strong>Inputs</strong></h3><p>The tool takes five main inputs:</p><ol><li>the ticker symbol of the stock you wish to analyse</li></ol><p>2. how much to invest initially</p><p>3. what frequency do you wish to make recurring investments</p><p>4. how much to invest at each recurring period, and</p><p>5. how many years you wish to hold the investment for</p><p>Here are some examples for inputs, which we will use as the example for the rest of the article:</p><ol><li>Ticker: MSFT</li><li>Initial Investment: 3000</li><li>Recurring Frequency: Yearly</li><li>Recurring Investments: 1000</li><li>Investment Holding Period: 10</li></ol><p>Note that this tool only work for US stock ticker symbols, including Exchange Traded Funds, or ETFs. I use a combination of free accounts from <a href="https://polygon.io/">Polygon</a> and <a href="https://www.alphavantage.co/">Alphavantage</a> to collect my data.</p><h3><strong>Outputs</strong></h3><p>As you will notice in the web app, there are three categories for outputs: <strong>core assumptions, share purchases over investment lifetime </strong>and<strong> analysis of returns. </strong>Here is a snapshot of what we should expect to receive as an output if we used the calculator on October 20, 2021:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*MmEl5JSYXXWe1CS7ChVNsA.png" /></figure><p>Essentially the main output we might wish to examine is the <strong>total return after X years. </strong>All other values are simply supplementary information you may find useful. Let’s explore each of these output categories in detail.</p><h4><strong>Core assumptions</strong></h4><p>In order to compute all other outputs, the tool relies on two main quantitative assumptions: the stock’s <strong>historic 10-year return</strong> and the <strong>average dividend paid over the last 10 years</strong>.</p><p><strong>1) Historic 10-year return</strong></p><p>This return is calculated by taking the most recent closing share price ($308.23 on Oct 19, 2021) and finding the closing share price of the stock 10 years ago ($27.13 on Oct 19, 2011). We can then compute it’s return using the following equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*kVQVNqHDZJHKfCAq49n9tA.png" /></figure><p>Notice that the “10” represents the time in years between the final and initial prices. One could technically make this anything they want (e.g. a 20-year historic return) but for simplicity, I have standardised this to be 10 years in the calculator backend. Those familiar with finance may also recognise this is the basic annualised return or Compound Annual Growth Rate (CAGR) equation.</p><p>Substituting our values, we get our historic 10-year return:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*qNfHx4AqJZUgKYJJCNp_6w.png" /></figure><p><strong>2) Average dividend paid over the last 10 years</strong></p><p>This average dividend is calculated by, well, taking all the dividends paid out over the last 10 years since Oct 19, 2011, and taking their average. Here’s a snapshot of the dividends over the last 10 years (it’s a long list, so I’m only displaying a partial screenshot):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*Jq9e8l4QQM6cXX2wgA5whw.png" /></figure><p>Since it’s not shown here, the most recent dividend paid after Oct 19, 2011 was made on Dec 12, 2011 at $0.20. Given a steadily increasing dividend pay out for Microsoft, you can see why the average dividend pay out over the last 10 years is $0.37, roughly halfway between the oldest ($0.20) and newest ($0.56) dividend pay out for this 10-year period.</p><p>It is interesting to note that in Microsoft’s case, $0.37 may not be a good value to use in the model as they are currently already at $0.56 and this value has shown fairly consistent increase over the years. So wouldn’t we expect to receive more dividends in the future? Yes, that’s certainly plausible, and this is where one of the limitations of the calculator exists.</p><p><strong>A financial disclaimer</strong></p><p>Before moving on, however, alarm bells may be ringing. After all, in some corner of any financial services document, there will be a disclaimer that <strong>“Past performance is not an indicator of future performance”</strong>. You see this in the corner of an ETF product document, or hear it from your financial advisor. But here, I am doing exactly that. I am using past performance through the historic 10-year return and average dividends to project how the stock may expect to perform in the future. And it is definitely not an exact science, so keep this in mind.</p><p>Before you decide to invest in a stock based solely on the outputs of this calculator, stop yourself. Do your own research. This is simply an extra tool in your arsenal, but does not replace understanding of the stock’s financial health, it’s competitive advantages, and it’s future growth potential, to name a few. I’ll provide some ideas for potential uses at the end.</p><h4><strong>Share purchases over investment lifetime</strong></h4><p>The recent share price is simply provided for your reference, but the meat of the computations occur in the <strong>shares bought through initial investment</strong>, <strong>recurring investment</strong> and <strong>dividend re-investments </strong>outputs.</p><p><strong>1)</strong> <strong>Shares bought through initial investment</strong></p><p>This is<strong> </strong>quite straightforward. Simply take the initial investment amount ($3000) and divide it by the most recent share price ($308.23).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*-pM32gzM8vjydJwNj77jtA.png" /></figure><p>The value is rounded down to depict reality (if you round up, you would actually need $3082.30 to purchase 10 shares). By rounding down, we actually have some money left over:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*VQaeFTl3n_ipYAMeXvflqA.png" /></figure><p>Therefore, given an initial investment of $3000 at a share price of $308.23, we are able to purchase 9 shares of Microsoft, leaving a surplus of $225.93.</p><p>Note that while fractional shares are now a common functionality on stockbroking platforms, I have decided to take a “cleaner” approach and stick with whole shares. So for this model, we will keep the excess $225.93 and add it to the first recurring investment.</p><p><strong>2) Shares bought through recurring investment</strong></p><p>This<strong> </strong>becomes a bit more complicated. Here is a snapshot of the calculations that happen in the backend:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*Df50ZBUDaL5zJVQV7fRdSQ.png" /></figure><p>Let’s take it one column at a time. The number of periods in the first column are determined by multiplying our recurring investment frequency (which is basically the number of investments made each year) with the investment holding period. In this case, we make 1 investment each year and the investment holding period is set at 10 years, therefore we have 10 periods. If we chose a monthly recurring investment frequency instead of yearly, it would be 12 investments per year for 10 years, resulting in 120 periods.</p><p>The second column is calculated by applying the historic 10-year return to each period. For example, to get to the stock price of $308.23 from Period 0 to $393.01 from Period 1, you simply use the following equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*CwGOygKHQbyuRd4SaAWxcg.png" /></figure><p>We can then repeat this calculation to get the predicted stock price for subsequent periods.</p><p>Note that Period 0 is the day on which we hypothetically make the investment (i.e. Oct 19, 2021). Every subsequent re-investment is then made after the duration of our period elapses. In this case, we have a yearly period and so Period 1’s investment is made on Oct 19, 2022, at which we have forecasted a share price of $393.01.</p><p>The third column is simply calculated by adding the <strong>amount leftover from the previous period</strong> with the <strong>recurring investment amount</strong>, and dividing it by the <strong>current period’s stock price</strong>. For example, to calculate how many shares are bought at the end of Period 1, we write:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*YTOZnvsiqDc68o5x9VhdmA.png" /></figure><p>This gives us approximately 3.11933 shares, which we will round down to 3 shares. To find out the amount leftover in the last column, we simply take the excess fractional shares that were not purchased of 0.11933… and multiply it by the share price of $393.01, giving us $46.90.</p><p>Note that in reality, you may simply wish to have as no money leftover by investing in fractional shares. If you choose to do this, all else being equal, expect that your final return will be slightly higher than what the calculator provides (because you’re investing more money).</p><p><strong>3)</strong> <strong>Shares bought through dividend re-investments</strong></p><p>This<strong> </strong>gets even busier, so I will aim to give a high level overview of how it works instead of inundating you with spreadsheet numbers. Stocks generally pay out dividends quarterly or bi-annually. I figure out which frequency this is by taking the time difference between the <strong>most recent dividend record date</strong> and the <strong>second most recent dividend record date</strong>.</p><p>Historically in Microsoft’s case, they’ve been paid out quarterly. However, my calculator backend shows that there is actually a six month gap between the last two dividends (between Aug 19, 2021 and Feb 2, 2021), resulting in my software assuming its a <strong>bi-annual</strong> dividend pay out. Further research shows that Microsoft actually had a dividend record date on May 20, 2021, but for some reason the stock API I used to get this data excluded this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*2OTmvsVq4-ewjx2wmiEBuA.png" /></figure><p>Given potential for inherent errors in the API, the dividend calculations may be slightly inaccurate. On the plus side, however, this type of error would <strong>understate </strong>reality, creating a more conservative calculator estimate. For example, if a dividend entry is missing, the calculator would assume its bi-annual, which would mean fewer dividend payments, and lower return overall.</p><p>Okay, so now that we know the dividend frequency, we can roughly determine when the next dividend record date would be by adding either 90 days to the most recent dividend date of Aug 19, 2021 if it was a quarterly dividend, or 180 days if it was a bi-annual dividend.</p><p>To find out how many shares we can purchase through a dividend reinvestment plan (DRP), we need to find two key variables:</p><ul><li>the future share price for each future dividend date until the end of the investment holding period</li><li>the total dividend amount received for each future dividend date until the end of the investment holding period</li></ul><p>The <strong>future share price</strong> can be calculated by using a slightly altered future price equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*95Ik8ZVGcoMhx9WmeiJqCg.png" /></figure><p>For example, given a quarterly dividend, the next dividend record date would be approximately Dec 19, 2021 (i.e. 90 days after Aug 19, 2021). This is approximately 61 days after our initial investment date on Oct 19, 2021. Using our future price formula above, we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*vUZUAfG1Lx4hEEr6lLQrYA.png" /></figure><p>The <strong>total dividends received</strong> can then be calculated by multiplying the no. of shares held to date by the average dividend paid over last 10 years. In our scenario, we can multiply the 9 shares purchased from our initial investment and multiply that by the average dividend of $0.37 to get $3.33 worth of dividends.</p><p>We can then calculate the <strong>number of shares bought through DRP</strong> for that dividend date by dividing the total dividends received by the forecasted share price on that date. With only $3.33 worth of dividends, we cannot afford to purchase a whole share for $321, so the $3.33 gets carried forward to the next dividend record date. These calculations are then repeated for all subsequent dividend dates until the end of the investment holding period.</p><p>This entire process aims to mimic how a DRP works in reality. Interestingly, what you will notice is that we have bought 0 shares through dividend re-investment, because the dividends we receive can never keep up with the forecasted rising price of Microsoft.</p><h4><strong>Analysis of returns</strong></h4><p>In order to find our return, we need to compare how much of our own money translated into stock value after 10 years. Over the investment lifetime, we can see that we invested $13 000 (initial investment of $3000 plus 10 recurring investments of $1000). After 10 years, we find we have 19 shares in total, each of which is predicted to be worth $3500.68 in 2031, assuming the share grows at the rate of 27.51% at which it did in the past 10 years prior to 2021. This gives us a total stock value of $66 513.40 (19 shares multiplied by $3500.68 per share).</p><p>Unfortunately, because we made multiple investments over the years at different share prices, we have to tweak one value in the return formula below. Instead of having 10 years as our time period, we need to calculate the <strong>average investment period </strong>of all the investment periods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*UYO6Y9imMHOL6oWdMZzvvQ.png" /></figure><p>This is based on the dollar-weighted return calculation, and I learned this from a brilliant Sydney-based startup called <a href="https://simplywall.st/">Simply Wall St</a>. I was captivated by their portfolio valuation tool and began to explore how it worked behind the scenes through their <a href="https://github.com/SimplyWallSt/Portfolio-Analysis-Model/blob/master/model.markdown">Github page</a>. This understanding of portfolio valuation was partly what inspired me to automate a product for others to use, which until now I had previously done manually for myself.</p><h3>Potential uses</h3><p>The tool is designed to help you analyse your underlying passive investment strategy. If you simply choose the stock with the highest return according to this calculator without a strong understanding of the fundamentals of the business, reality may not play out as you think. For example, just because Microsoft grew at an annualised rate of 27.51% in share price over the last 10 years, how confidently can you say this can be sustained for the next 10 years?</p><p>So while it should not be the be-all-end-all for your investment decision, it can help you answer questions such as: Should I do a once-off investment or invest $X consistently every month, twice a year, or maybe even once a year? Is it worth increasing the amount I invest initially, to maximise the dividends I receive? How will these changes affect my final return, assuming the stock continues to perform as it had in the past?</p><p>These are just a few examples - it’s now yours to experiment with!</p><h3>Feedback is welcome</h3><p>And there you have it, all the inner workings of the passive investment calculator at your fingertips. By writing this article, I hope that people can openly question my calculations and challenge the views stated in this article by commenting below, to help me improve any flaws in the calculator design.</p><p>Please do also comment below what insights you gained from the tool, if you find it useful or if you want to suggest features. I built this web app in the hopes that it WOULD benefit others, so your feedback will help me improve it so it DOES indeed benefit others.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de15d5a03766" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>