Trending March 2024 # Ib Pitchbook – Liquidity Analysis # Suggested April 2024 # Top 7 Popular

You are reading the article Ib Pitchbook – Liquidity Analysis updated in March 2024 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested April 2024 Ib Pitchbook – Liquidity Analysis

IB Pitchbook – Liquidity Analysis

Download our free Investment Banking Pitchbook Template

Written by

CFI Team

Published January 19, 2023

Updated July 7, 2023

Liquidity Analysis

An analysis of a company’s liquidity is important because it gives us insight into its capacity to pursue an M&A transaction. We need to identify trends in a company’s liquidity position, what their needs are over time, and the implications to the company’s liquidity if a transaction is to be pursued. When performing a liquidity analysis, the main points to consider are the company’s cash flow profile, capital expenditures, debt, and future funding requirements.

Download the Free Template

Enter your name and email in the form below and download the free template now!

Cash Flow Profile

The company’s ability to generate cash from operation is the main focus of liquidity analysis. As an investment banker, you must consider any significant trends or shifts in the company’s variable and fixed costs. How is the performance of the company’s margins over time? What inventory costing do they use (LIFO, FIFO, weighted average cost)? What depreciation methods do they use (straight line, declining balance)? How does their financial accounting differ from their tax accounting, and its implications on tax deferral? Are there any major gains and impairments that should be considered?

All of these questions contribute to the overall sustainability of the company’s operations and its overall capacity to pursue a transaction. How much of the transaction can be funded internally? How much additional capital must be raised? What type of capital can be raised and what is the strategic rationale for raising one form of capital over another?

Capital Expenditures

The company’s CapEx schedule is very important when pitching a transaction opportunity because it is the main opportunity cost to consider against a transaction opportunity. For example, a company can invest in its own capital that will replicate the benefit of a transaction. Furthermore, the amount of capital available to a company may already be committed to specific capital requirements, it is an investment banker’s job to calculate the requirement and frame a strategic recommendation around these existing commitments.

When we consider a company’s capital expenditures, it is important to distinguish between growth and maintenance CapEx. While it is critical for a company to continually invest in maintenance CapEx to replace any depreciation, the amount of growth CapEx could be the amount that a company might forgo to pursue a transaction. If M&A is a regular course of business (i.e. AutoCanada, Premium Brands), the growth CapEx may already be factoring in transactions on an ongoing basis.


The company’s leverage is probably the most important element to consider when pitching a transaction. If we think about accretion/dilution, due diligence lets us choose an appropriate range of stock vs cash breakdown in terms of limits on the amount of leverage a company and its creditors may be comfortable with. Furthermore, taking on too much debt to fund a transaction may cause the company to incur interest beyond what it can pay down. Also, if a company faces any major debt maturities in the near future, it may opt to conserve its dry powder in anticipation of the debt coming due.

A company may include items that behave like debt, and we must consider any operating or financial leases by the company, as well as any pension obligations the company is committed to paying out. Additionally, we must think about how much room the company has in short-term credit facilities, and the company’s capital allocation priorities before pitching a transaction.

If the target company is also leveraged, we must take into consideration the fact that the target’s enterprise value includes the value of its debt. Therefore, it is important to consider the change in a company’s leverage ratios pro forma the transaction.

Additional Resources

You're reading Ib Pitchbook – Liquidity Analysis

Technical Analysis – Beginners Guide To Technical Analysis

What is Technical Analysis

Technical Analysis is a method of analyzing securities such as stock, commodities, etc. in order to forecast the direction of pricing by studying past data such as the price and volume. It focuses on how stick prices are moving and how powerful these moves are. Technical analysis is based solely on the data generated by the market and by the actions of people in the market. Data are never revised later. Analysts do not make any guesses on the value of the data. It is based on the premise that people will act in similar ways when faced with similar conditions.

But to be more pragmatic, it is a tool used to make investment decisions. It helps assess risk and reward. And it can assist investors in allocating their resources among stocks, sectors, and asset classes.

