Solar Companies Stock Price Scraping and Storing in a database

5bbc123c1533c.jpg

Yahoo Finace is very popular site for checking out the present day stock prices. I have selected 9 different companies to get their stock price value.

reference https://finance.yahoo.com/

This project involves the following steps

1. Step1: Collecting Realtime data via webscarping

I am going to use yahoo finance site inorder to scarpe the real time value of the Stock market price of Enphase Energy INC company.

Daqo New Energy Corp

Hannon Armstrong Sustainable Infrastructure Capital Inc.

Enphase

Canadian Solar Inc

Sunnova Energy International Inc.

Array Technologies Inc.

Maxeon Solar Technologies Ltd

SunPower

Step2: Scaping multiple values from January 1st, 2000 till date

1. Specify the date range for analysis

2. Create the list of stock code for fetching the data

3. call the Pandas_datareadear Module to scrape the data

there are two ways in which we can do this pdr.DataReader(StockList,'yahoo link', start, end) pdr.get_data_yahoo(StockList, start, end)

4. Inspect the dataframe

Step3: Storage of data in a Json, CSV file format and writing the values into a database

--> Storing the data to JSON

--> Storing the data to CSV

--> Checking the contents of the json and csv files created above

-- >Storing the DataFrame into SQLITE3

1. Importing sqlite3

2. Creating a database

3. Execution of different queries

4. Making peremanent Changes to Database

5. Reading the values from database

6. Closing the database connection

Conclusion

From the above stament it is very clear that all the till date stock price values of different companies are successfully executed. With Pandas Simple commands and buit in module SQLITE3 it is very easy to store the data in a database and can be easily fechted for further anslysis

Future work

The data collected will be used for Time series analysis and building a price predictive model.