<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Shyam BV</title>
        <link>https://paragraph.com/@shyam-bv</link>
        <description>undefined</description>
        <lastBuildDate>Wed, 03 Jun 2026 05:34:40 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>Shyam BV</title>
            <url>https://storage.googleapis.com/papyrus_images/7c5e6d3832ea16773c042541df505c7c5a79e5f25d663baa3ae7b27be719bb2a.jpg</url>
            <link>https://paragraph.com/@shyam-bv</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[A Data Scientist view on stocks - Nerd For Tech - Medium]]></title>
            <link>https://paragraph.com/@shyam-bv/a-data-scientist-view-on-stocks-nerd-for-tech-medium</link>
            <guid>RpzErcy0oR9xm5q1RIKf</guid>
            <pubDate>Wed, 20 Oct 2021 10:35:11 GMT</pubDate>
            <description><![CDATA[A Data Scientist view on stocksIntroductionIrrespective of any field, Data scientists(DS) love data(Don’t we?). DS also loves connecting different data endpoints and seeing if it makes sense. In this article, I will connect other data points on stocks, perform a detailed analysis, and create charts to understand better. Note: Goto for non-technical users, just go to the summary sectionComplete workflow — Source from authorWhy another analysis?Why do we need it? Data about stocks are so much a...]]></description>
            <content:encoded><![CDATA[<h3 id="h-a-data-scientist-view-on-stocks" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">A Data Scientist view on stocks</h3><h3 id="h-introduction" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Introduction</h3><p>Irrespective of any field, Data scientists(DS) love data(Don’t we?). DS also loves connecting different data endpoints and seeing if it makes sense. In this article, I will connect other data points on stocks, perform a detailed analysis, and create charts to understand better.</p><p><strong>Note: Goto for non-technical users, just go to the summary section</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6ad896be38ef3d1945ab7ebc5cf67ad40bbb01223dd445f4bbbd84094c9bad3a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Complete workflow — Source from author</p><h3 id="h-why-another-analysis" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Why another analysis?</h3><p>Why do we need it? Data about stocks are so much abundant. Each data source covers different angles of a stock. There is a lot of activity happening on the stock market every single day, hour, minute.</p><p>So what if we group all the data and use it for our analysis? What insights will it provide is what we are going to cover in this article.</p><h3 id="h-sourcing-data" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Sourcing data</h3><p>To get all this data, we need to connect individual APIs of all the services. Some data sources might need a key with an account. Some require you to create an app and perform an OAuth connection. Sourcing data is an article of its own. I will talk about it in another article.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/db61ff24ce98e76aff4f489a60644db1718ba4bad829b0d58ace7fb81458fe40.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-data-loading-and-cleanup" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Data loading and cleanup</h3><p>We need to load all the data, load it in data frames and clean up the data. Once we clean up the data, we can perform various analyses.</p><p>As a first step, we need to load the data into data frames. We can parse through individual CSV files and write code. Below is another way to load the data.</p><p>We can loop through all the files and execute the code to create data frames.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/86efd74647ae8f9ee0ac923017472a254e0ff9531aeccbefc581dcec7e209f9d.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Now we should have all the CSV data loaded into the data frames. Now, we need to parse and clean the data. The below function will clean up the data column name and put the columns in front.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/01c0dc6e5ad965a7ea86fb17c6567ab89248eb57f55f69a8b10b0bc0495e337e.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-analysis" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Analysis</h3><h4 id="h-positive-stocks" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Positive stocks</h4><p>Now, we have a lot of data for our analysis. As a first step, let us find the common stocks across different positive data frames. You might think, what is positive? Positive comments, sentiments, insider buys, etc.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/644f1684733cb132deaff3b0bc8586c90aab51a30b2f373e19bf0cc6e7aa82ce.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Now, we have all the positive stocks data frames. We will merge all these data frames and see if it makes sense.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5f732fa20ca0610704aea2f7e2007a36a24b5920dea5b8d6fe86439d8fef08e5.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Unfortunately, there is not a single stock which is common in all the areas. Now let us try in a different way, by combining different data frames using itertools.</p><p>Code for combining combinations of the data frame</p><blockquote><p>If we combine yahoo finance active stocks and stockwits sentiment, we are getting back a list of stocks which may pop on that day or on previous day. It turned out to be true that, most the stocks poped. You can check the stats of the stocks around the dates of this article.</p></blockquote><h4 id="h-negative-stocks" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Negative stocks</h4><p>If we go over the same process for negative stocks, we will get a list of common stocks. Below is the screenshot of the output.</p><p>Humans are not good at reading table data. Are we? We can easily consume visualizations. So now let us plot some charts. For this article, I am going to use Altair for the visualizations.</p><pre data-type="codeBlock" text="pip install altair
"><code></code></pre><h3 id="h-sentiment" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Sentiment</h3><p>If we plot just the StockTwits sentiment, we will get a chart like the below one. We can see AMD is clearly one of the stocks which are on the watchlist of StockTwits.</p><h3 id="h-stocks-on-yahoo-finance" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Stocks on Yahoo Finance</h3><p>We will combine the active large caps and small caps for yahoo finance and create a combined chart.</p><h3 id="h-ark-funds" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Ark Funds</h3><p>I am a big fan of ark funds. Why not plot them as well?</p><h3 id="h-summary-of-charts" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Summary of charts</h3><p>Likewise, we can plot all the other plots individually. Finally, we can combine all the plots and get a dashboard of all the charts.</p><blockquote><p>Some charts are not plotted, such as IPO stocks, common positive and negative stocks. Those can be included as well.</p></blockquote><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/25d66882027757db60c66e98c6a2bc50b125ac1a841ae6c9f00f5cbe0a277017.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-summary" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Summary</h3><p>It was an interesting analysis to combine different data sources of stocks and merge and find the golden ones for the day. We can also add more data sources to it and create more insights into the stock. To add</p><blockquote><p>To receive an email on daily basis about stocks check-out here: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://shyambv.gumroad.com/l/portfoliobytes"><strong>shyambv.gumroad.com/l/portfoliobytes</strong></a></p></blockquote><h3 id="h-get-code" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Get Code</h3><p><em>Please subscribe to my </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://codesprout.substack.com/welcome"><strong><em>newsletter</em></strong></a><em> to get the </em><strong><em>complete working code</em></strong><em> for my articles and other updates.</em></p>]]></content:encoded>
            <author>shyam-bv@newsletter.paragraph.com (Shyam BV)</author>
        </item>
    </channel>
</rss>