The above picture depicts the factors upon which Technical Analysis is dependent upon.

What Technical Analysis is not?

Technical analysis is not predicting the future of an endorsement or criticism of any company. There is an element of prediction and judgment as it attempts to find the probability of future action of a company’s stock but not the company itself that is under scrutiny.

Also, this analysis does not give an absolute prediction about the price movement but helps the investors and traders anticipate what could likely happen and accordingly take an investment decision.

What is a chart?

Technical analysis has been a bit of a mistake as it’s not that technical. Though there are complex mathematical tied to it but at its core, it is the method of determining if a stock or market as a whole is going up or going down. What we need to do in order to identify these trends is simply looking at a chart. Now let’s understand charts and how they help in Technical Analysis.

A chart is a tool both investors and traders use to help them determine whether to buy or sell the stock-bond commodity or currency. As mentioned bar charts summarize all the trading for any given time period such as a day or a week when all those summaries are plotted together trends emerge and patterns form – all revealing where a stock is right now and how it got there. After all, knowing a stock is trading at a price of 50 is not of much help but knowing it was at 45 last month and 40 the month before gives us a good idea that it has been a bullish trend.

Charts are where perception meets reality. For instance, a stock may look cheap according to an analyst’s calculations based on projected future earnings, but if there were no demand for the stock it is simply not going to go up.

Some analysts look at a chart and simply draw an arrow on the actual data plot if the arrow is pointing up they know the trend is up and vice versa.

On the charts, we look at what is happening right now and how it came to be. From there we make an educated guess about the future, but the goal is not to predict where prices will be in a year. The real goal is to determine what we do about it right now. If we decide to buy based on a chart, we will already know what has to happen to prove us wrong and that helps us limit losses.

Understanding Each Part Of Chart


Price action tells us what the supply and demand equilibrium is at any given point in time..


Volume is very useful In determining whether a stock is cooling back in correction or changing direction. And another important use is is in the identification of both the final panic and initial surges as investor moods change from one extreme to another.


Momentum indicators quantify what the naked eye can tell us about the price action. Momentum In the market causes trends to stay in effect until halted by outside factors.


The way price action is used on charts in twofold; either the stock in question is moving or is not. The former creates a trend either higher or lower the latter creates resting zones and further shapes of these resting zones give us clues as to when the next trend will be up or down. It is the structure of these ups downs and flats that is analyzed.


The sentiment is the summation of all market expectations. It ranges from fear and hopelessness to indifference to greed and complacency. At the bottom of a bear market, the expectations of the participants are almost unanimous for a lower prices and more financial losses.

What are the support and resistance?


At some price level, a falling stock price will stabilize. Enough investors will perceive it to be good value and demand shares; while others will perceive the price to be too low for them to want to sell any more of their holdings.


Why use Technical Analysis?

The next logical question that comes to one’s mind is what does technical analysis do? The answer to this is that it has the ability to recognize when a stock has reached support or resistance level or a shift in perception takes place can help investors take investment decisions i.e. to use:

Buy low, sell high approach or

Buy high, sell higher approach, or

Whether to buy the stock or not

The ability to apply these aspects of the chart will reveal the market to investors when it is safe to buy a stock or not. Technical analysis is the only investment decision discipline that tells you when you are wrong to minimize losses.

Practice effective risk analysis and management. Practice effective risk analysis and management. Design and deliver creative solutions to your clients’ investment needs.

Practice effective risk analysis and management. Practice effective risk analysis and management. Design and deliver creative solutions to your clients’ investment needs.

Goals of Technical Analysis

Seeing where the stock is currently trading and figuring out how it got there

This can be done by using charting tools such as the

Stock trends

Support levels

Resistance levels

We also try to find out a pattern or a trend to help.

Determining the power of a trend

This can be determined by looking at important technical concepts such as trading volume and momentum.

Making comparisons of the stock to the market, peer companies, and itself

