GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nihardhanani/SimpleStockAnalysisPython: Teaches step-by-step to analysis stock data in python.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

227 Commits
227 Commits

Folders and files

NameName
Last commit message
Last commit date
01_SimpleFetchStockData.ipynb
01_SimpleFetchStockData.ipynb
 
 
02_SimpleStockDate.ipynb
02_SimpleStockDate.ipynb
 
 
03_SimpleStockCharts.ipynb
03_SimpleStockCharts.ipynb
 
 
04_SimpleTechnicalAnalysisLibrary.ipynb
04_SimpleTechnicalAnalysisLibrary.ipynb
 
 
05_SimpleStockCSV.ipynb
05_SimpleStockCSV.ipynb
 
 
06_SimpleStockStyleTable.ipynb
06_SimpleStockStyleTable.ipynb
 
 
07_SimpleYahooStockScrape.ipynb
07_SimpleYahooStockScrape.ipynb
 
 
08_SimpleFinanceNewsScrape.ipynb
08_SimpleFinanceNewsScrape.ipynb
 
 
09_SimpleScrapeWikiSP500.ipynb
09_SimpleScrapeWikiSP500.ipynb
 
 
10_SimpleStockMultiIndex.ipynb
10_SimpleStockMultiIndex.ipynb
 
 
11_SimpleFundamentalAnalysis.ipynb
11_SimpleFundamentalAnalysis.ipynb
 
 
12_SimpleStockStatistics.ipynb
12_SimpleStockStatistics.ipynb
 
 
13_SimpleStockChartScripts.py
13_SimpleStockChartScripts.py
 
 
14_SimpleStockClasses.ipynb
14_SimpleStockClasses.ipynb
 
 
15_SimpleStockAnalysis_Final.ipynb
15_SimpleStockAnalysis_Final.ipynb
 
 
16_SimpleStockIndicators.ipynb
16_SimpleStockIndicators.ipynb
 
 
17_SimplePivotPoint.ipynb
17_SimplePivotPoint.ipynb
 
 
18_SimpleStockVWAP.ipynb
18_SimpleStockVWAP.ipynb
 
 
19_SimpleStockTrendlines.ipynb
19_SimpleStockTrendlines.ipynb
 
 
20_SimpleStockSignals.ipynb
20_SimpleStockSignals.ipynb
 
 
21_SimpleStockSignalsRSI.ipynb
21_SimpleStockSignalsRSI.ipynb
 
 
22_SimpleStockBacktesting.ipynb
22_SimpleStockBacktesting.ipynb
 
 
23_SimpleTimeseries.ipynb
23_SimpleTimeseries.ipynb
 
 
24_Simple_Kelly_Criterion.ipynb
24_Simple_Kelly_Criterion.ipynb
 
 
25_SimpleStockPredictionMachineLearning.ipynb
25_SimpleStockPredictionMachineLearning.ipynb
 
 
26_SimpleStockPredictionTensorFlow.ipynb
26_SimpleStockPredictionTensorFlow.ipynb
 
 
LICENSE
LICENSE
 
 
Python_01_Dowload__YahooData.py
Python_01_Dowload__YahooData.py
 
 
Python_02_Modify_Date.py
Python_02_Modify_Date.py
 
 
Python_03_save_csv.py
Python_03_save_csv.py
 
 
Python_04_Plot_Charts.py
Python_04_Plot_Charts.py
 
 
Python_05_Plot_Area.py
Python_05_Plot_Area.py
 
 
Python_06_Plot_Scatter_Line.py
Python_06_Plot_Scatter_Line.py
 
 
Python_07_Plot_Histogram.py
Python_07_Plot_Histogram.py
 
 
Python_08_Plot_Boxplot.py
Python_08_Plot_Boxplot.py
 
 
Python_09_Plot_Candlestick.py
Python_09_Plot_Candlestick.py
 
 
Python_10_Plot_Bokeh_Candlestick.py
Python_10_Plot_Bokeh_Candlestick.py
 
 
Python_11_scrape_yahoo_Key_Statistics.py
Python_11_scrape_yahoo_Key_Statistics.py
 
 
Python_12_scrape_finance_news.py
Python_12_scrape_finance_news.py
 
 
README.md
README.md
 
 
Title.PNG
Title.PNG
 
 
candlestick.html
candlestick.html
 
 
stock_chart.png
stock_chart.png
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn

Buy Me A Coffee

Simple Stock Analysis in Python

This is a tutorial on Simple Stock Analysis in Jupyter and Python. There are two versions of the tutorial available: one in Jupyter and the other in Python. Jupyter also provides Jupyter Notebooks, previously known as iPython notebooks. On the other hand, Python is an interpreted high-level programming language known for its simplicity and ease of understanding, especially for beginners interested in learning about stock analysis and becoming quants. This tutorial is designed for individuals who wish to learn Python coding for stock market analysis. However, if you already have knowledge in stock analysis or coding in Python, this tutorial may not be suitable for you. You can explore more advanced coding options here: https://github.com/LastAncientOne/Stock_Analysis_For_Quant.

The order goes from #1 through #26.

You learn the number 1 first, and then you proceed in order. Once you have finished, you will know how to write code in Python and understand finance and the stock market. ㊗️

Prerequistes

Python 3.5+
Jupyter Notebook Python 3

Dependencies

  • fix_yahoo_finance or yfinance
  • TensorFlow 1.10.0
  • Pandas
  • Numpy
  • ta-lib
  • matlibplot
  • sklearn

How to install library

conda install -c ranaroussi yfinance

pip install yfinance --upgrade --no-cache-dir

Input

Pick a symbol, you want to analyze.

symbol = '...' <-- ... input a symbol

Pick a 'start' date and 'end' date for certain time frame to analyze.

start = '...' & end = '...' <-- input a date


Examples

# Libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

import warnings
warnings.filterwarnings("ignore")

# fix_yahoo_finance is used to fetch data 
import fix_yahoo_finance as yf
yf.pdr_override()

# input
symbol = 'AAPL' # Apple Company
start = '2018-01-01'
end = '2019-01-01'

# Read data 
df = yf.download(symbol,start,end)

# View Columns
df.head()

Example Stock Charts:

Example Stock Scripts

In command DOS drive 'C:\ '

Find where you put the code .py in?

How to run python scripts in command prompt(cmd) or Windows PowerShell?

Type: python SimpleStockChartScripts.py

🍎 List of questions for simple stock tutorial in python:


  1. How to get data from yahoo, quandl, or other sites?
  2. How to scrape historical data, fundamental data, and news data?
  3. How to analyze the stock data?
  4. How to make a trendlines?
  5. How to use Technical Analysis and Fundamental Analysis?
  6. How to add and save to csv file?
  7. How to customize table and make beautiful plot?
  8. How to create class and function for stock?
  9. How to create and run scripts?
  10. How to applied statistics and timeseries for stock?
  11. How to create buy and sell signals?
  12. How to create stock prediction in machine learning and deep learning?
  13. How to create simple stock strategy?
  14. Example of python libraries for Technical Analysis and fetching historical stock prices.

❌ If the code does not load or reload, click here: 👉 https://nbviewer.jupyter.org/
Paste the link in the box.

I tried to make it simple as possible to understand finance data and how to analyze the data by using python language.

If you want to learn different simple function for stock analysis, go to: https://github.com/LastAncientOne/100_Day_Challenge

If you want to learn more advance stock analysis or different language in finance, go to: https://github.com/LastAncientOne/Stock_Analysis_For_Quant

If you into deep learning or machine learning for finance, go to: https://github.com/LastAncientOne/Deep-Learning-Machine-Learning-Stock

If you want to learn about Mathematics behind deep learning or machine learning, go to: https://github.com/LastAncientOne/Mathematics_for_Machine_Learning

Reading Material

https://www.investopedia.com/terms/s/stock-analysis.asp (Basic Stock Analysis)

https://www.investopedia.com/articles/investing/093014/stock-quotes-explained.asp (Understand Stock Data)

https://www.investopedia.com/terms/t/trendline.asp (Understand Trendline)

Buy Me A Coffee

Authors

* Tin Hang

Disclaimer

🔻 Do not use this code for investing or trading in the stock market. Stock market is unpredictable. 📈 📉 However, if you are interest in the stock market, you should read many 📚 books that relate to the stock market, investment, or finance. The more books you read, the more you will understand and the more knowledge you gain. On the other hand, if you are into quant or machine learning, read books about 📘 finance engineering, machine trading, algorithmic trading, and quantitative trading.

This is not a get-rich-quick scheme but rather intended for research and educational purposes.

About

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

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.