2024-02-05

Dataset ‘S&P500’

Display the columns in the Dataset

names(sp500)
 [1] "Exchange"            "Symbol"              "Shortname"          
 [4] "Longname"            "Sector"              "Industry"           
 [7] "Currentprice"        "Marketcap"           "Ebitda"             
[10] "Revenuegrowth"       "City"                "State"              
[13] "Country"             "Fulltimeemployees"   "Longbusinesssummary"
[16] "Weight"             
[1] 412  16

Correlation on Price, EBITDA, and Market Cap

z = clean_sp500$Currentprice;
y = clean_sp500$Ebitda;
x = clean_sp500$Marketcap

xax <- list(
  title = "Capital Market",
  titlefont = list(family="Modern Computer Roman")
)
yax <- list(
  title = "EBITA",
  titlefont = list(family="Modern Computer Roman")
)

zax <- list(
  title = "Stock Price",
  titlefont = list(family="Modern Computer Roman")
)

fig <- plot_ly(x=x, y=y, z=z, type="scatter3d", mode="markers", color=z) %>%
  layout(xaxis = xax, yaxis = yax) %>%
  layout(margin=list(
    l=50,
    r=50,
    b=20,
    t=40
    )
  )

Plot of Correlation

Warning: Ignoring 24 observations

MarketCap with Revenue in Different State

ggplot(clean_sp500, aes(x = Marketcap, y = Revenuegrowth, color=State)) + 
   geom_point(alpha=1/2) ## + geom_smooth(method="lm")
Warning: Removed 2 rows containing missing values (`geom_point()`).

Average Cap by Sector

Stock Price in Each Exchange

Warning: Removed 8 rows containing missing values (`geom_point()`).
Warning: Removed 2 rows containing missing values (`geom_point()`).

Calculate the Sharp Ratio of the Stocks

The Sharpe ratio compares the return of an investment with its risk. It’s a mathematical expression of the insight that excess returns over a period of time may signify more volatility and risk, rather than investing skill.

formula: \(\text{SharpRatio} = (R_p - R_f) / \sigma_p\)

Understand the EBITDA

What is EBITDA

EBITDA, or earnings before interest, taxes, depreciation, and amortization, is an alternate measure of profitability to net income. By including depreciation and amortization as well as taxes and debt payment costs, EBITDA attempts to represent the cash profit generated by the company’s operations.
\(\text{EBITDA}=\text{Net Income} +\text{Taxes} +\text{Interest Expense}+\text{D&A}\)