For this we look at the relative performances and moving averages (average prices over a defined period of time, usually 50-200 days)

Criteria for Investment using technical analysis tools

In looking for a stock, the following are the key technical analysis tools that should be met, not necessarily all bot most.

Trends and trendlines

Trends can be classified in three ways: Up, Down or Range bound. In an uptrend, a stock rallies often with intermediate periods of consolidation or movement against the trend. In a downtrend, a stock declines often with intermediate periods of consolidation or movement against the trend. In range-bound, there is no apparent direction to the price movement on the stock chart and there will be little or no rate of price change.

These trends can be measured using trendlines. All we want is stocks that are in rising trends.

Support and Resistance

This basically tells us what price levels are likely to bring put buyers or the sellers. Here we want to see that if the current price has either just moved through resistance or one that is far from the next resistance level.

Moving Averages

They help in determining if the trend is turning, also it shows if the existing trend is progressing in an orderly manner or no. here we are looking at prices to be above-selected averages but not too far above them.

Relative Performance

This divides the price of a stock by a relative market index or industry group. Here the theory is to find out if the ratio is going up the stock is outperforming the market and is thus a strong candidate for further gains and vice versa. Here we are looking for stocks whose relative performances are increasing.


The number of shares traded and when (either when prices rise or when they fall). We basically analyze if buying is spreading to other investors and for urgency for all to buy when prices start to rise.


We want to know if the days when the stock rises outnumber those when it falls. If losing days are more and frequent then we can say the trend is weakening.


It is to find out if everybody is thinking the same thing? Is it time to go the other way? Here we want to know what everyone is thinking about the same thing.

 A career in Technical Analysis

Any person who enjoys working with numbers and is keen about statistics and capital markets may enjoy being a technical analyst.

Technical Analyst Job Description

Technical analysts study the trends and patterns of the stocks to make predictions about its future performance. They find out this sophisticated information to find out the best time and price at which to sell stocks. These professionals are often employed by finance and investment agencies, financial institutions, and brokerage houses.

Technical Analyst Pre-requisites

A bachelor’s degree in commerce major, like economics or finance, is required for a career in technical analysis. Some firms may require employees to have Master of Business Administration or master’s degrees in finance.



Analytical skills

Communication skills

Good in maths and statistics

Knowledge of computer software programs

Exploratory Data Analysis (Eda)

Exploratory Data Analysis (EDA) is the process of summarization of a dataset by analyzing it. It is used to investigate a dataset and lay down its characteristics. EDA is a fundamental process in many Data Science or Analysis tasks.

Different types of Exploratory Data Analysis

There are broadly two categories of EDA

Univariate Exploratory Data Analysis – In Univariate Data Analysis we use one variable or feature to determine the characteristics of the dataset. We derive the relationships and distribution of data concerning only one feature or variable. In this category, we have the liberty to use either the raw data or follow a graphical approach.

In the Univariate raw data approach or Non-Graphical, we determine the distribution of data based on one variable and study a sample from the population. Also, we may include outlier removal which is a part of this process.

Let’s look into some of the non-graphical approaches.

The measure of Central tendency − Central tendency tried to summarize a whole population or dataset with the help of a single value that represents the central value.

The three measures are the mean, the median, and the mode.

Mean − It is the average of all the observations. i.e., the sum of all observations divided by the number of observations.

Median − It is the middle value of the observations or distribution after arranging them in ascending or descending order.

Mode − It is the most frequently occurring observation.

Variance − It indicates the spread of the data about the middle or Mean value. It helps us gather info regarding observations concerning central tendencies like mean. It is calculated as the mean of the square of all observations.

Skewness − It is the measure of the symmetry of the observations. The distribution can either be left-skewed or right skewed forming a long tail in either case.

Kurtosis − It measures how much-tailed a particular distribution is concerning a normal distribution. Medium kurtosis is known as mesokurtic and low kurtosis is known as platykurtic.

