Skip to content

A recent finance graduate, Steve, wants to help his parents determine how to invest in green stocks, Steve's parents want to invest into DAQO New Energy Corp "DQ" a stock that reminds them of how they met at Dairy Queen many years ago, Steve wants to analyze other green energy stocks in addition to DAQO to get a better picture of the green energ…

Notifications You must be signed in to change notification settings

Emilio-2021/stock-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Green Stocks Analysis

Overview of Project

A recent finance graduate, Steve, wants to help his parents determine how to invest in green stocks, Steve's parents want to invest into DAQO New Energy Corp "DQ" a stock that reminds them of how they met at Dairy Queen many years ago, Steve wants to analyze other green energy stocks in addition to DAQO to get a better picture of the green energy sector and create a stronger portfolio for his parents, an analytical approach, with the performance of others green stocks in 2017 and 2018 he wants to evaluate which stocks may produce better return for his parents.

Results

2017 vs 2018 Stock Performance

By looking at the images below it is clear that in 2017 the green stocks performed better than in 2018 being DQ, ENPH and SEDG the ones with best returns in 2017, the returns in 2018 were not so positive with only ENPH and RUN on positive returns, ENPH and RUN are the only two stocks to consistently be in the green in 2017 and 2018, in my opinion Steve should look into ENPH and RUN instead of DQ as promising investments, certainly with ENPH stocks as it has the most favorable years.

allStocks2017and2018

Execution times

original script
executionTimeNoRefactor

refactored script
executionTimeRefactored

Summary

What are the advantages or disadvantages of refactoring code?

Refactoring code makes easier to underestand the final product, after refactoring the output execution is faster, however, refactoring code is a time-consuming operation that depend on the length and complexity of the code and in the proccess of refactoring some new bugs might appears too.

How do these pros and cons apply to refactoring the original VBA script?

In this case the refactoring proccess makes a reading of all the data in only one pass, in comparison with the no refactored code that cicle the whole data for every ticket, instead of running two loops to access the tickers and data now we use only one loop for this operation.

About

A recent finance graduate, Steve, wants to help his parents determine how to invest in green stocks, Steve's parents want to invest into DAQO New Energy Corp "DQ" a stock that reminds them of how they met at Dairy Queen many years ago, Steve wants to analyze other green energy stocks in addition to DAQO to get a better picture of the green energ…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published