{"id":3794,"date":"2025-08-19T15:32:20","date_gmt":"2025-08-19T10:02:20","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=3794"},"modified":"2025-08-19T15:32:20","modified_gmt":"2025-08-19T10:02:20","slug":"stock-analysis-with-wolfram-mathematica-part-2","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/19\/stock-analysis-with-wolfram-mathematica-part-2\/","title":{"rendered":"Stock Analysis with Wolfram Mathematica &#8211; Part 2"},"content":{"rendered":"<p>In the previous <a href=\"https:\/\/www.rangakrish.com\" target=\"_blank\" rel=\"noopener\"><em><strong>article<\/strong><\/em><\/a>, I had explained how to get started using <a href=\"https:\/\/www.wolfram.com\/mathematica\/?source=nav\" target=\"_blank\" rel=\"noopener\"><em><strong>Wolfram Mathematica<\/strong><\/em><\/a>\u2019s stock analysis features. The focus was on working with the exchanges supported by Mathematica, for example BSE India.<\/p>\n<p>What if we have stock data from a different source and want to analyze it in Mathematica? In my case, I use <a href=\"http:\/\/tradingview.com\" target=\"_blank\" rel=\"noopener\"><em><strong>TradingView<\/strong><\/em><\/a>\u00a0platform and there is an option to download the data in CSV format. Besides, I use <em><strong>NSE<\/strong><\/em> instead of <em><strong>BSE<\/strong><\/em>. In this article, I will show how to use the data from <em><strong>TradingView<\/strong><\/em>.<\/p>\n<p>For our discussion, I have downloaded <em><strong>HDFC Life Insurance Co (HDFCLIFE)<\/strong><\/em> data of a couple of years from <em><strong>TradingView<\/strong><\/em> in CSV format. This contains <em><strong>Open-High-Low-Close-Volume (OHLCV)<\/strong> <\/em>data. The Time is saved in <em><strong>Unix<\/strong><\/em> format.<\/p>\n<p>Here is a function that reads this file and prepares the data for subsequent steps:<\/p>\n<figure id=\"attachment_3795\" aria-describedby=\"caption-attachment-3795\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn.png?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"3795\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/19\/stock-analysis-with-wolfram-mathematica-part-2\/processdata-fn\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn.png\" data-orig-size=\"1934,958\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Loading the CSV Data\" data-image-description=\"&lt;p&gt;Loading the CSV Data&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Loading the CSV Data&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn-1024x507.png\" class=\"wp-image-3795\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn.png?resize=550%2C272&#038;ssl=1\" alt=\"Loading the CSV Data\" width=\"550\" height=\"272\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn.png?resize=300%2C149&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn.png?resize=1024%2C507&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn.png?resize=768%2C380&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn.png?resize=1536%2C761&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/processdata-fn.png?w=1934&amp;ssl=1 1934w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3795\" class=\"wp-caption-text\"><strong>Function to Load CSV File<\/strong><\/figcaption><\/figure>\n<p>Let us load our <em><strong>HDFCLIFE<\/strong><\/em> data using this function.<\/p>\n<figure id=\"attachment_3796\" aria-describedby=\"caption-attachment-3796\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"3796\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/19\/stock-analysis-with-wolfram-mathematica-part-2\/loading-2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading.png\" data-orig-size=\"1616,418\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Loading the Data\" data-image-description=\"&lt;p&gt;Loading the Data&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Loading the Data&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading-1024x265.png\" class=\"wp-image-3796\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading.png?resize=500%2C129&#038;ssl=1\" alt=\"Loading the Data\" width=\"500\" height=\"129\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading.png?resize=300%2C78&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading.png?resize=1024%2C265&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading.png?resize=768%2C199&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading.png?resize=1536%2C397&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/loading.png?w=1616&amp;ssl=1 1616w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3796\" class=\"wp-caption-text\"><strong>Loading the Data<\/strong><\/figcaption><\/figure>\n<p>We see that we have slightly over 2 years of data in the file.<\/p>\n<p>Next, we need to convert this data to the format that is compatible with <em><strong>TradingChart[]<\/strong><\/em> function. The following two functions do the job. For convenience, one returns just the <em><strong>OHLC<\/strong><\/em> data, while the other returns <em><strong>Volume<\/strong><\/em> as well.<\/p>\n<figure id=\"attachment_3797\" aria-describedby=\"caption-attachment-3797\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"3797\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/19\/stock-analysis-with-wolfram-mathematica-part-2\/convertfn\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn.png\" data-orig-size=\"1624,762\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Coverting the Data To Proper Format\" data-image-description=\"&lt;p&gt;Coverting the Data To Proper Format&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Coverting the Data To Proper Format&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn-1024x480.png\" class=\"wp-image-3797\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn.png?resize=500%2C235&#038;ssl=1\" alt=\"Coverting the Data To Proper Format\" width=\"500\" height=\"235\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn.png?resize=300%2C141&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn.png?resize=1024%2C480&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn.png?resize=768%2C360&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn.png?resize=1536%2C721&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/convertfn.png?w=1624&amp;ssl=1 1624w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3797\" class=\"wp-caption-text\"><strong>Converting the Data To Proper Format<\/strong><\/figcaption><\/figure>\n<p>We are now ready to use the <em><strong>TradingChart[] <\/strong><\/em>function:<\/p>\n<figure id=\"attachment_3798\" aria-describedby=\"caption-attachment-3798\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3798\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/19\/stock-analysis-with-wolfram-mathematica-part-2\/chart1\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1.png\" data-orig-size=\"1630,872\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Rendering the Chart\" data-image-description=\"&lt;p&gt;Rendering the Chart&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Rendering the Chart&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1-1024x548.png\" class=\"wp-image-3798\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1.png?resize=550%2C294&#038;ssl=1\" alt=\"Rendering the Chart\" width=\"550\" height=\"294\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1.png?resize=300%2C160&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1.png?resize=1024%2C548&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1.png?resize=768%2C411&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1.png?resize=1536%2C822&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart1.png?w=1630&amp;ssl=1 1630w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3798\" class=\"wp-caption-text\"><strong>Rendering the Chart<\/strong><\/figcaption><\/figure>\n<p>How about adding BollingerBands to the chart? Quite easy.<\/p>\n<figure id=\"attachment_3799\" aria-describedby=\"caption-attachment-3799\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3799\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/19\/stock-analysis-with-wolfram-mathematica-part-2\/chart2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2.png\" data-orig-size=\"1632,1086\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Adding Bollinger Bands\" data-image-description=\"&lt;p&gt;Adding Bollinger Bands&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Adding Bollinger Bands&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2-1024x681.png\" class=\"wp-image-3799\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2.png?resize=550%2C366&#038;ssl=1\" alt=\"Adding Bollinger Bands\" width=\"550\" height=\"366\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2.png?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2.png?resize=1024%2C681&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2.png?resize=768%2C511&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2.png?resize=1536%2C1022&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/chart2.png?w=1632&amp;ssl=1 1632w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3799\" class=\"wp-caption-text\"><strong>Adding Bollinger Bands<\/strong><\/figcaption><\/figure>\n<p>For convenience, let us write a wrapper function that loads the data and also displays it:<\/p>\n<figure id=\"attachment_3800\" aria-describedby=\"caption-attachment-3800\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3800\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/19\/stock-analysis-with-wolfram-mathematica-part-2\/function2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2.png\" data-orig-size=\"1622,186\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Wrapper Function\" data-image-description=\"&lt;p&gt;Wrapper Function&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Wrapper Function&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2-1024x117.png\" class=\"wp-image-3800\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2.png?resize=500%2C57&#038;ssl=1\" alt=\"Wrapper Function\" width=\"500\" height=\"57\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2.png?resize=300%2C34&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2.png?resize=1024%2C117&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2.png?resize=768%2C88&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2.png?resize=1536%2C176&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/Function2.png?w=1622&amp;ssl=1 1622w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3800\" class=\"wp-caption-text\"><strong>Wrapper Function<\/strong><\/figcaption><\/figure>\n<p>Here is how we can use it:<\/p>\n<figure id=\"attachment_3801\" aria-describedby=\"caption-attachment-3801\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3801\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/19\/stock-analysis-with-wolfram-mathematica-part-2\/using-function2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2.png\" data-orig-size=\"1628,1238\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Using the Wrapper Function\" data-image-description=\"&lt;p&gt;Using the Wrapper Function&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Using the Wrapper Function&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2-1024x779.png\" class=\"wp-image-3801\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2.png?resize=550%2C418&#038;ssl=1\" alt=\"Using the Wrapper Function\" width=\"550\" height=\"418\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2.png?resize=300%2C228&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2.png?resize=1024%2C779&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2.png?resize=768%2C584&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2.png?resize=1536%2C1168&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/using-function2.png?w=1628&amp;ssl=1 1628w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3801\" class=\"wp-caption-text\"><strong>Using the Wrapper Function<\/strong><\/figcaption><\/figure>\n<p>Makes sense, right?<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>Working with our own data set is a major advantage. Instead of merely rendering the chart, we can optionally take advantage of the advanced numerical and predictive capabilities built into Mathematica.<\/p>\n<p>You can download the CSV data and the source file <a href=\"https:\/\/www.rangakrish.com\/downloads\/StockAnalysis-2.zip\" target=\"_blank\" rel=\"noopener\"><em><strong>here<\/strong><\/em><\/a>.<\/p>\n<p>Have a great week!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous article, I had explained how to get started using Wolfram Mathematica\u2019s stock analysis features. The focus was on working with the exchanges supported by Mathematica, for example BSE India. What if we have stock data from a different source and want to analyze it in Mathematica? In my case, I use TradingView\u00a0platform [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[72,17],"tags":[434,430],"class_list":["post-3794","post","type-post","status-publish","format-standard","hentry","category-mathematica","category-programming","tag-stock-market-analysis","tag-tradingview"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-Zc","jetpack-related-posts":[{"id":3774,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/04\/stock-analysis-using-wolfram-mathematica\/","url_meta":{"origin":3794,"position":0},"title":"Stock Analysis Using Wolfram Mathematica","author":"admin","date":"August 4, 2025","format":false,"excerpt":"I have my own toolkit for analyzing stocks, but occasionally I use Mathematica as well. Given Mathematica\u2019s extensive support for numerical computation including Machine Learning, it can be a valuable resource for deep analysis of the stock market. In today\u2019s article, let me give an overview of some of the\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Supported Exchanges","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/exchanges-300x28.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/exchanges-300x28.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/exchanges-300x28.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3752,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/07\/15\/using-tradingview-pine-script-screener\/","url_meta":{"origin":3794,"position":1},"title":"Using TradingView Pine Script Screener","author":"admin","date":"July 15, 2025","format":false,"excerpt":"TradingView is a hugely popular stock charting platform. It comes bundled with hundreds of technical indicators and many are contributed by the community. I use it regularly for my stock analysis. In addition to charting, TradingView also has a Screener that allows us to filter stocks based on our custom\u2026","rel":"","context":"In &quot;TradingView&quot;","block_context":{"text":"TradingView","link":"https:\/\/www.rangakrish.com\/index.php\/category\/tradingview\/"},"img":{"alt_text":"Standard Screener","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/07\/Basic-Screener-300x172.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/07\/Basic-Screener-300x172.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/07\/Basic-Screener-300x172.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3830,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/10\/31\/analysing-weather-data-using-wolfram-mathematica\/","url_meta":{"origin":3794,"position":2},"title":"Analysing Weather Data Using Wolfram Mathematica","author":"admin","date":"October 31, 2025","format":false,"excerpt":"If you are interested in analysing weather data and making predictions such as rainfall, storm, etc., then Mathematica has nice functionality that you can use. In this article, let me cover a few basic functions in this category. Let us start by getting the coordinates of the place for which\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Getting Location Coordinates","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/10\/coord-300x50.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3545,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/11\/09\/semantic-search-in-wolfram-mathematica\/","url_meta":{"origin":3794,"position":3},"title":"Semantic Search in Wolfram Mathematica","author":"admin","date":"November 9, 2024","format":false,"excerpt":"In an earlier article, I explained how to use OpenAI from Wolfram Mathematica ver 14.1. This latest release of Wolfram supports Semantic Search as well. In today\u2019s article, let me discuss this feature. As in the case of using LLMs, using Semantic Search requires an account with one of the\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Remedy Description","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/11\/image1-300x225.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/11\/image1-300x225.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/11\/image1-300x225.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4285,"url":"https:\/\/www.rangakrish.com\/index.php\/2026\/04\/22\/exploring-astronomy-with-wolfram-mathematica\/","url_meta":{"origin":3794,"position":4},"title":"Exploring Astronomy with Wolfram Mathematica","author":"admin","date":"April 22, 2026","format":false,"excerpt":"As a student of astrology and who has written software for Krishnamurti Padhdhati (KP) System, I am fascinated by astronomy. We all know that there is a deep computational\u00a0connection between astronomy and astrology. Every astrological system \u2014 Western tropical, Vedic sidereal, KP, Jaimini, Chinese \u2014 is ultimately dependent on an\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Planetary Positions","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":409,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/11\/02\/working-with-linguistic-data-in-mathematica\/","url_meta":{"origin":3794,"position":5},"title":"Working with Linguistic Data in Mathematica","author":"admin","date":"November 2, 2016","format":false,"excerpt":"There are many interesting functions in Mathematica for working with language data, not just in English but in many other languages too. The DictionaryLookup[] function is a good starting point. Let us see what languages are supported as part of dictionary lookup: That is a good collection. It is nice\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Supported Languages","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/11\/dict-1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/11\/dict-1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/11\/dict-1.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=3794"}],"version-history":[{"count":2,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3794\/revisions"}],"predecessor-version":[{"id":3803,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3794\/revisions\/3803"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=3794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=3794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=3794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}