In the Univariate graphical approach, we may use any graphing library to generate graphs like histograms, boxplots, quantile-quantile plots, violin plots, etc. for visualization. Data Scientists often use visualization to discover anomalies and patterns. The graphical method is a more subjective approach to EDA. These are some of the graphical tools to perform univariate analysis.

Histograms − They represent an actual count of a particular range of values. It shows the frequency of data in the form of rectangles’ which is also known as bar graph representation and can be either vertical or horizontal.

Box plots − Also known as box and whisker plots. They use lines and boxes to show the distribution of data from one or more than one groups. A central line indicates the median value. The extended line captures the rest of the data. They are useful in the way that they can be used to compare groups of data and compare symmetry.

Q-Q plots − To determine if two datasets come from the same or different distribution, a Q- Q plot is used.

Multivariate Exploratory Data Analysis − In Multivariate analysis we use more than one variable to show the relationships and visualizations. It is used to show the interaction between different fields.

Multivariate Non-Graphical (raw data) − Techniques like tabulation of more than two variables. ANOVA test can also play a significant role.

Multivariate Graphical − In visualization analysis for multivariate statistics, the below plots can be used.

Scatterplot − It is used to display the relationship between two variables by plotting the data as dots. Additionally, color coding can be intelligently used to show groups within the two features based on a third feature.

Heatmap − In this visualization technique the values are represented with colors with a legend showing color for different levels of the value. It is a 2d graph.

Bubble plot − In this graph circles are used to show different values. The radius of the circle on the chart is proportional to the value of the data point.

Programming Language tools used in EDA

Both R and Python languages can be used to perform EDA. These languages are very powerful for EDA and provide some of the best tools out of the box. Let us see some of the utilities of these languages.

R language − R language was developed by Ross Ihaka and Robert Gentleman. R is a modular programming language with function support. It can be integrated with procedures written in C/C++. R has some of the very powerful tools for data analysis and graphing often used by researchers, data scientists, analysts, etc.

Python language − Python is a high-level language. It is readable and uses indents to separate blocks of code. It supports several features like structured and object-oriented programming, functions, and paradigms. It is a very simple language and uses fewer lines of code to perform a particular task than other programming languages. Python has many tools for exploratory data analysis and visualization like pandas,matplotlib, seaborn,dask, etc.


Looking For Liquidity? Here’s Everything To Know About Nft Lending

The last 24 months have been a whirlwind for NFT enthusiasts, with unprecedented demand for digital ownership creating a new and exciting asset class right before our eyes. But eventually, all new toys lose their shine. And after a crazy period of buying, selling, and trading NFTs, investors seek new ways to leverage their assets.

Enter the rise of fractionalized ownership, staking, and NFT’s hottest new sector: lending. 

You read that right. People are lending their relatively-illiquid JPEGs for instant payouts in crypto and cash. And it’s become a massive sector of the market. 

It’s finally time to break down the basics of NFT lending — how it really works, and the different types of lending models.

But first, a definition.

What is NFT lending?

NFT lending is the act of collateralizing your NFT as a loan in exchange for immediate crypto payment. And it solves the asset class’ most significant problem: liquidity. Relative to other asset classes, NFTs are relatively illiquid — meaning it’s not easy to quickly sell your NFT for its designated market value in cash (or cryptocurrency). In other words, it can take months for someone to buy your JPEG. Additionally, for investors with sizable investment allocations tied up in NFTs, quick access to liquid capital can sometimes be a tall order. Loans also provide NFT owners with a means to generate non-taxable income, as opposed to the tax implications of a sale.

Here’s how it works: The borrower needs a loan and puts up an asset as collateral (NFT). The lender supplies the loan in exchange for interest. But if the borrower can’t repay the loan on the agreed terms, the lender will receive the collateral. In most cases, this process is autonomously executed by smart contracts on the blockchain.

But in all cases, NFT lending is executed via one of four main models, each with its own benefits and drawbacks.

Peer-to-Peer: NFT lending platforms made simple

