Skip to main content

Posts

Stock Risk Analysis App in Python

In this article, I’ll explain about how we can perform risk analysis for certain publicly listed stocks. To perform this, we will look at the data of certain time frames and will try to analyze which stock is riskier than the other one based on the price deviation and the average price. Throughout this exercise, I’ll be using Python as a programming language. Required Packages Here is the list of packages we need to be installed before proceeding: pandas numpy yfinance matplotlib Once packages are installed, we are good to go. Importing Libraries import pandas as pd import numpy as np import yfinance as yf import matplotlib . pyplot as pyplot Select Stocks and Duration Next, we need to select the list of stocks we want to analyze and the duration. Here, I’m going with Microsoft and Tesla stocks, and the duration I’m selecting is from 2018–01–01 to 2022–02–01. stocks = yf . download ( [ ‘MSFT’ , ’TSLA’ ] , start = ” 2018 – 01 – 01 ", end=”2022–02–01&quo

Top Visual Studio Code Extensions

How fast anyone can code, depends on many factors. But I feel the most important among all of those is the IDE, Integrated Development Environment. More friendly the development IDE is, more help a developer will get in terms of intellisense, syntax, re-factoring, etc.  IDEs are of various types as few are fully loaded with all the required features, tools and plugins whereas few requires user’s attention. No, when it comes to user’s choice, it again varies by which development language he or she is going to use. In this article, I’m going to write about VS Code, which is Visual Studio Code and is one of my favorite IDEs.  VS Code is not pre-loaded with all the features as it supports lot many languages. So, it’s on user to install the required extensions based on project and development language’s need. How to install an extension Here is the screenshot mentioning how to install an extension: Let’s talk about few of the very useful extensions: vscode-icons While working on hug

Plot and Compare the Stock Price Trend

Introduction Nowadays, whoever is dealing with finance data, specifically with stock market needs very good understanding of data. Obviously, understanding of data completely depends on how the data is displayed or shown to someone. When we are putting money in the stock market, it is always advisable to first understand the pattern or behavior of the stock which you are going to buy or sell.  In this article, I'm neither going to cover the internals of finance nor am I going to discuss about what all parameters one needs to analyze or understand. The idea behind this article is, how one can use certain financial parameters to get the gist of market trend. Getting Started Let's consider a scenario, in which you would like to know, what is the opening price of Microsoft stock in the last few weeks. So that, by looking at the price, you can derive some conclusions. To perform this entire exercise, we need a few things: Stock symbol : In our case, it is MSFT. Prog