Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added LSTM/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes.
54 changes: 54 additions & 0 deletions LSTM/Project Proposal Plots.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "Project Proposal"
author: "Omair Shafi Ahmed"
date: "10/27/2017"
output: html_document
---


```{r}

library(ggplot2)
library(readr)
library(dplyr)
library(tidyverse)


stock = read.csv("/Users/omairs/Documents/Masters/DS 5110/HW2/data/nyse/prices-split-adjusted.csv")

ibm_stock <- stock %>% filter(symbol %in% c('AAPL', 'FB', 'GOOG', 'AKAM') )

#plot.ts(ibmstock$close, col="blue", type="o", ylab = "IBM Stocks price in $",
# xlab = "Year", main = "IBM daily Stock Price", cex = .8)

ibm_stock$date_as_date <- as.Date(ibm_stock$date)

tech_stocks <- ggplot(ibm_stock, aes(x = `date_as_date`, y=log(`close`), color=`symbol`)) + geom_line(aes(group=symbol)) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + scale_x_date(name = 'Year', date_breaks = '1 years', date_labels = '%Y') + ylab('Log of Close')

ggsave('/Users/omairs/Documents/Masters/DS 5110/HW2/plots/tech_stocks.png')

```


```{r}

fundamentals <- read_csv('/Users/omairs/Documents/Masters/DS 5110/HW2/data/nyse/fundamentals.csv')

fundamentals <- fundamentals %>% na.omit() %>% filter(`For Year` > 2011)

fundamentals <- fundamentals %>% separate(`Period Ending`, into = c('Year','Month', 'Day'), sep="-") %>%
group_by(`Year`) %>% summarise(`Assets` = sum(`Total Assets`),
`Liabilities` = sum(`Total Liabilities`))


#fundamentals %>% transmute(`Year`, `Net Worth` = `Assets` - `Liabilities`)

fundamentals <- fundamentals %>% transmute(`Year`, `Net Worth` = `Assets` - `Liabilities`) %>%
filter(`Year` > 2011) %>% filter(`Year` < 2016)

ggplot(fundamentals) + geom_col(aes(x=`Year`, y = `Net Worth`))


ggsave('/Users/omairs/Documents/Masters/DS 5110/HW2/plots/net_worth_NYSE.png')
```

File renamed without changes.
Binary file added data/.DS_Store
Binary file not shown.
Loading