Skip to main content

No project description provided

Project description

This package includes Stock analysis tools and data extractor by using Yahoo Finance..

Installation

  • pip install stockAnalysis

Yahoo Finance S&P500 Extrator

  • Method and Params: YahooFinance( Symbol , Range/Duration , interval )

  • Symbol is the stock ticker symbol, e.g. ‘AAPL’ for Apple or ‘GOOG’ for Google.

  • range/duration is the desired range of the query, allowed parameters are [1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max].

  • interval is the desired interval of the quote, e.g. every 5 minutes, allowed parameters are [1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3m].

USAGE

'''Create an instance of yahoo finance class and pass the parameters as string '''
yf = YahooFinance('AAPL', '6mo', '1d')

'''Gets all the prices within given time frame'''
get_quotes = yf.CompanyQuotes()

'''Populates the output data as a json file '''
write_data = yf.writeOutput()

'''Reads from the output file. Takes only two parameter Path and Data Series
   Parameter string should be [High, Low, Open , Close] '''
r_data = yf.readOutput('output.json', 'close')

'''SMA and EMA methods takes two parameters first param is Data and second is the time frame. '''
get_sma = yf.sma(r_data, 14)
get_ema = yf.ema(r_data, 14)
'''RSI method takes two parameters first param is Data and second is the time frame. '''
get_rsi = yf.RSI(r_data, 14)
'''MACD method takes three parameters first param is Data, second is the slows  and third one is the fast'''
get_macd = yf.macd(r_data, 25, 14)

CONTACT

The package is created by Sadik Erisen. Please send email to fserisen@gmail.com if you have questions or comments.

LICENCE

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stockAnalysis-1.4.1.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file stockAnalysis-1.4.1.tar.gz.

File metadata

  • Download URL: stockAnalysis-1.4.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/3.6 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for stockAnalysis-1.4.1.tar.gz
Algorithm Hash digest
SHA256 aece7fd5dd2e3b9e0e83d7e4bf7195ecf363244fe61978143c526b9cd6368789
MD5 ce2c8e27b94a2b7abccf99de4c1f84fb
BLAKE2b-256 182438865aa82d6f75e1dfd54d61cae58afc1b6eda2a18eb90e418702ae758c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page