You are on page 1of 8

1

CAPM_ANALYSIS

Student Name:

Student ID:

Course Name:

Date:
2

c) For each cryptocurrency, estimate model 1) on the overall sample. Report results and

comment statistical indicators. Check if residuals are normally distributed,serially

correlated, and/or heteroskedastic. Comment on the results providing formulas.

A high beta asset should have a big price gain during market uptrends and a significant price

decrease during market downtrends. These large price movements may enhance the risk

associated with this security as well as the degree of uncertainty about its return. As a result, a

high beta security is fraught with danger. As a result, beta is frequently used to assess the risk of

a security. A high beta stock suggests aggressive management, whereas a low beta stock shows

protective security.

d) Re-estimate point c) using robust standard errors. Did something change?

Comment.

P0 represents the stock's purchase price, P1 represents the stock's price at the end of the holding

period, and D1 represents any dividends paid at the end. The stock price gain plus the dividend is

represented by the sum P1 P0, which indicates the overall change in the value of the investment.

The return is computed by dividing the initial investment by the change in the value of the

investment. The problem with this index is that it is based on just 30 stocks for value. To obtain a

more complete market index, we may need to look at the S&P100 or S&P500 indexes. Even

over-the-counter stocks are included in the NASDAQ Composite Index.


3

e) For each cryptocurrency, construct a 95% confidence interval for β. Then test

the null hypothesis that the β (company’s risk) is the same as the average risk over

the entire market, i.e. β = 1 against alternative hypothesis β /= 1. Comment. Do

your results match your beliefs about risky and safe returns?

The advantage of using as a risk measure is that it may combine linearly for numerous equities in

a portfolio; however, the disadvantage is that it can only assess market-related risk for a security.

While it can quantify risk irrespective of market circumstances, its disadvantage is that it lacks

linearity and is difficult to use in real-world scenarios. Both and are inaccurate risk indicators;

they change over time and are difficult to predict. Because of their high volatility, high-volatility

equities are more unpredictable and risky. Little beta shares have minimal volatility and are

therefore safer and more trustworthy.

f) Split your sample in two parts (200 and 200 observations, discard observations

if you need). Repeat point c). Do you have the same results? Comment.

Drawing a regression line between the various recorded values of x and y reveals a linear

connection between x and y. The slope of the line will determine the rate of change of y with

respect to x. In other words, the slope will show the amount by which a change in market return

affects stock return. Assume the y-intercept and slope of the line in this figure are and,

respectively. Because it is nearly zero, the quantity is statistically insignificant. On the other

hand, the sum represents a major notion.

g) Repeat point c) without including the constant. Do you have the same results? Comment.
4

If we know the index's value at the start and end of the month, we may calculate the market

return for that month. The market's dividend yield is currently 1.71% per year. The stock's "beta"

relates to how sensitive the stock's return is to changing market conditions. Low beta equities

will react very little to stock market volatility. Stocks with a high beta tend to vary a lot in

response to minor market moves.

h) Do you think CAPM is an appropriate tool to understand the dynamics of

cryptocurrencies? Comment

Yes. The CAPM is a simple calculation that can be stress-tested to create a number of probable

outcomes and provide confidence about the required rates of return. The dividend discount

model and other return models, such as the CAPM, do not take systematic risk (beta) into

account (DDM). Systematic or market risk is a crucial problem since it is unexpected and, as a

result, is usually unmanageable. Unsystematic (specific) risk is avoided on the assumption that

investors have a diversified portfolio identical to the market portfolio.


5

Appendix

import numpy as np

from scipy.stats import norm

from stock import Stock

class CAPM(object):

def __init__(self,risk_free,market,alpha = .05):

self.risk_free = Stock(risk_free["ticker"],risk_free["date_range"]) if type(risk_free) is dict


else Stock(risk_free)

self.market = Stock(market["ticker"],market["date_range"]) if type(market) is dict else


Stock(market)

self.alpha, self.beta = {}, {}

self.critical_value = norm.ppf(1 - alpha / 2.0)

def __str__(self):

if len(self.alpha.keys()) and len(self.beta.keys()):

alpha = self.alpha

beta = self.beta

else:

return "The alpha and beta coefficients were not initialized. Please call the asset
regression method before continuing."

print_string = "Capital Asset Pricing Model:\n\tCritical value: %.2f\n" %


self.critical_value

print_string += "\t\t\tValue\t\tLower Bound\tUpper Bound\n"

print_string += "\talpha:\t\t%.4f\t\t%.4f\t\t%.4f\n" %
(alpha["value"],alpha["confidence_interval"][0],

alpha["confidence_interval"][1])
6

print_string += "\tbeta:\t\t%.4f\t\t%.4f\t\t%.4f\n\n" %
(beta["value"],beta["confidence_interval"][0],

beta["confidence_interval"][1])

if alpha["confidence_interval"][0] > 0:

print_string += "\tThe CAPM reports that the security is overpriced. Asset returns are
too large on average."

elif alpha["confidence_interval"][1] < 0:

print_string += "\tThe CAPM reports that the security is underpriced. Asset returns are
too small on average."

else:

print_string += "\tThere CAPM reports that the security is appropriately priced."

return print_string

def asset_regression(self,asset_data):

alpha, beta = {}, {}

asset = Stock(asset_data["ticker"],asset_data["date_range"]) if type(asset_data) is dict else


Stock(asset_data)

market_premium = np.atleast_2d(self.market.statistics["returns"] -
self.risk_free.statistics["returns"]).T

asset_premium = np.atleast_2d(asset.statistics["returns"] -
self.risk_free.statistics["returns"]).T

constant = np.ones((market_premium.shape[0],1))

covariates = np.concatenate((constant,market_premium),axis = 1)

# Solve the capital asset pricing model in the least-squares sense. In

# particular, wel solve the following linear model for parameters theta_0

# and theta_1:
7

# R_{j,t} - mu_{f,t} = theta_0 + theta_1 * (R_{M,t} - mu_{f,t}) + e_{j,t}

# Where R_{j,t} is the asset premium of the jth asset, mu_{f,t} is the

# risk-free rate, R_{M,t} is the market premium, and e_{j,t} represents an

# error term. Refer to page 435 in the Statistics and Data Analysis for

# Financial Engineering.

theta = np.linalg.lstsq(covariates,asset_premium)[0]

residuals = asset_premium - np.dot(covariates,theta)

# The rank of the covariates matrix is presumably two, and it is for that

# reason that we subtract two in the denominator.

s_squared = np.sum(residuals * residuals) / (market_premium.shape[0] - 2)

standard_errors = np.sqrt(s_squared * np.linalg.inv(np.dot(covariates.T,covariates)))

alpha["value"] = theta[0]

alpha["confidence_interval"] = theta[0] + standard_errors[0,0] * self.critical_value *


np.array([-1,1])

beta["value"] = theta[1]

beta["confidence_interval"] = theta[1] + standard_errors[1,1] * self.critical_value *


np.array([-1,1])

self.alpha = alpha

self.beta = beta

date_range = {"start" : "2012-01-03", "end" : "2013-01-08"}

tickers = ("^IRX","^GSPC","GOOG")

capm = CAPM({"ticker" : tickers[0],"date_range" : date_range},

{"ticker" : tickers[1],"date_range" : date_range})

capm.asset_regression({"ticker" : tickers[2],"date_range" : date_range})


8

print capm

You might also like