GithubHelp home page GithubHelp logo

lastancientone / simplestockanalysispython Goto Github PK

View Code? Open in Web Editor NEW
319.0 12.0 104.0 6.61 MB

Teaches step-by-step to analysis stock data in python.

License: MIT License

Jupyter Notebook 99.91% Python 0.05% HTML 0.04%
stock-analysis stock-data stock-market stocks stock-prices stock-trading technical-analysis technical-indicators fundamental-analysis time-series

simplestockanalysispython's Introduction

Hi there. I'm Tin. ๐Ÿ‘‹

Welcome to my page!

๐Ÿ“ซ

Contact

tin-hang

Gmail

If you're finding value in my work and would like to show your appreciation, consider supporting me by 'buying me a coffee.' Your contribution goes a long way in fueling my passion for creating and maintaining quality projects. I truly appreciate any support you can offer. Thank you!

๐Ÿ’ป ๐Ÿ”ข ๐Ÿ”ฃ ๐Ÿค– I love mathematics, statistics, data, programming, data science, machine learning, and deep learning.

๐Ÿ’ต ๐Ÿ’ฐ ๐Ÿ’ธ ๐Ÿ“ˆ ๐Ÿ“‰ I am into investment, finance, and quantitative research.

๐ŸŒฑ I'm addict to learning and growing everyday.

๐Ÿ† GitHub Profile Trophy:

Summary Cards

๐Ÿ“‰ ๐Ÿ“ˆ ๐Ÿ“Š GitHub Stats

Tin's github stats

๐Ÿ’ป GitHub Most Languages Used

Top Langs

Github Top Languages by Repo

Github Top Languages by Commit

GitHub Commit

Repository
Stock Analysis for Quant
Deep Learning Maching Learning Stock
Mathematics for Maching Learning
Simple Stock Analysis in Python
Simple Stock Analysis in R
Data Science

Open source projects

๐Ÿ“ Projects โญ Stars ๐Ÿ’ป Forks โŒ Issues ๐Ÿ“ฌ Pull requests
Stock Analysis For Quant Stars Forks Issues Pull Requests
Deep Learning & Machine Learning for Stock Analysis Stars Forks Issues Pull Requests
Simple Stock Analysis in Python Tutorial Stars Forks Issues Pull Requests

Investment Projects

Repository Links โญ Stars ๐Ÿ’ป Forks
Covid-19 Vaccines Investment Stars Forks
Beverages Long Term Investment Stars Forks
Electrics Cars Investment Stars Forks
Housing & Home Building Investment Stars Forks
Technology Investment Stars Forks
Services Industry Restaurants Investment Stars Forks
AMD vs NVDA Investment Stars Forks

Connect with me:

tin-hang

Gmail

Programming Languages:

Python

R

Matlab

VBA (Visual Basic for Applications)

Software Applications and Tools:

Excel

Power BI

Tableau

Operations System and Software:

Windows 10 Linux Virtual Box Ubuntu

Windows 10 Linux Virtual Box Ubuntu

Programming Languages and Sofwares:

python R Matlab Excel VBA Power BI tableau Nteract Anaconda Spyder Jupyter Notebook Notepad++

python R Matlab Excel VBA Power BI tableau Nteract Anaconda Spyder Jupyter Notebook Notepad++

Please leave a โญ๏ธ if you like or fork my codes or using my repositories for yourself to modify!

๐ŸŒŸ Your Support Matters! ๐ŸŒŸ

If you find my work valuable and wish to contribute, your support means the world to me! You can help fuel my creativity and dedication with a simple gesture โ€“ buying me a coffee! โ˜•

Your generosity goes beyond just a beverage; it's a vote of confidence in my efforts. Whether it's a coffee, a kind comment, or a โญ๏ธ on my work, every bit of support fuels my passion and helps me keep going.

When you choose to donate, your message will be cherished and prominently displayed on my main site. However, please only contribute if it's comfortable for you, as there's no refund system in place. Your donation is entirely optional and deeply appreciated.

Thank you immensely for considering supporting my work. Together, we can keep the creativity flowing!

visitors

simplestockanalysispython's People

Contributors

lastancientone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simplestockanalysispython's Issues

Why my python (Spyder) got stuck (i.e. did not return result) when I was trying to run the code of retrieving stock data from yahoo finance

I have a list of US stocks ( around 3000 stocks) in excel and I want to get the stock price and other related daily stock info on each stock in certain time period. So I wrote a for loop to get all related stock info on each stock ( and I have tried both yahoo_fin.stock_info and yfinance packages). But then it just got stuck at certain stock and never return the result. I am using spyder for my python coding. below is the code:

import pandas as pd
import numpy as np
import yahoo_fin.stock_info as si

ticker_list = pd.read_excel(r'C:\Users\user\Desktop\ticker_list.xlsx',engine="openpyxl")

n=[]
et=[] 
df_empty=[]
for i in range(len(ticker_list)): 
    try:
        df = df_empty[0:0]
        df=si.get_data(ticker_list.iloc[i]['ticker'], start_date='2021-09-30', end_date='2022-04-25') 
# I used yf.download for using yfinance package
        mkt_cap=si.get_quote_table(ticker_list.iloc[i]['ticker'])["Market Cap"]
        df.insert (7,"mkt_cap",mkt_cap) 
        print(ticker_list.iloc[i]['ticker'])
        df.replace(np.inf, np.nan)        
        df = df.dropna()
        df.reset_index(inplace=True)   
        n.append(df)   
    except:
        et.append(ticker_list.iloc[i]['ticker'])
        print('error: ' + ticker_list.iloc[i]['ticker'])
        pass
print(n)

when I run the code below what it shows in my console:

Python 3.8.13 (default, Mar 28 2022, 06:59:08) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 7.31.1 -- An enhanced Interactive Python.

runfile('C:/Users/USER/get_all_stock_data.py', wdir='C:/Users/USER')
BYDDY
CHTR
JD
KYCCF
RY-PT
GE
BP
MO
VLKPF
SMAWF
AMAT

I tired many times already , everytime it just stuck on different ticker everytime. Also I have also tried to leave the code running for a day but it just stop it right there and never give me return. when I tried to debug, it also stop running at either the si.get.data line or si.get_quote_table line. I actually use this code since last year and it work fine, it just start not working when I run this code again last week. I also tried several other packages ( e.g. pandas_datareader.data) still not able to get the stock info. Appreciate if anyone can let me know what is the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.