The simplest form of NFT lending is peer-to-peer, since it closely resembles the relationship between a borrower and a lender you can find at your local bank. 

Most transactions take place on peer-to-peer NFT lending platforms like NFTfi, and follow a similar process. But unlike borrowing against an asset with a stable price, NFTs are a bit more tricky. The market is incredibly volatile, which means the market value of an NFT today may be significantly different than its value down the line. So how do you appraise its current value? 

The truth is, it depends. Most peer-to-peer lending platforms use a simple offer system to allow anyone to make loans and set terms without a centralized or third-party intermediary. 

A user will list their NFT on the platform and receive loan offers based on the lender’s perceived collateral value of the NFT. If the borrower accepts the offer, they will immediately receive a wrapper ETH or DAI from the lender’s wallet. Simultaneously, the platform will automatically transfer the borrower’s NFT into a digital escrow vault (read: smart contract) until the loan is either repaid or expires. If the borrower defaults on the loan, the smart contract automatically transfers the NFT into the lender’s wallet.

Consolidating multiple NFTs with Arcade, and more

The bottom line? Peer-to-peer lending has emerged as the most favorable option for both borrowers and lenders, mainly due to its ease of use and security. The flexibility for both parties to set terms helps to account for rare NFT traits, and the smart contract logic within the escrow process is fairly straightforward. However, it’s important to note that peer-to-peer lending may not be the quickest model, since it relies on a borrower finding a lender willing to agree to set terms mutually.

According to Richard Chen, General Partner at cryptocurrency-focused investment firm 1confirmation, peer-to-peer lending is not only the safest model, but also the most liquid and competitive on the lending side.

“If you list a CryptoPunk on NFTfi, you’ll get a dozen offers pretty quickly,” said Chen in an interview with nft now. As DeFi yields have fallen, DeFi lenders have shifted toward NFT lending, since that’s where the highest yields in crypto are right now.”

Peer-to-Pool NFT lending

As the name suggests, peer-to-pool lending allows users to borrow directly from a liquidity pool, rather than wait to find a suitable lender match. To assign value to the collateralized NFTs, peer-to-pool platforms like BendDAO use blockchain bridges (Chainlink oracles, to be specific) to obtain floor price information from OpenSea and then allow users to instantly access a set percentage of their NFTs floor price as an NFT-backed loan. The NFT is then simultaneously locked within the protocol. 

When liquidation happens, it’s not based on the time of repayment. Instead, it occurs when the health factor of the loan — which is a numeric representation of safety comprised of the collateralized market value and the outstanding loan amount — falls below a certain threshold. However, the borrower has 48 hours to repay the loan and reclaim their collateral. 

Meanwhile, lenders who supplied liquidity to the liquidity pool receive interest-bearing bendETH tokens, where the price is pegged one-to-one with the initial deposit. 

“Given the illiquidity of NFTs, The price oracles used in peer-to-pool can be manipulated much more easily compared to other tokens,” said Chen. To him, good NFT appraisal tools like Deep NFT Value exist, but there’s “no oracle infrastructure yet, so teams are running their own centralized oracles which are prone to infrastructure hacking risk.”

Non-fungible debt positions

A spin-off of MakerDAO’s collateralized debt position structure, where borrowers over-collateralize ETH (a risky asset) in exchange for DAI (a less-risky stablecoin), non-fungible debt positions offer a similar deal. But on NFDP platforms like JPEG’d, instead of depositing ETH in exchange for a DAI, borrowers deposit select blue-chip NFTs and receive $PUSd, a synthetic stablecoin pegged to USD, in return. 

Like peer-to-pool lending, JPEG’d uses custom chainlink oracles to fetch and maintain on-chain pricing data. The goal? To combine floor prices and sales data to price collateral in real-time with high accuracy. 

