Additional Projects

Stock Analysis Using Machine Learning concepts such as linear progression:

In this project, I used Quandl to receive data sets of stocks such as Nvidia. Then, using tensor flow, I was able to get values of stock prices days after using linear progression. I added extra data outputs to represent the percentage change, and overall change in values demonstrated by the stock price.

/*Hetesh Sehgal*/
import pandas as pd
import quandl
import math
import numpy as np
from sklearn import preprocessing, cross_validation, svm
from sklearn.linear_model import LinearRegression
df = quandl.get(‘WIKI/NVDA’)
df = df[[‘Adj. Open’, ‘Adj. High’, ‘Adj. Low’, ‘Adj. Close’, ‘Adj. Volume’,]] df[‘HL_PCT’] = (df[‘Adj. High’] – df[‘Adj. Close’]) / df[‘Adj. Close’] * 100.0
df[‘PCT_change’] = (df[‘Adj. Close’] – df[‘Adj. Open’]) / df[‘Adj. Open’] * 100.0

df = df[[‘Adj. Close’, ‘HL_PCT’, ‘PCT_change’, ‘Adj. Volume’]] forecast_col = ‘Adj. Close’
df.fillna(-99999, inplace=True)
forecast_out = int(math.ceil(0.01*len(df)))

df[‘label’] = df[forecast_col].shift(-forecast_out)
df.dropna(inplace=True)

print(df.tail())