Coder Social home page Coder Social logo

sbnair / stockscreener Goto Github PK

View Code? Open in Web Editor NEW

This project forked from terzim/stockscreener

0.0 1.0 0.0 11 KB

A handy tool for screening stocks based on certain criteria from several markets around the world. The list can then be delivered to your email address (one-off or regularly via crontab).

License: MIT License

Python 100.00%

stockscreener's Introduction

Google-based Stock Screener

Have you ever wished a good selection of stocks be delivered daily to your inbox? Have you ever wished you could navigate in a few moments through the thousands of names available for investment in the stock markets? So did I.

Therefore, I created this module to support my own investment activity.

What it does:

The module support multi-exchange queries, and a maximum of 8 criteria at a time.

Installation Instructions

Tested with, and assumes you already have at your disposal:

  • Ubuntu 16.04;
  • Anaconda Python 3.5.3
  • Gmail email server.

Install git

sudo apt-get update
sudo apt-get install git

Copy the repository on your computer and rename the sample config file

git clone https://github.com/terzim/StockScreener.git
cd StockScreener
mv config-sample.ini config.ini

Install the python requirements

conda install --yes --file requirements.txt  # If using Anaconda Python distribution

or

pip3 install -r requirements.txt # If using a standard Python3 distributions

Configuration

Open the config.ini file in your favourite text editor. Edit the configuration parameters accordingly.

See the myconfigs folder for a few screening config ideas.

Screener data

Sample config file:

[screener_data]
csv_file = YOUR_CSV_FILE_NAME (e.g. csv_file.csv)
json_file = YOUR_JSON_FILE_NAME (e.g. json_file.json)
currency = YOUR_CURRENCY_OF_CHOICE (e.g. USD)
; Note - if left empty, defaults to standard currency of exchange
exchanges = YOUR, LIST, OF, EXCHANGES, SEPARATED, BY COMMAS (e.g. NYSE, LON, BIT)
sector = YOUR_SECTOR_OF_CHOICE ** TODO **
; Note - to do leave sector empty for now

Email Data

[email_data]
send_email = TRUE/FALSE
; set send_email to True is wish to send the email
sender = YOUR_SENDER_USERNAME (e.g. [email protected])
recipient = YOUR_RECIPIENT_EMAIL (e.g. [email protected])
pwd_sender = YOUR_SENDER_PASSWORD (e.g. catdog123)
server_name = YOUR_SMTP_SERVER_NAME (e.g. smtp.gmail.com)
; Note - gmail server_name is smtp.gmail.com
server_port = YOUR_SMTP_SERVER_PORT (e.g. 587)
; Note - gmail server_post is 587

Screening Criteria

These are also set at the bottom of the configuration file. A full list of the criteria (organized by topic) is to be found in the class documentation. Leave blank the criteria you do not use

[screening_criteria]
CRITERIA1 = (e.g. pe_ratio)
CRITERIA1_MIN = (e.g. 5)
CRITERIA1_MAX = (e.g. 15)
CRITERIA2 = (e.g. price_to_book)
CRITERIA2_MIN = (e.g. 1)
CRITERIA2_MAX = (e.g. 3)
CRITERIA3 =
CRITERIA3_MIN =
CRITERIA3_MAX =
CRITERIA4 =
CRITERIA4_MIN =
CRITERIA4_MAX =
CRITERIA5 =
CRITERIA5_MIN =
CRITERIA5_MAX =
CRITERIA6 =
CRITERIA6_MIN =
CRITERIA6_MAX =
CRITERIA7 =
CRITERIA7_MIN =
CRITERIA7_MAX =
CRITERIA8 =
CRITERIA8_MIN =
CRITERIA8_MAX =

Run the screen

The screen can be run one-off

python StockScreener.py

or - in alternative - scheduled for periodical execution via crontab (and - possibly - a VPS). For instructions to setup crontab on a VPS, read a shorthand guide here.

stockscreener's People

Contributors

terzim avatar

Watchers

James Cloos avatar

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.