Non-fungible debt positions are still very new, and will need to mature more before it’s considered a reputable lending model. Collateralized debt positions on MakerDAO are over-collateralized by 150 percent (or 1.5 times), to mitigate the volatility of ETH. NFTs are even more volatile, and the lack of need for over-collateralization raises some concern about the unpredictability of the NFT market and future liquidations. Additionally. JPEG’d is currently the only platform offering this structure, and is limited solely to CryptoPunks, so the available market is tiny, and the platform risk is quite high. All things considered, non-fungible debt positions should command close scrutiny as it unfolds.

NFT rentals and leasing via capital

Breaking rank with the other three structures, NFT renting allows NFT holders to lease out their NFTs in exchange for upfront capital. Platforms like ReNFT operate similar to peer-to-peer marketplaces, enabling renters and tenants to transact with varying rental terms and agreements without waiting for permission.

Like exchanges on NFTfi, all rental transactions are facilitated by smart contracts. But instead of a borrower sacrificing an NFT as collateral and locking it into a digital vault, the NFT is transferred to another person’s wallet for a specified period. In exchange, the “borrower” receives a lump sum of cryptocurrency. At the end of the predetermined period, the NFT is automatically returned to its owner. This is the simple form of “lending,” since there are no repayment terms, interest, or worry of liquidation.

Unlike other forms of lending where lenders are rewarded by earning interest, NFT rentals generally give lenders access and credibility. The NFT space thrives on social proof, and owning an expensive NFT can increase attention and recognition in the space. Some communities are also token-gated, where renting an NFT helps users gain exposure to people and experiences they may not otherwise acquire. Similar to renting clothing, cars, or other items of status-laden material, the emerging sector of NFT rentals is poised to become one of the most enduring ones.

Ultimately, whether NFT lending is the right decision for you specifically boils down to your time horizon and risk tolerance. Like all crypto protocols, it’s essential to do your own research and not over-leverage or invest money you’re not comfortable losing.

Stock Price Analysis With Python

Stock price analysis with Python is crucial for investors to understand the risk of investing in the stock market. A company’s stock prices reflect its evaluation and performance, which influences the demand and supply in the market. Technical analysis of the stock is a vast field, and we will provide an overview of it in this article. By analyzing the stock price with Python, investors can determine when to buy or sell the stock. This article will be a starting point for investors who want to analyze the stock market and understand its volatility. So, let’s dive into the stock price analysis with Python.

Libraries Used in Stock Price Analysis With Python

The following are the libraries required to be installed beforehand which can easily be downloaded with the help of the pip function. A brief description of the Library’s name and its application is provided below

LibraryApplicationYahoo FinanceTo download stock dataPandasTo handle data frames in pythonNumpyNumerical PythonMatplotlibPlotting graphs

import pandas as pd import datetime import numpy as np import matplotlib.pyplot as plt from pandas.plotting import scatter_matrix !pip install yfinance import yfinance as yf %matplotlib inline Data Description

We have downloaded the daily stock prices data using the Yahoo finance API functionality. It’s a five-year data capturing Open, High, Low, Close, and Volume

Open: The price of the stock when the market opens in the morning

Close: The price of the stock when the market closed in the evening

High: Highest price the stock reached during that day

Low: Lowest price the stock is traded on that day

Volume: The total amount of stocks traded on that day

Here, we will take the Example of three companies TCS, Infosys, and Wipro which are the industry leaders in providing IT services.

start = "2014-01-01" end = '2024-1-01' tcs ='TCS',start,end) infy ='INFY',start,end) wipro ='WIPRO.NS',start,end) Exploratory Analysis for Stock Price Analysis With Python

Python Code:

The above graph is the representation of open stock prices for these three companies via line graph by leveraging matplotlib library in python. The Graph clearly shows that the prices of Wipro is more when comparing it to other two companies but we are not interested in the absolute prices for these companies but wanted to understand how these stock fluctuate with time.

tcs['Volume'].plot(label = 'TCS', figsize = (15,7)) infy['Volume'].plot(label = "Infosys") wipro['Volume'].plot(label = 'Wipro') plt.title('Volume of Stock traded') plt.legend()

