How to use the Characteristic Line to measure the risk and return of a security?

Probir Banerjee
Updated on 28-Sep-2021 06:50:22

1K+ Views

A Characteristic Line (CL) measures the risk and the related return of a security. The returns of a security at different times are plotted on a line that takes a form of a straight line which is the characteristics line (CL).The CL represents the performance of the security in comparison to the market risks. The stock returns are placed on the Y-axis of a graph and the stock market returns are placed on the X-axis. The beta coefficient of the graph provides the slope of the characteristic line. The slope and standard deviation of the characteristic line, define the asset’s ... Read More

What is Systemic Risk in Finance?

Probir Banerjee
Updated on 28-Sep-2021 06:48:46

278 Views

The risk that occurs due to the system of economy is known as systematic risk. Systematic risk is complex in nature and is beyond the control of an individual or a specific company. In general, all investments and securities are prone to such kinds of risk.Systemic risk includes unforeseen events that happen automatically, making it uncontrollable and beyond the will of a single person or company. Systemic risk usually impacts the entire industry rather than a single company or security.Note − Systemic risks cannot be avoided by diversification.Example #1: The 1866 Overend and Gurney CollapseOverend and Gurney was a brokerage ... Read More

What is Capital Allocation Line?

Probir Banerjee
Updated on 28-Sep-2021 06:46:04

445 Views

Capital Allocation Line (CAL) and Optimal PortfolioThe Capital Allocation Line (CAL) is a line that shows the risk-and-reward profile of assets and can be utilized to build an optimal portfolio. The process of building the CAL for a set of portfolios is given below.Portfolio Expected Return and VarianceLet’s construct a portfolio with only two risky assets for the sake of simplicity and understanding. The portfolio’s expected return is the weighted average of each individual assets’ expected returns, and is calculated as −$$\mathrm{𝐸(𝑅_{𝑝}) = 𝑤_{1}\:𝐸(𝑅_{1}) + 𝑤_{2} \:𝐸(𝑅_{2})}$$Where$𝑤_{1}$ and $𝑤_{1}$ are the weights for the two assets, and$𝐸(𝑅_{1})$ and $𝐸(𝑅_{2})$ are ... Read More

What is a risk-free asset?

Probir Banerjee
Updated on 28-Sep-2021 06:44:32

772 Views

A risk-free asset comes with a virtually guaranteed return. Usually, all investments have a degree of risk associated with them, so the term "risk-free" is used to mean the assets that are sufficiently safe so that investors can remain sure to get a return on their investment that is somehow close to the return predicted for the asset while investing.A risk-free asset has a definite future return, whatever the risk of the assets is. This type of asset often provides a certain return providing investors a level of assurance over the return from the.The United States Treasury Bills are a ... Read More

Python Pandas - Draw a violin plot and set quartiles as horizontal lines with Seaborn

AmitDiwan
Updated on 27-Sep-2021 16:27:27

593 Views

Violin Plot in Seaborn is used to draw a combination of boxplot and kernel density estimate. The seaborn.violinplot() is used. Set quartiles as horizontal lines using the inner parameter with value quartile.Let’s say the following is our dataset in the form of a CSV file −Cricketers.csvAt first, import the required libraries −import seaborn as sb import pandas as pd import matplotlib.pyplot as pltLoad data from a CSV file into a Pandas DataFrame −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\Cricketers.csv")Plotting violin plot with Role and Age. Control box order by passing an explicit order i.e. ordering on the basis of "Role". Set quartiles as horizontal ... Read More

Python - Remove the missing (NaN) values in the DataFrame

AmitDiwan
Updated on 27-Sep-2021 13:50:53

3K+ Views

To remove the missing values i.e. the NaN values, use the dropna() method. At first, let us import the required library −import pandas as pdRead the CSV and create a DataFrame −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv") Use the dropna() to remove the missing values. NaN will get displayed for missing values after dropna() is used −dataFrame.dropna()ExampleFollowing is the complete codeimport pandas as pd # reading csv file dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv") print("DataFrame with some NaN (missing) values...", dataFrame) # count the rows and columns in a DataFrame print("Number of rows and column in our DataFrame = ", dataFrame.shape) # drop ... Read More

Python - Find the Summary of Statistics of a Pandas DataFrame

AmitDiwan
Updated on 27-Sep-2021 13:41:37

417 Views

To find the summary of statistics of a DataFrame, use the describe() method. At first, we have imported the following pandas library with an aliasimport pandas as pdFollowing is our CSV file and we are creating a Pandas DataFrame −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv")Now, get the summary of statistics of our Pandas DataFrame −dataFrame.describe()ExampleFollowing is the complete codeimport pandas as pd # reading csv file dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv") print("DataFrame...", dataFrame) # count the rows and columns in a DataFrame print("Number of rows and column in our DataFrame = ", dataFrame.shape) # summary of DataFrame print("Get the summary of statistics ... Read More

Python Pandas – Count the rows and columns in a DataFrame

AmitDiwan
Updated on 27-Sep-2021 13:29:08

702 Views

To count the rows and columns in a DataFrame, use the shape property. At first, let’s say we have the a CSV file on the Desktop as shown in the below path −C:\Users\amit_\Desktop\CarRecords.csvRead the CSV file −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv") Let us now count the rows and columns using shapedataFrame.shapeExampleFollowing is the code − import pandas as pd # reading csv file dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv") print("DataFrame...", dataFrame) # count the rows and columns in a DataFrame print("Number of rows and column in our DataFrame = ", dataFrame.shape) # returns top 5 row records print("DataFrame with specific number of ... Read More

Python Pandas - Display specific number of rows from a DataFrame

AmitDiwan
Updated on 27-Sep-2021 13:19:53

4K+ Views

To display specific number of rows from a DataFrame, use the head() function. Set the parameter to be the number of row records to be fetched. For example, for 10 rows, mention −dataFrame.head(10)At first, let us import the required library with an alias −import pandas as pd Our CSV is on the Desktop as shown in the below path −C:\Users\amit_\Desktop\CarRecords.csvLet us read the CSV file and create Pandas DataFrame −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv") Return specific number of rows i.e. in this case, we are returning top 5 row records −dataFrame.head(5)ExampleFollowing is the code import pandas as pd # reading csv ... Read More

Python Pandas - Iterate and fetch the rows that contain the desired text

AmitDiwan
Updated on 27-Sep-2021 13:13:57

273 Views

To iterate and fetch the rows containing the desired text, use the itertuples() and find() method. The itertuples() iterate over DataFrame rows.At first, let us import the required library with an alias −import pandas as pdOur CSV is on the Desktop as shown in the below path −C:\Users\amit_\Desktop\CarRecords.csv Let us read the CSV file and create Pandas DataFrame −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv")Iterate and fetch the rows containing a specific text. We are fetching Car column with text “Lamborghini” −for k in dataFrame.itertuples():    if k[1].find('Lamborghini') != -1: print(k)ExampleFollowing is the code import pandas as pd ... Read More

Advertisements