mmdemars / stock-analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stock-analysis

Overview of Project:

This analysis has been created to provide a comparitive analysis of two years of 12 green stocks for yearly volume and return.

Results:

About The Stocks

While comparing two years of stock results doesn't create a complete picture, comparing these two years indicates that two stocks out of the 12 analyzed stand out as possible investments, as both showed positive returns over the two years span, while most others only showed positive return in 2017, and one in particular was negative two years running. Of those two - ENPH and RUN - Run had the highest return in 2018, and th elargest increase in return between 2017 and 2018. ENPH had the highest return in 2017 at 129.5%, but that number sank to 81.5% in 2018 which could indicate a continued future downward trend. RUN's stock was also less heavily traded, making the increased return even more attractive. RUN's increase from 5.5% in 2017 to 84% in 2018 is a steep increase, backed by the lesser volume of shares traded overall - this stock seems to be the better investment choice.

Link to Analysis Here

About the Code

On the execution of the two scripts, the original script had a run itme of approx. 0.6 seconds for 2017 and 2018, while the Refactored script ran at .1 second for 2017 and .09 seconds for 2018 - showing a clear increase in efficiency.

2017 Refactored Code Pop Up 2018 Refactored code Pop Up

Summary:

The refactored code showed a clear increase in efficiency for the code, however the time spent in the refactoring process set against the time saved makes the refactoring in this particular situation a large chuck of lost time (Obviously this time-loss would be less for a more experienced coder). On a larger data set with more years of data to analyze the benefits would be more clear. Refactoring the code also introduces the element of additional human errors, which have to be found and troubleshot. These are elements that should be taken into consideration before refactorin code for a project - whether the time spent in the work will be paid out in time saved in running the program now and later on.

About