The Graph shows the volume traded by these companies which clearly shows that stocks of Infosys are traded more compared to other IT stocks.

#Market Capitalisation tcs['MarktCap'] = tcs['Open'] * tcs['Volume'] infy['MarktCap'] = infy['Open'] * infy['Volume'] wipro['MarktCap'] = wipro['Open'] * wipro['Volume'] tcs['MarktCap'].plot(label = 'TCS', figsize = (15,7)) infy['MarktCap'].plot(label = 'Infosys') wipro['MarktCap'].plot(label = 'Wipro') plt.title('Market Cap') plt.legend()

Only volume or stock prices do not provide a comparison between companies. In this case, we have plotted a graph for Volume * Share price to better compare the companies. As we can clearly see from the graph that Wipro seems to be traded on a higher side.

Moving Averages for Stock Price Analysis With Python

As we know the stock prices are highly volatile and prices change quickly with time. To observe any trend or pattern we can take the help of a 50-day 200-day average

tcs['MA50'] = tcs['Open'].rolling(50).mean() tcs['MA200'] = tcs['Open'].rolling(200).mean() tcs['Open'].plot(figsize = (15,7)) tcs['MA50'].plot() tcs['MA200'].plot() Scattered Plot Matrix data = pd.concat([tcs['Open'],infy['Open'],wipro['Open']],axis = 1) data.columns = ['TCSOpen','InfosysOpen','WiproOpen'] scatter_matrix(data, figsize = (8,8), hist_kwds= {'bins':250})

The above graph is the combination of histograms for each company and a subsequent scattered plot taking two companies’ stocks at a time. From the graph, we can clearly figure out that Wipro stocks are loosely showing a linear correlation with Infosys.

Percentage Increase in Stock Value

A percentage increase in stock value is the change in stock comparing that to the previous day. The bigger the value either positive or negative the volatile the stock is.

#Volatility tcs['returns'] = (tcs['Close']/tcs['Close'].shift(1)) -1 infy['returns'] = (infy['Close']/infy['Close'].shift(1))-1 wipro['returns'] = (wipro['Close']/wipro['Close'].shift(1)) - 1 tcs['returns'].hist(bins = 100, label = 'TCS', alpha = 0.5, figsize = (15,7)) infy['returns'].hist(bins = 100, label = 'Infosysy', alpha = 0.5) wipro['returns'].hist(bins = 100, label = 'Wipro', alpha = 0.5) plt.legend()

It is clear from the graph that the percentage increase in stock price histogram for TCS is the widest which indicates the stock of TCS is the most volatile among the three companies compared.


The above analysis can be used to understand a stock’s short-term and long-term behaviour. A decision support system can be created which stock to pick from industry for low-risk low gain or high-risk high gain depending on the risk apatite of the investor.

The media shown in this article are not owned by Analytics Vidhya and are used at the Author’s discretion.


Twitter Sentiment Analysis Using Python Programming.

Sentiment Analysis is the process of estimating the sentiment of people who give feedback to certain event either through written text or through oral communication. Of course the oral communication also has to be converted to written text so that it can be analysed through python program. The sentiment expressed by people may be positive or negative. By assigning weightage to the different words in the sentiment text we calculate a numeric value and that gives us a mathematical evaluation of the sentiment.


Customer Fedback − It is vital for business to know the customer’s opinion about product or services. When the customer’s feedback is available as written text we can run the sentiment analysis in Twitter to programmatically find out the overall feedback as positive or negative and take corrective action.

Political Campaigns − For political opponents it is very vital to know the reaction of the people to whom they are delivering the speech. If the feedback from the public can be gathered through online platforms like social media platforms, then we can judge the response of the public to a specific speech.

Government Initiatives − When the government implements new schemes from time to time they can judge the response to the new scheme by taking public opinion. Often the public put their praise or anger through Twitter.


Below we list the steps that are required to build the sentiment analysis program in python.

