<?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 Pritish Thakkar on Medium]]></title>
        <description><![CDATA[Stories by Pritish Thakkar on Medium]]></description>
        <link>https://medium.com/@pritishthakkar?source=rss-502c05e4f21------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IpPpqZC5Me4iXw1xr1cAQw.png</url>
            <title>Stories by Pritish Thakkar on Medium</title>
            <link>https://medium.com/@pritishthakkar?source=rss-502c05e4f21------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 13:01:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pritishthakkar/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[Which industry rises on average in a specific month?]]></title>
            <link>https://pritishthakkar.medium.com/which-industry-rises-on-average-in-a-specific-month-81a409c352cc?source=rss-502c05e4f21------2</link>
            <guid isPermaLink="false">https://medium.com/p/81a409c352cc</guid>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[stock-market]]></category>
            <dc:creator><![CDATA[Pritish Thakkar]]></dc:creator>
            <pubDate>Sat, 10 Feb 2024 07:53:49 GMT</pubDate>
            <atom:updated>2024-02-10T07:53:49.556Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*86Hd237bxAMBu19U" /></figure><h4>Introduction</h4><p>I was just curious to find out which industry one can bet in a specific month, so I just picked 15 years of historical data of India’s top 200 companies and did my thing.</p><h4>Methodology</h4><p>I wrote a simple python script which first find the average of returns of all stocks of a particular sector and then I averaged the returns month wise.</p><pre>import pandas<br>import pandas as pd<br><br># My utils to fetch data of 200 nifty stocks from Yfinance<br>from utils.nifty_50_utils import get_stock_data_batch, nifty_200, stocks_info, get_industry_of_a_stock, \<br>    get_all_industries<br>import csv<br>import os<br><br><br>class MonthlyInsightProvider:<br><br>    def get_insights(self, offline=True, path=&#39;.&#39;):<br>        industry_monthly_avg_profits = self.get_industries_monthly_avg_profits(offline, path)<br>        monthly_avg_profits_aggregated = self.get_monthly_avg_profits_aggregated(monthly_profits_full)<br>        return industry_monthly_avg_profits, monthly_avg_profits_aggregated<br><br>    def get_industries_monthly_avg_profits(self):<br>        <br>        stocks = nifty_200<br>        batch_data = get_stock_data_batch(stocks, 15)<br>        stock_profits = pd.DataFrame()<br><br>        for stock in stocks:<br>            sdf = batch_data[batch_data.index.isin([stock + &#39;.NS&#39;], level=1)]<br>            industry = get_industry_of_a_stock(stock)<br>            stock_profits = stock_profits._append(self.get_monthly_profits_of_a_stock(sdf, stock, industry))<br><br>        industry_avg_profits = profits.drop([&quot;start&quot;, &quot;close&quot;], axis=1) \<br>            .groupby([&quot;year&quot;, &quot;month&quot;, &quot;industry&quot;]) \<br>            .mean(&quot;profit&quot;) \<br>            .reset_index() \<br>            .sort_values([&quot;year&quot;, &quot;month&quot;, &quot;profit&quot;], ascending=True)<br><br>        return industry_avg_profits<br><br>    def get_monthly_avg_profits_aggregated(self, monthly_profits):<br>        industries = get_all_industries()<br>        months = [i for i in range(1, 13)]<br>        output = []<br><br>        for industry in industries:<br>            tmp = {&quot;industry&quot;: industry}<br>            for month in months:<br>                tmp[month] = monthly_profits[<br>                    (monthly_profits[&#39;industry&#39;] == industry) &amp; (monthly_profits[&#39;month&#39;] == month)][&#39;profit&#39;].mean()<br>            output.append(tmp)<br><br>        return pandas.DataFrame(output)<br>    <br>    def get_monthly_profits_of_a_stock(df, stock, industry):<br>        profits = []<br>        df = df.reset_index()<br>        init_price = -1<br>        for i in range(1, len(df)):<br>            cdate = df.loc[i, &quot;date&quot;]<br>            close = df.loc[i, &quot;close&quot;]<br>            y, m, d = cdate.year, cdate.month, cdate.day<br>            <br>            # if we move to next month, save returns of previous month<br>            if m != df.loc[i - 1, &quot;date&quot;].month:<br>                if init_price != -1:<br>                    pnl = (df.loc[i - 1, &quot;close&quot;] - init_price) / init_price * 100<br>                    profits.append({<br>                        &quot;year&quot;: (y - 1 if m == 1 else y),<br>                        &quot;month&quot;: (12 if m == 1 else m - 1),<br>                        &quot;profit&quot;: pnl,<br>                        &quot;stock&quot;: stock,<br>                        &quot;industry&quot;: industry,<br>                        &quot;start&quot;: init_price,<br>                        &quot;close&quot;: df.loc[i - 1, &quot;close&quot;]<br>                    })<br>                init_price = close<br><br>        return pd.DataFrame(profits)<br>        <br># Please note that this might not run as it is dependent on utils written<br># separately. Above code is just for understanding the logic and in order <br># to use it, you need a function to fetch stocks data and might need to <br># debug as I tried to clean this in medium editor and not in an IDE.</pre><h4>Result</h4><pre>|    | industry                          | 1     | 2     | 3     | 4    | 5    | 6     | 7     | 8     | 9    | 10    | 11    | 12    |<br>|----|-----------------------------------|-------|-------|-------|------|------|-------|-------|-------|------|-------|-------|-------|<br>| 0  | Financial Services                | -0.69 | -0.78 | 0.99  | 4.34 | 3.63 | 2.07  | 1.5   | -0.28 | 1.62 | 3.73  | 2.56  | 0.27  |<br>| 1  | Diversified                       |       |       |       |      |      |       |       |       |      |       |       |       |<br>| 2  | Capital Goods                     | 0.42  | -0.61 | 1.88  | 4.06 | 5.5  | 2.5   | 1.89  | 1.84  | 2.6  | 2.61  | 2.23  | 1.63  |<br>| 3  | Construction Materials            | -0.82 | 0.9   | 3.2   | 1.86 | 2.12 | 1.08  | 3.79  | -0.46 | 4.11 | 1.05  | 0.69  | 0.7   |<br>| 4  | Healthcare                        | -0.27 | -0.97 | 1.95  | 4.59 | 0.26 | 3.86  | 4.1   | 1.8   | 2.73 | 0.83  | 2.09  | 1.52  |<br>| 5  | Chemicals                         | -0.01 | -1.25 | 2.62  | 7.25 | 4.59 | 0.16  | 3.56  | 1.91  | 1.75 | 3.25  | 1.55  | 4.18  |<br>| 6  | Power                             | -0.05 | -2.34 | 1.83  | 3.13 | 2.45 | 0.69  | 2.34  | 0.65  | 2.27 | 4.17  | 2.02  | 2.19  |<br>| 7  | Metals &amp; Mining                   | -1.22 | -1.25 | 0.89  | 5.23 | 2.41 | -0.38 | 2.02  | 0     | 0.14 | 4.29  | 2.21  | 4.63  |<br>| 8  | Services                          | 0.33  | 1.38  | 3.36  | 3.55 | 5.2  | -0.73 | 0.88  | 0.54  | 0.81 | 0.19  | -0.57 | 1.74  |<br>| 9  | Oil Gas &amp; Consumable Fuels        | 0.58  | -1.53 | 1.25  | 3.14 | 3.88 | 0.25  | 0.81  | 1.46  | 1.34 | 1.27  | 1.36  | 1.43  |<br>| 10 | Fast Moving Consumer Goods        | -0.09 | 0.35  | 2.59  | 4    | 3.39 | 2.7   | 3.09  | 1.41  | 0.7  | 1.37  | 1.03  | 1.49  |<br>| 11 | Consumer Services                 | -1.82 | 0.3   | 1.33  | 3.18 | 4.31 | 1.01  | 2.54  | 3.64  | 3.54 | 0.96  | 3.4   | 2.23  |<br>| 12 | Information Technology            | 2.11  | 0.73  | -0.26 | 1.7  | 3.02 | 1.79  | 5.62  | 2.29  | 3.23 | 1.21  | 2.85  | 4.55  |<br>| 13 | Textiles                          | -2.03 | -2.8  | 4.16  | 4.03 | 3.3  | 2.9   | 4.32  | 1.38  | 2.91 | 3.94  | 1.93  | 5.29  |<br>| 14 | Automobile and Auto Components    | -0.01 | -1.28 | 0.25  | 5.71 | 4.28 | 0.69  | 2.87  | 1.25  | 4.08 | 3.44  | 2.62  | 1.83  |<br>| 15 | Consumer Durables                 | 0.03  | -0.16 | 3.25  | 2.83 | 5.61 | 1.43  | 4.09  | 3.26  | 1.97 | 1.16  | 1.87  | 1.73  |<br>| 16 | Telecommunication                 | -2.88 | -1.9  | 0.79  | 2.68 | 0.77 | 2.31  | 2.7   | -1.9  | 2.74 | -1.88 | 4.47  | 0.87  |<br>| 17 | Realty                            | 0.32  | -2.34 | 2.35  | 3.14 | 6.47 | 0.36  | 2.99  | -1.42 | 2.85 | 2.98  | 0.37  | 1.08  |<br>| 18 | Forest Materials                  |       |       |       |      |      |       |       |       |      |       |       |       |<br>| 19 | Construction                      | 4.15  | -2.8  | 1.42  | 4.22 | 6.73 | 4.74  | -1.74 | -0.66 | 1.87 | 3.71  | 3.99  | -1.52 |<br>| 20 | Media Entertainment &amp; Publication | -2.95 | -3.3  | -0.54 | 2.08 | 1.71 | -0.42 | 4.17  | 0.55  | 3.75 | 1.83  | 0.23  | 2.83  |</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81a409c352cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practice these problems before your coding interview]]></title>
            <link>https://pritishthakkar.medium.com/practice-these-problems-before-your-coding-interview-1102cd90aede?source=rss-502c05e4f21------2</link>
            <guid isPermaLink="false">https://medium.com/p/1102cd90aede</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[dsa-courses]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[interview-questions]]></category>
            <dc:creator><![CDATA[Pritish Thakkar]]></dc:creator>
            <pubDate>Thu, 30 Nov 2023 08:06:02 GMT</pubDate>
            <atom:updated>2023-11-30T08:06:02.116Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Linked list — 1</li><li>Hash Map — 1</li><li>Sliding Window — 2</li><li>Array — 1</li><li>String — 2</li><li>Math — 1</li></ol><h4>Linked Lists</h4><p><a href="https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/">2130. Maximum Twin Sum of a Linked List</a><br>Break the linked list in two halves, reverse the second half and traverse both of the half linked list and find the max sum by adding the corresponding values of both linked lists.</p><pre>/**<br> * Definition for singly-linked list.<br> * public class ListNode {<br> *     int val;<br> *     ListNode next;<br> *     ListNode() {}<br> *     ListNode(int val) { this.val = val; }<br> *     ListNode(int val, ListNode next) { this.val = val; this.next = next; }<br> * }<br> */<br>class Solution {<br>    public int pairSum(ListNode head) {<br>        <br>        ListNode slow = head;<br>        ListNode fast = head;<br><br>        while(fast != null) {<br>            slow = slow.next;<br>            fast = fast.next.next;<br>        }<br><br>        ListNode rev = reverse(slow);<br>        int ans = 0;<br>        while(head != null &amp;&amp; rev != null) {<br>            ans = Math.max(ans, head.val + rev.val);<br>            head = head.next;<br>            rev = rev.next;<br>        }<br><br>        return ans;<br><br><br>    }<br><br>    public ListNode reverse(ListNode head) {<br>        ListNode prev = null;<br>        ListNode curr = head;<br>        while(curr != null) {<br>            ListNode tmpNext = curr.next;<br>            curr.next = prev;<br>            prev = curr;<br>            curr = tmpNext;<br>        }<br>        return prev;<br>    }<br>}</pre><h4>Hash Map</h4><p><a href="https://leetcode.com/problems/determine-if-two-strings-are-close/">1657. Determine if Two Strings Are Close</a><br>Store frequency of each char of both string in two separate arrays. Strings are not close if -</p><ul><li>Length of both strings are different.</li><li>A specific char is present in a word but missing in another word.</li><li>Sort freq arrays and their values should match.</li></ul><pre>class Solution {<br>    public boolean closeStrings(String word1, String word2) {<br>        int[] freq1 = new int[26];<br>        int[] freq2 = new int[26];<br><br>        if (word1.length() != word2.length()) <br>          return false;<br><br>        for (int i= 0 ; i &lt; word1.length(); i++) {<br>          freq1[word1.charAt(i) - &#39;a&#39;]++;<br>          freq2[word2.charAt(i) - &#39;a&#39;]++;<br>        }<br>        <br>        for (int i = 0 ; i &lt; 26; i++) {<br>          if((freq1[i] != 0 &amp;&amp; freq2[i] == 0) || (freq1[i] == 0 &amp;&amp; freq2[i] != 0)) {<br>            return false;<br>          }<br>        }<br>        <br>        Arrays.sort(freq1);<br>        Arrays.sort(freq2);<br><br>        for(int i = 0 ; i &lt; 26; i++) {<br>          if(freq1[i] != freq2[i]) {<br>            return false;<br>          }<br>        }<br>        return true;<br>    }<br>}</pre><h4>Sliding window</h4><p><a href="https://leetcode.com/problems/max-consecutive-ones-iii/">1004. Max Consecutive Ones III</a><br>Sliding window problem — Use deque or maintain left and right index for maintaining current window range.</p><pre>class Solution {<br>    public int longestOnes(int[] nums, int k) {<br>        int n = nums.length;<br><br>        Deque&lt;Integer&gt; q = new ArrayDeque&lt;&gt;(); // linear space and time<br><br>        int onesSoFar = 0;<br>        int zeroesSoFar = 0;<br>        int ans = 0;<br><br>        for(int i = 0 ; i &lt; n ; i ++) {<br>            q.addLast(nums[i]);<br>            onesSoFar += (nums[i] == 1) ? 1 : 0;<br>            zeroesSoFar += (nums[i] == 0) ? 1 : 0;<br>            if(zeroesSoFar &gt; k) {<br>                while(q.size() &gt; 0 &amp;&amp; q.pollFirst() != 0) {<br>                    onesSoFar--;<br>                }<br>                zeroesSoFar--;<br>            }<br>            ans = Math.max(ans, onesSoFar + zeroesSoFar);<br>        }<br><br>        return ans; <br>    }<br>}</pre><p><a href="https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length/">1456. Maximum Number of Vowels in a Substring of Given Length</a><br>Simple sliding window problem, Keep a constant to count the frequency of vowels in every window.</p><pre>class Solution {<br>    private static final Set&lt;Character&gt; s = new HashSet&lt;&gt;();<br>    {<br>        s.add(&#39;a&#39;);s.add(&#39;e&#39;);s.add(&#39;i&#39;);s.add(&#39;o&#39;);s.add(&#39;u&#39;);<br>    }<br>    <br>    public int maxVowels(String s, int k) {<br>        int freq = 0;<br>        int ans = 0;<br><br>        for(int i = 0 ; i &lt; k ; i ++) {<br>            if (isV(s.charAt(i))) {<br>                freq++;<br>            }<br>        }<br><br>        ans = freq;<br><br>        for (int i = k; i &lt; s.length(); i++) {<br>            if(isV(s.charAt(i-k))) {<br>                freq--;<br>            }<br>            if(isV(s.charAt(i))) {<br>                freq++;<br>            }<br>            ans = Math.max(ans, freq);<br>        }<br>        return ans;<br>    }<br><br>    private boolean isV(final char c) {<br>        return s.contains(c);<br>    }<br>}</pre><h4>Array</h4><p><a href="https://leetcode.com/problems/product-of-array-except-self/">238. Product of Array Except Self</a><br>Below is the solution to do it in constant memory.</p><pre>class Solution {<br>    public int[] productExceptSelf(int[] nums) {<br>        int n = nums.length;<br>        int product = 1;<br>        int[] ans = new int[n];<br><br>        for(int i = 0 ; i &lt; nums.length; i++) {<br>            ans[i] = 1;<br>        }<br>        <br>        // Save product from start to end.<br>        for(int i= 1; i &lt; nums.length; i++) {<br>            ans[i] = ans[i] * product * nums[i-1];<br>            product *= nums[i-1];<br>        }<br>        product = 1;<br><br>        // Save product from end to start<br>        for(int i = n-2; i &gt;= 0; i--) {<br>            ans[i] = ans[i] * product * nums[i+1];<br>            product *= nums[i+1];<br>        }<br>        return ans;<br><br>    }<br>}</pre><h4>String</h4><p><a href="https://leetcode.com/problems/reverse-words-in-a-string/">151. Reverse Words in a String</a><br>Solution is to reverse the whole string first and then reverse each word. Can be done inplace with constant memory and linear time.</p><p><a href="https://leetcode.com/problems/optimal-partition-of-string/">2405. Optimal Partition of String</a><br>Solution is to use a simple map/arr data structure to check if a character is already present in the current partition. If yes, increase your partition count and refresh your map/arr, else consider the character in your current partition.</p><pre>class Solution {<br>    public int partitionString(String s) {<br>        int n = s.length();<br>        boolean isCharPresent[] = new boolean[26];<br>        <br>        int partitions = 1;<br><br>        for (int i = 0 ; i &lt; n; i ++ ) {<br>            if (isCharPresent[s.charAt(i) - &#39;a&#39;]) {<br>                partitions++;<br>                for (int j = 0 ; j &lt; 26; j ++) {<br>                    isCharPresent[j] = false;<br>                }<br>            }<br><br>            isCharPresent[s.charAt(i) - &#39;a&#39;] = true;<br>        }<br>        return partitions;<br>    }<br>}</pre><h4>Math</h4><p><a href="https://leetcode.com/problems/the-kth-factor-of-n/">1492. The kth Factor of n</a><br>Simple problem, can be done in O(sqrt(n)) time and space complexity. Below is the solution in Java.</p><pre>class Solution {<br>    public int kthFactor(int n, int k) {<br>        List&lt;Integer&gt; factors = new ArrayList&lt;Integer&gt;();<br>        for (int i = 1 ; i &lt;= Math.sqrt(n); i++) {<br>            if (n % i == 0) {<br>                factors.add(i);<br>                if (i*i != n)<br>                    factors.add(n / i);<br>            }<br>        }<br><br>        Collections.sort(factors);<br>        if (k &gt; factors.size()) {<br>            return -1;<br>        }<br>        return factors.get(k-1);<br>    }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1102cd90aede" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The intelligent investor — Part-2]]></title>
            <link>https://pritishthakkar.medium.com/the-intelligent-investor-part-2-671cc01ed4db?source=rss-502c05e4f21------2</link>
            <guid isPermaLink="false">https://medium.com/p/671cc01ed4db</guid>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[money]]></category>
            <dc:creator><![CDATA[Pritish Thakkar]]></dc:creator>
            <pubDate>Mon, 21 Dec 2020 12:09:32 GMT</pubDate>
            <atom:updated>2020-12-22T10:18:33.213Z</atom:updated>
            <content:encoded><![CDATA[<h3>The intelligent investor — Part-2</h3><p>In my <a href="https://pritishthakkar.medium.com/stocksshit-the-intelligent-investor-part-1-8953b3f22a6a">previous article</a>, I summarized first three chapters of the book “The Intelligent Investor” written by Benjamin Graham. In this article we will see the summary for next three chapters.</p><h3>Chapter-4: General Portfolio policy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*DovRQ7SCgI8EJM1C" /><figcaption>From — Google Images</figcaption></figure><p>In this chapter, Graham explained a method of diversification between stocks and bonds. As you might know that diversification is allocating/investing your money not in just single asset class, but in multiple asset classes and also diversify within those asset classes with the aim of reducing risk of losing money.</p><p>So, the strategy that Graham explained is to keep a 50–50 distribution of your money within stocks and bonds. It should not be that rigid. You can increase/decrease the proportion on either side, but Graham strongly advised to never invest more than 75% in just one asset class.</p><p>Also, he talked about several American bonds, but since I am not an American resident, I didn’t pay much attention to that part. But yeah, three important things you can consider before investing in bonds-</p><ul><li>Taxable vs Tax free?</li><li>Long term vs Short term?</li><li>Bond vs Bond funds?</li></ul><h3>Chapter-5: The defensive investor and common stocks</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*KQ1Q9zNJn98JeFxH" /><figcaption>From — Quora.com</figcaption></figure><p>Common stocks are not something special but which are very popular and are included in major indices. In India, you can check stocks which constitute Nifty 50 or Sensex.</p><p>Everyone can’t be a stock investor. Right? For most people stock investing is a passive thing and they don’t spend time checking company details every quarter. They just want to park their money at some place where they can get good interest.</p><p>Graham gave four rules for the common stock component-</p><ul><li>There should be adequate and not excessive diversification. You should not be so stupid to diversify your portfolio among all 50 companies under sensex. Minimum should be 10 and max can be 30 common stocks in your portfolio.</li><li>Each company should be large, prominent and conservatively financed.</li><li>Company should have a long record of continuous divided payments</li><li>Investor should impose some limit on the price he will pay for an issue in relation to its average earnings over, say past 7 years.</li></ul><p>Common stocks are the apple of everyone eyes but one thing to note here is that price of common stocks advanced multiple times as compared to the increase in profits of a particular company. In this sense Graham calls them risky.</p><p>Other suggestion from Graham is to change your portfolio atleast once a year after re-analyzing the common stocks.</p><p><strong>Dollar-cost averaging </strong>is another concept for a defensive investor, which is similar to SIP in mutual funds. An investor can spend a fix amount of money purchasing common stocks every month and in long term it is profitable as proved by the history.</p><p>From the commentary, Peter Lynch statement and also Warren Buffet’s stories on YouTube, many people thought that if they buy the companies they know, they will earn huge profits. But they forget the second thing, which is in-depth research of the company. Its not like you eat Dominos Pizza, so invest your 1L in Jubilant food-works. No, don’t do this without doing research about the company profits, sales, ratios, and is it overpriced or not and many other things.</p><h3>Chapter-6: Portfolio Policy for Enterprising investor — Negative Approach</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*ZK_Y2DLjBe5HQ6FH" /><figcaption>From — WealthMorning dot com</figcaption></figure><p>Graham talks about the things that an aggressive investor should not do-</p><ul><li>Never buy junkyard bonds. Junkyard bonds are those bonds which are high yield, but second grade and poor in terms of safety. You might not be able to recover the principal in most cases if invested in high yield junkyard bonds.</li><li>Foreign bonds might seem attractive. But these might help only if your country’s stocks are not performing well. You can allocate minimum percentage of your portfolio to foreign bonds if you want. Remember you should not go beyond 10%.</li><li>Never trade, learn to invest. Traders lose money most of the time. Intraday trading is expensive and risk is so high that it can eat up all your bank balance in seconds. Learn about brokerage charges and taxation on Intraday before investing. In long term, a trader rarely wins. Only a few traders are able to generate consistent income from speculative trading as far as I know, but I don’t even have proof for this, because I can’t see their bank balance. 😐</li><li>IPO sucks. First thing about IPO is that they are sold during market peak, where most people are crazy to buy anything. Once market falls, who will guarantee that stock whose IPO you just purchased will not fall as well ❓</li></ul><p>This is it for this post and I hope my articles will help you improve your investing skills.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=671cc01ed4db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[StocksShit — The Intelligent Investor — Part-1]]></title>
            <link>https://pritishthakkar.medium.com/stocksshit-the-intelligent-investor-part-1-8953b3f22a6a?source=rss-502c05e4f21------2</link>
            <guid isPermaLink="false">https://medium.com/p/8953b3f22a6a</guid>
            <category><![CDATA[investment]]></category>
            <category><![CDATA[warren-buffett]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[finance]]></category>
            <dc:creator><![CDATA[Pritish Thakkar]]></dc:creator>
            <pubDate>Fri, 11 Dec 2020 08:24:29 GMT</pubDate>
            <atom:updated>2020-12-17T05:42:58.845Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Intelligent Investor — Part-1</h3><p><strong>Benjamin Graham</strong>, whose investment principles are followed by Warren Buffet till date, wrote an excellent book on investing ‘The Intelligent Investor’.</p><p>So, in this article I am going to share the chapter-wise summary of the book.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/0*264yTaqY-mI74TGx" /><figcaption>From Google Images</figcaption></figure><h3>Chapter — 1: Investment vs speculation</h3><p>Author explains the difference between investment vs speculation in this chapter. He also talked about the defensive investor vs aggressive investor. He also suggests to keep a certain amount of money(~10%) for speculation if you want to. Otherwise you might have to face huge losses.</p><p>A very good example I found in this book. If you put Rs. 100 in stock market aiming a 15% profit, and unfortunately you loose Rs. 95 during a period of 3 months. Then 15% profit which you aimed earlier will now be achieved only if you get 110% on Rs. 5 which is very very difficult. So, author wants to teach that don’t loose your money.</p><p>Warren Buffet two rules of investing —</p><ol><li>Never loose your money.</li><li>Never forget Rule number 1.</li></ol><p>According to Graham, investing consists of three elements —</p><ol><li>Thorough analysis of the company before investing.</li><li>You must deliberately protect yourself from serious losses.</li><li>You must to aspire to adequate, not extraordinary performance.</li></ol><h3>Chapter — 2: The Investor and Inflation</h3><p>Various metrics of inflation are presented in this chapter. According to Graham and calculations shown in the book, best way to beat inflation is to invest in stock market.</p><p>In banks, your money will surely loose value over time. I really like a quote in the commentary of chapter 2.</p><blockquote>Americans are getting stronger. Twenty years ago, it took two people to carry ten dollars worth of groceries. Today a five year old can do it.</blockquote><p>Other alternative to beat inflation are Real estate, government bonds, gold etc. But based on your goals and aspirations you can set the proportions accordingly. Now based on your age you can also decide the proportions. I heard this advice multiple times —</p><blockquote>If you are in your very early stage like 20s or 30s, you should invest more in stocks rather than bonds or any other investment item and vice versa.</blockquote><h3>Chapter — 3: A century of stock-Market History</h3><p>In this chapter, Graham talked about the stock price fluctuations in period 1890–1972.</p><p>What I get from this chapter is that it is difficult/impossible to predict the market with 100% confidence. Nobody knows how market will behave in coming years. Please don’t trust finance gurus who claim that market will go up by 30% or more. Even if you are predicting the market and guiding some one about it, please be modest while making claims. People who are highly confident are generally beaten by market.</p><p>He also talked about an indicator to identify if the market is overvalued or undervalued. The indicator is <strong>P/E ratio</strong>. Generally, if it is <strong>&gt; 20 for some stock or index, then it is considered to be overvalued</strong> and one should not prefer to buy at this time. <strong>If it is &lt; 10, one can consider it as a buying opportunity</strong>. But, please don’t consider only PE ratio to be your investing strategy. I believe that we will get more insights from this book about buying good stocks at right time.</p><p><strong>Extra Insights —</strong> November-December 2020, stock prices are very high as most of the stocks recovered from pandemic very soon and PE ratio looks high to me. So, I don’t consider 2020 year end as a buying opportunity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5sdjiQYBxDStNGRZ6OwjLg.png" /><figcaption>From — <a href="https://nifty-pe-ratio.com/">https://nifty-pe-ratio.com/</a></figcaption></figure><p>New notes coming up! Subscribe and learn. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8953b3f22a6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[StocksShit — Risks in stock market]]></title>
            <link>https://pritishthakkar.medium.com/stocksshit-risks-in-stock-market-e1a869dd3685?source=rss-502c05e4f21------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1a869dd3685</guid>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[stocks]]></category>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[money]]></category>
            <dc:creator><![CDATA[Pritish Thakkar]]></dc:creator>
            <pubDate>Wed, 11 Nov 2020 11:51:33 GMT</pubDate>
            <atom:updated>2020-11-11T15:36:46.120Z</atom:updated>
            <content:encoded><![CDATA[<h3>StocksShit — Risks in stock market</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/0*-z4AJ0cwQIcEO53h.jpg" /><figcaption>From The active times — Google Images</figcaption></figure><p>Investing in Stock market is a bit risky. But with more risk, comes the more interest/profit. <strong>But what else is not risky? </strong>Are you sure your bank will never run away after you deposit all your life savings in it?</p><blockquote>Arre bhai! Bank apne hi ghar ka thodi hai, jo bhaagega nahi! Kabhi bhi 9–2–11 ho jaenga…</blockquote><p>It is just a matter of comparison of two different investments. So, in this story I will cover the type of risks when you invest in stock market.</p><h3>Unsystematic Risk</h3><p>Lets say you invest in company A, and company A is planning some illegal/bad/shit things. Somehow this information is leaked by some insider of the company. News channels will start beating drums around as soon as they hear about company A and its wrongdoings.</p><p>What do you think will happen?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*l9L5b8mP1ZDobeqD" /><figcaption>From Yahoo sport — Google images</figcaption></figure><p>Stocks will fall steeply. But the thing is<strong> stock price of only company A will fall </strong>and not of other companies because they are not doing any illegal shit or the illegal shit might not be in news yet for other companies.</p><p>So, The risk of losing money owing to company specific reasons (or internal reasons) is often termed as “<strong>Unsystematic Risk</strong>”.</p><h4>The way out</h4><p>The only way out is <strong>Diversification</strong>. Why to invest in just one stock? There are more than 5000 companies in Indian stock market and you can easily find some other good investment opportunities as well.</p><blockquote>Why to fu*king stick at just one stock?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_1maBx-kFcD3iDbp.jpg" /><figcaption>From Investopedia — Google Images</figcaption></figure><p>Investing your 1L in just one company and losing all amount in one go is painful. It is perfectly okay to risk some minor percent of your money in stock A, some in stock B and some in stock C…</p><p>A well diversified portfolio can contain max of about 20–21 stocks. If you try to diversify beyond 21. It will not make any impact further.</p><p><strong>So, the way out is to invest in more than one stock and less than 21 stocks which hold value as per your study. This will reduce your unsystematic risk to a great extent.</strong></p><h3>Systematic Risk</h3><p>Covid-19 is a great example of systematic risk. It brings down the stock prices of all the companies in early 2020.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5SGFc3Ka5WTmzYTU.jpg" /><figcaption>From FDA — Google Images</figcaption></figure><p><strong>Risk due to change in govt. policies, inflation rate, interest rates, GDP de-growth etc. which impact all the companies in one way or the other is termed as Systematic risk.</strong></p><h4>The way out</h4><p>The way out of this shit is to do Hedging when something like this happens in the market.</p><p>I also don’t know exactly about hedging but I have a little idea. Lets say you invested in some stocks earlier because of your bullish market view. But now new govt. policies were launched and you don’t know how market will behave. <strong>What should you do?</strong></p><p>Obviously, Hedging is the savior here. <strong>Take opposite trade.</strong> You were bullish earlier. That’s why you invested in first place. Now, You don’t want to take out your investments as well because you are unaware about market behavior. Taking a bearish trade or short selling will help you avoid losses.</p><p>If market goes up, your bullish/older/earlier investments will boom, but your new/hedged/bearish investment will go down by same amount. X-X=0</p><p>No profits but no losses as well. AFAIK, Futures and Options are mainly use to hedge your investments.</p><p>Full credit goes to Varsity Zerodha for this story as I’ve gained this knowledge about risks from their blogs only. I would suggest you to read Varsity articles and improve your investment skills. Read mine articles too as they are funny as well. uhh sometimes 😉</p><p>More useful stuff coming in StocksShits series.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1a869dd3685" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[StocksShit — Part-2]]></title>
            <link>https://pritishthakkar.medium.com/stocksshit-part-2-cfb335001017?source=rss-502c05e4f21------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfb335001017</guid>
            <category><![CDATA[money]]></category>
            <category><![CDATA[mutual-funds]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[stocks]]></category>
            <category><![CDATA[investing]]></category>
            <dc:creator><![CDATA[Pritish Thakkar]]></dc:creator>
            <pubDate>Sat, 07 Nov 2020 10:13:07 GMT</pubDate>
            <atom:updated>2020-11-11T11:54:42.066Z</atom:updated>
            <content:encoded><![CDATA[<h3>StocksShit — Mutual Funds</h3><p>Same day! Writing my second article. Huh! Let’s have some fun.</p><h3>Mutual funds — Starting point</h3><blockquote>Bhai sahi hai yeh fund, paisa laga de, double ho jaega!</blockquote><p>Heard advice like this before. Trust me! never believe anyone who is giving you expert advice on investing your money. Keep a hand on your heart and think for a moment about this question. “<strong>Do you really want some of your friend or classmate or colleague to achieve success/money/fame/happiness/shit before you achieve?</strong>”. Mind is very competitive now-a-days. People are more happy now-a-days whenever other is sad or looses lot of money/fame/shit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cIA1N3DFKqf6u2Mg.jpg" /><figcaption>From The economic times — Google images</figcaption></figure><p>Nevermind, lets understand mutual funds so that you can invest better.</p><p>In mutual funds, a company(<em>AMC — Asset management company</em>) takes money from a lot of people and hire a few intelligent people(<em>intelligent in investment related decisions</em>) to invest that money in stock market/bonds/shit in order to achieve profits. The profits earned are then given back to the people who gave their money initially to AMC.</p><p>You know nothing about stocks and you are afraid to invest in stock market yourself. So, <strong>Do you think AMC will invest your money and give you 10–12% interest for free?</strong></p><p>No, they don’t. Let’s say you earn 12% interest in 5 years on your investment. Then AMC will take 1% of that amount and give you 11% interest back along with the invested amount.</p><p>With that 1–2% cut from a lot of people, the AMC manages its operations and salary of the intelligent people hired to invest your money. By the way, those intelligent people are called <strong><em>Fund managers.</em></strong></p><h3>Benefits of mutual funds</h3><ul><li><strong>Diversification</strong> is the major benefit. Fund managers invest your money in different companies in different sectors. So, if lets say <strong>Pharma </strong>sector falls, then you won’t get huge losses, because your money is diversified in other sectors as well, one of which might be dancing on the top of the market.</li><li>You don’t have to apply your brain while deciding which stock to invest in. Fund managers are taking 1% from you for taking care of this shit.</li><li>Easy to invest in mutual funds now-a-days. In India, there are many apps which let you invest in mutual funds in just one click. Download any app and start investing. Paytm Money, Groww, ET Money, Coin by Zerodha, Kuvera, etc.</li><li>Interest is higher than bank FDs and saving account.</li><li>Tax saver funds are also there, where you can save some tax. We call them ELSS funds. ELSS stands for <em>Equity linked tax saving schemes. </em>These funds have a lock-in period of 3 years and you can save some tax in a FY by showing your investments in ELSS.</li></ul><h3>Which mutual fund to pick?</h3><p>There are thousands of mutual funds and various categories of mutual funds like -</p><ul><li>Large cap funds</li><li>Small cap funds</li><li>Multi cap funds</li><li>Mid cap funds</li><li>Other shitty funds…</li></ul><p>Copy-pasting an image for formality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/0*bb_8nqY2QRUtFuUb.PNG" /><figcaption><a href="http://www.svtuition.org/2010/06/types-of-mutual-funds-schemes.html">http://www.svtuition.org/2010/06/types-of-mutual-funds-schemes.html</a></figcaption></figure><p>But you want to invest in best mutual funds which can give you best returns. Right? You should compare two funds of same category by considering the following points.</p><h4>Mutual fund Portfolio</h4><p>Mutual funds take your money and invest in different-different stocks. <strong>But X mutual fund is different from Y mutual fund in the sense that they invest in different stocks with different proportions.</strong> So, if <strong>X</strong> invests 10% of its money in Reliance shares, then <strong>Y </strong>might have 7% of Reliance shares in its portfolio. This information is public and you can easily find on internet.</p><p>So, If you want your money to be invested in some specific company/sector in greater proportion, then you can chose your fund by checking their portfolio.</p><p>If you know nothing about stock market and companies, then just throw this point out of your mind.</p><h4>Large/Mid/Small/Multi cap</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/0*IOL6eqfymDAnMnsv.png" /><figcaption>From trade brains — Google images</figcaption></figure><p>Large cap funds invest their money in companies with high market capitalization. So, if a fund invest 80%(<em>just assume</em>) of their money in top 100 companies of India which have high market cap, then it is a Large cap fund. Similarly, other funds are categorized on the basis of market cap.</p><p>Large caps are less risky as compared to mid cap and mid cap are less risky as compared to small cap. So, start your investment journey by investing in large cap. They are less risky because large cap funds invest money in stable stocks which are not volatile and give good returns in long period.</p><p>Remember one thing — More the risk, more the profits/loss and vice versa.</p><p>Being a beginner check top large cap funds and slowly move to other funds like small cap or multi cap funds once you are comfortable and gained knowledge about stock market.</p><h4>Comparing funds in same category</h4><ul><li>Check the experience of the fund managers.</li><li><strong>Expense ratio should be less</strong>. This is what AMC will charge from you when you want to withdraw.</li><li><strong>Exit load</strong> must be checked. Exit load is the extra charges you have to pay if you want to withdraw before some particular time. Let’s say you have to pay 1% exit load if you withdraw before 1 year. This information is also public and can be easily found on internet.</li><li>Scheme size is the amount of money handled in the name of some mutual fund by a fund manager. Generally speaking, if it is greater than 5000 crores, then that mutual fund is not considered profitable in long run. But don’t take this point too seriously.</li><li>Rating by various agencies can be checked like Morning star, Crisil etc. Mutual fund apps will provide you these ratings and give you a sorted list of mutual funds you might be interested in.</li></ul><h3>SIP vs Lumpsum</h3><p><strong>S</strong>ystematic <strong>I</strong>nvestment <strong>P</strong>lan is nothing but investing a fixed amount of money in a mutual fund every month. Lumpsum is investing a whole lot of your money at one time.</p><p>If you have 12K INR to invest, then in SIP, you might want to invest 1K INR every month. In Lumpsum, you invest 12K INR at the same time.</p><p>Benefits of SIP is that it is less risky but interest is also slightly less. But it can help you develop habit of investing regularly.</p><h3>Period of investment</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sV2RjrUYJIEIOfMW.jpg" /><figcaption>From IONOS — Google images</figcaption></figure><p>Clearly, I’m not the right person to tell you this. But I can give you some advice based on my experience/learning.</p><p>Have extra money, comfortable with stock market and not gonna need that money in coming months, prefer lumpsum and stay invested for long duration.</p><p>You are not comfortable with stock market or you have less money, start a SIP of 1K to 5K and stay invested for longer period.</p><p>Common thing in my suggestions is long duration because impact of compounding can be felt when duration is long.</p><p>I hope this mutual fund story helped you gain some confidence in investing. Do give some claps if you like the story.</p><p>See you in next StocksShit. Bye!!</p><p>Next StocksShit is about <a href="https://pritishthakkar.medium.com/stocksshit-risks-in-stock-market-e1a869dd3685">type of risks in stock market and how you can avoid them</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfb335001017" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>