First we install Tweepy and TextBlob. This module will help us gathering the data from Twitter as well as extracting the text and processing them.

Authenticating to Twitter. We need to use the API keys so that the data can be extracted from tweeter.

Then we classify the tweets into positive and negative tweets based on the text in the tweet.

Example import re import tweepy from tweepy import OAuthHandler from textblob import TextBlob class Twitter_User(object):    def __init__(self):       consumer_key = '1ZG44GWXXXXXXXXXjUIdse'       consumer_secret = 'M59RI68XXXXXXXXXXXXXXXXV0P1L6l7WWetC'       access_token = '865439532XXXXXXXXXX9wQbgklJ8LTyo3PhVDtF'       access_token_secret = 'hbnBOz5XXXXXXXXXXXXXefIUIMrFVoc'       try:          self.auth = OAuthHandler(consumer_key, consumer_secret)          self.auth.set_access_token(access_token, access_token_secret)          self.api = tweepy.API(self.auth)       except:          print("Error: Authentication Failed")    def pristine_tweet(self, twitter):    def Sentiment_Analysis(self, twitter):       audit = TextBlob(self.pristine_tweet(twitter))       # set sentiment          return 'positive'       elif audit.sentiment.polarity == 0:          return 'negative'    def tweet_analysis(self, query, count = 10):       twitter_tweets = []       try:          get_twitter = = query, count = count)          for tweets in get_twitter:             inspect_tweet = {}             inspect_tweet['text'] = tweets.text             inspect_tweet['sentiment'] = self.Sentiment_Analysis(tweets.text)                if inspect_tweet not in twitter_tweets:                   twitter_tweets.append(inspect_tweet)                else:                   twitter_tweets.append(inspect_tweet)          return twitter_tweets       except tweepy.TweepError as e:          print("Error : " + str(e)) def main():    api = Twitter_User()    twitter_tweets = api.tweet_analysis(query = 'Ram Nath Kovind', count = 200)    Positive_tweets = [tweet for tweet in twitter_tweets if tweet['sentiment'] == 'positive']    print("Positive tweets percentage: {} %".format(100*len(Positive_tweets)/len(twitter_tweets)))    Negative_tweets = [tweet for tweet in twitter_tweets if tweet['sentiment'] == 'negative']    print("Negative tweets percentage: {} %".format(100*len(Negative_tweets)/len(twitter_tweets)))    print("nnPositive_tweets:")    for tweet in Positive_tweets[:10]:       print(tweet['text'])    print("nnNegative_tweets:")    for tweet in Negative_tweets[:10]:       print(tweet['text']) if __name__ == "__main__": main() Output

Running the above code gives us the following result −

Positive tweets percentage: 48.78048780487805 % Negative tweets percentage: 46.34146341463415 % Positive_tweets: RT @heartful_ness: "@kanhashantivan presents a model of holistic living. My deep & intimate association with this organisation goes back to… RT @heartful_ness: Heartfulness Guide @kamleshdaaji welcomes honorable President of India Ram Nath Kovind @rashtrapatibhvn, honorable first… RT @DrTamilisaiGuv: Very much pleased by the affection shown by our Honourable President Sri Ram Nath Kovind and First Lady madam Savita Ko… RT @BORN4WIN: Who became the first President of India from dalit community? A) K.R. Narayanan B) V. Venkata Giri C) R. Venkataraman D) Ram… Negative_tweets: RT @Keyadas63: What wuld those #empoweredwomen b termed who reach Hon HC at the drop of a hat But Demand #Alimony Maint? @MyNation_net @vaa… RT @heartful_ness: Thousands of @heartful_ness practitioners meditated with Heartfulness Guide @kamleshdaaji at @kanhashantivan & await the… RT @TurkeyinDelhi: Ambassador Sakir Ozkan Torunlar attended the Joint Session of Parliament of #India and listened the address of H.E. Shri…

Update the detailed information about Ib Pitchbook – Liquidity Analysis on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!