{"id":26820365,"url":"https://github.com/philfoster/option_screener","last_synced_at":"2025-04-24T03:44:21.284Z","repository":{"id":80208291,"uuid":"102283450","full_name":"philfoster/option_screener","owner":"philfoster","description":"tools for finding/selecting options using the e*trade developer API","archived":false,"fork":false,"pushed_at":"2023-04-06T18:26:58.000Z","size":365,"stargazers_count":43,"open_issues_count":0,"forks_count":17,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-04-24T03:44:16.790Z","etag":null,"topics":["covered-calls","etrade","exponential-moving-average","investing","macd","max-pain","options-chains","options-selling","options-spreads","options-strategies","options-trading","python","python3","stock-market","stock-trading","technical-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philfoster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-03T17:55:36.000Z","updated_at":"2025-04-12T17:22:36.000Z","dependencies_parsed_at":"2023-10-12T18:43:53.772Z","dependency_job_id":null,"html_url":"https://github.com/philfoster/option_screener","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philfoster%2Foption_screener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philfoster%2Foption_screener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philfoster%2Foption_screener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philfoster%2Foption_screener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philfoster","download_url":"https://codeload.github.com/philfoster/option_screener/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250559521,"owners_count":21450167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["covered-calls","etrade","exponential-moving-average","investing","macd","max-pain","options-chains","options-selling","options-spreads","options-strategies","options-trading","python","python3","stock-market","stock-trading","technical-analysis"],"created_at":"2025-03-30T06:31:33.022Z","updated_at":"2025-04-24T03:44:21.277Z","avatar_url":"https://github.com/philfoster.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# option_screener\n\tThis project is meant to provide tools for finding covered call options \n\tthat meet specific criteria around goals and market tone.\n\n\tThe scripts require an E*Trade API authtoken. When created, the auth token is \n\tcached for a period of two hours. If one of the scripts uses the auth\n\ttoken it is refreshed (a maximum of one refresh per five minutes). If\n\tno valid auth token exists, you'll be given a URL to paste into a \n\tbrowser, where you authenticate and are given a code. Paste the code\n\tat the prompt to cache the auth token.\n\n\tThis project is heavily inspired by Alan Ellman (The Blue Collar Investor)\n\tTo understand the goals laid out here, watch his youtube videos on \n\t'Beginner's Corner for Covered Call Writing' or visit his website at\n\thttps://www.thebluecollarinvestor.com\n\n# Requirements\n\tThis code requires the excellent pyetrade API from Jesse Cooper\n\thttps://github.com/jessecooper/pyetrade\n\n\tAdditionally, this module requires an active E*Trade account and an\n\tAPI key (available from E*Trade customer service)\n\n\tata.py requires stock_chart_tools package from pypi for calculating\n\tthe technicals indicators like macd, obv, slow stochastics and \n\texponential moving averages.\n\thttps://pypi.org/project/stock-chart-tools/0.1.0/\n\thttps://github.com/philfoster/stock_chart_tools\n\n# scripts and tools\n\tbin/get_quote.py  -- Get a real time quote for a symbol\n\t\t$ bin/get_quote.py -h\n\t\tusage: get_quote.py [-h] [-c CONFIG_FILE] -s SYMBOL [-v]\n\n\t\toptional arguments:\n\t\t  -h, --help            show this help message and exit\n\t\t  -c CONFIG_FILE, --config-file CONFIG_FILE\n\t\t\t\t\tetrade configuration file\n\t\t  -s SYMBOL, --symbol SYMBOL\n\t\t\t\t\tSymbol to search\n\t\t  -v, --verbose         Increase verbosity\n\n\t\t$ bin/get_quote.py -v -s AMAT\n\t\tAMAT (APPLIED MATLS INC COM)\n\t\t\tPrice : $119.33 bid=$120.55(100) ask=$120.87(100)\n\t\t\tVolume: 11981 (avg=9520524)\n\n\tbin/ccw_screener.py  -- Search the option chain for a symbol for call options that match the criteria\n\t\t$ bin/ccw_screener.py -h\n\t\tusage: ccw_screener.py [-h] [-c CONFIG_FILE] -s SYMBOL [-e EXPIRATION] [-d]\n\t\t\t\t       [-v] -m MARKET_TONE\n\n\t\toptional arguments:\n\t\t  -h, --help            show this help message and exit\n\t\t  -c CONFIG_FILE, --config-file CONFIG_FILE\n\t\t\t\t\tetrade configuration file\n\t\t  -s SYMBOL, --symbol SYMBOL\n\t\t\t\t\tSymbol to search\n\t\t  -e EXPIRATION, --expiration EXPIRATION\n\t\t\t\t\tExpiration Date \u003cYYYY-MM-DD\u003e\n\t\t  -d, --debug           Enable debugging\n\t\t  -v, --verbose         Increase verbosity\n\t\t  -m MARKET_TONE, --market-tone MARKET_TONE\n\t\t\t\t\tMarket tone configuration\n\n\t\t$ bin/ccw_screener.py -e 2021-04-16 -v -m tone/market-neutral.json -s AMAT\n\t\tAMAT Apr 16 '21 $115 Call: days=24 price=119.33 premium=$7.35(mark=7.53) cost=$11198.00 oi=2876 beta=1.78\n\t\t\tProtection:   3.63%             Delta :   0.6581\n\t\t\tROO       :   2.63% ( 39.94%)   Profit: $ 302.00\n\t\t\tUpside    :   0.00% (  0.00)%   Profit: $   0.00\n\t\t\tTotal     :   2.63% ( 39.94%)   Total : $ 302.00\n\n\t\tAMAT Apr 16 '21 $120 Call: days=24 price=119.33 premium=$4.70(mark=4.83) cost=$11463.00 oi=4810 beta=1.78\n\t\t\tProtection:   0.00%             Delta :   0.5044\n\t\t\tROO       :   3.92% ( 59.57%)   Profit: $ 470.00\n\t\t\tUpside    :   0.56% (  8.54)%   Profit: $  67.00\n\t\t\tTotal     :   4.48% ( 68.10%)   Total : $ 537.00\n\n\tbin/stock_screener.py  -- Loop across symbols in a directory of watch lists, filter the results based\n\t\t\t\t\t\t\t on a number of configurable questions. The question has an expiration time\n\t\t\t\t\t\t\t to prevent asking the same question with the cached answer is still fresh.\n\t\tusage: stock_screener.py [-h] [-c CONFIG_FILE] [-v] [-q] [-o OUTPUT_FILE]\n\t\t\t\t\t\t\t\t [-r REVIEW_SYMBOL] [-s SYMBOL]\n\n\t\t$ bin/stock_screener.py --help\n\t\toptional arguments:\n\t\t  -h, --help            show this help message and exit\n\t\t  -c CONFIG_FILE, --config-file CONFIG_FILE\n\t\t\t\t\t\t\t\tetrade configuration file\n\t\t  -v, --verbose         Increase verbosity\n\t\t  -q, --quote           Include a quote in the summary\n\t\t  -o OUTPUT_FILE, --output OUTPUT_FILE\n\t\t\t\t\t\t\t\tWrite the results to a file\n\t\t  -r REVIEW_SYMBOL, --review REVIEW_SYMBOL\n\t\t\t\t\t\t\t\tReview a symbol's cached data\n\t\t  -s SYMBOL, --symbol SYMBOL\n\t\t\t\t\t\t\t\tPerform fresh screen of a symbol\n\t\tusage: stock_screener.py [-h] [-c CONFIG_FILE] [-v] [-q]\n\n\t\t$ bin/stock_screener.py\n\t\tbin/stock_screener.py\n\n\t\t\t\tSelect a sector (ABT)\n\n\t\t\t\t 1. Automobiles \u0026 Auto Parts\n\t\t\t\t 2. Banking Services\n\t\t\t\t...\n\t\t\t\t17. Paper \u0026 Forest Products\n\t\t\t\t18. Pharmaceuticals\n\t\t\t\t19. Professional \u0026 Commercial Services\n\t\t\t\t20. Semiconductors\n\t\t\t\t21. Software \u0026 IT Services\n\t\t\t\t22. Textiles \u0026 Apparel\n\n\t\t\t\tABT[Company Information] What sector is the stock? (or 'new' for a new sector) 18\n\t\t\t\tABT[Fundamentals] When is the next earnings announcement? (YYYY-MM-DD): 2021-10-20\n\t\t\t\tABT[Fundamentals] Is the average analyst rating better than neutral? [y/N] y\n\t\t\t\tABT[Technicals] Is the stock price up trending? [y/N] y\n\t\t\t\tABT[Technicals] Is the price above the 20 day EMA? [y/N] y\n\t\t\t\tABT[Technicals] Is the 20 day EMA trending up? [y/N] y\n\t\t\t\tABT[Technicals] Is the 20 day EMA above the 100 day EMA? [y/N] y\n\t\t\t\tABT[Technicals] Is the 100 day EMA trending up? [y/N] y\n\t\t\t\tABT[Technicals] Is the MACD trending up? [y/N] y\n\t\t\t\tABT[Technicals] Is the MACD divergence positive? [y/N] y\n\t\t\t\tABT[Technicals] Is the MACD greater than zero? [y/N] y\n\t\t\t\tABT[Technicals] Is the stochastic oscilator positive? [y/N] y\n\t\t\t\tABT[Technicals] Is the stochastic oscilator uptrending? [y/N] y\n\t\t\t\tABT[Technicals] Is the stochastic oscilator greater than 20? [y/N] y\n\t\t\t\tABT[Technicals] Is the On Balance Volume positive?  [y/N] y\n\t\t\t\tABT[Technicals] Is the On Balance Volume trending up?  [y/N] y\n\t\t\t\tABT[Technicals] Is the volume greater than than moving average?  [y/N] y\n\n\t\tValid Symbols\n\t\t-------------\n\t\t\t\tA     (score= 94.74)%\n\t\t\t\tABT   (score=100.00)%\n\t\t\t\t...\n\n\tbin/ata.py  -- Automated Technical Analysis, analyzes price trend data and \n\t\t\t\t   updates the cache for the stock screner\n\t\t\t\t\tRequires: pandas, yfinance\n\n\t\t$ bin/ata.py --help\n\t\tusage: ata.py [-h] [-c CONFIG_FILE] [-v] [-s SYMBOL]\n\n\t\toptional arguments:\n\t\t  -h, --help            show this help message and exit\n\t\t  -c CONFIG_FILE, --config-file CONFIG_FILE\n\t\t\t\t\t\t\t\tscreener configuration file\n\t\t  -v, --verbose         Increase verbosity\n\t\t  -s SYMBOL, --symbol SYMBOL\n\t\t\t\t\t\t\t\tAnalyze a symbol\n\n\tbin/bull_call_spread_screener.py  -- Screen for veritical credit spreads\n\t\t\t\t\t\t\t\tthat aim to generate significant return and have\n\t\t\t\t\t\t\t\tsignificant downside protection.\n\n\t\tusage: bull_call_spread_screener.py [-h] [-c CONFIG_FILE] -s SYMBOL\n\t\t\t\t\t\t\t\t\t\t[-e EXPIRATION] [-d] [-v] [-p PARAMETERS]\n\n\t\toptional arguments:\n\t\t  -h, --help            show this help message and exit\n\t\t  -c CONFIG_FILE, --config-file CONFIG_FILE\n\t\t\t\t\t\t\t\tetrade configuration file\n\t\t  -s SYMBOL, --symbol SYMBOL\n\t\t\t\t\t\t\t\tSymbol to search\n\t\t  -e EXPIRATION, --expiration EXPIRATION\n\t\t\t\t\t\t\t\tExpiration Date \u003cYYYY-MM-DD\u003e\n\t\t  -d, --debug           Enable debugging\n\t\t  -v, --verbose         Increase verbosity\n\t\t  -p PARAMETERS, --paramaters PARAMETERS\n\t\t\t\t\t\t\t\tOption parameters configuration\n\n\tbin/find_roll_outs.py -- Look for options that you can roll out to if you\n\t\t\t\t\t\t\t \tare holding an option that is in the money\n\t\t\t\t\t\t\t\tnear the expiration date.\n\n\n\t\tusage: find_roll_outs.py [-h] [-c CONFIG_FILE] -s SYMBOL -e EXPIRATION -p\n\t\t\t\t\t\t\t\t STRIKE [-v]\n\n\t\toptional arguments:\n\t\t  -h, --help            show this help message and exit\n\t\t  -c CONFIG_FILE, --config-file CONFIG_FILE\n\t\t\t\t\t\t\t\tetrade configuration file\n\t\t  -s SYMBOL, --symbol SYMBOL\n\t\t\t\t\t\t\t\tSymbol of the call\n\t\t  -e EXPIRATION, --expiration EXPIRATION\n\t\t\t\t\t\t\t\tExpiration Date \u003cYYYY-MM-DD\u003e\n\t\t\t\t\t\t\t\tSymbol to search\n\t\t  -p STRIKE, --strike-price STRIKE\n\t\t\t\t\t\t\t\tStrike price\n\t\t  -v, --verbose         Increase verbosity\n\n# Configuration\n\tetrade.json - this is the base configuration file that points to other configs\n\t\tExample:\n\t\t\t{\n\t\t\t\t\"authtoken\": \"~/.etrade-authtoken.json\",\n\t\t\t\t\"credentials\": \"~/.etrade.properties\"\n\t\t\t}\n\n\t.etrade.properties - contains your credentials (get these from etrade)\n\t\tExample:\n\t\t\tCONSUMER_KEY=\u003cyour consumer key\u003e\n\t\t\tCONSUMER_SECRET=\u003cyour consumer secret\u003e\n\t\t\tSANDBOX=0\n\n\t\n\tmarket tone json files\n\t\tThese files contain the parameters for screening the options.\n\t\t\tmin_open_interest - minimum number of options for viability\n\t\t\tmin_annual_roo    - minimum annualized gain return on option\n\t\t\tmax_annual_roo    - maximum annualized gain return on option (filters out super volatile stocks)\n\t\t\tmin_annual_update - minimum annualized gain for upside on an option (\u003e0 forces out of the money calls)\n\t\t\tmin_downside\t  - minumum downside protection of the option (\u003e0 forced in the money calls)\n\t\t\tmin_delta\t  - minumum delta (roughly the probability of expiring in the money)\n\t\t\tmax_delta\t  - maxumum delta (roughly the probability of expiring in the money)\n\t\tExample:\n\t\t\t{\n\t\t\t\t\"min_open_interest\": 50,\n\t\t\t\t\"min_annual_roo\": 0.24,\n\t\t\t\t\"max_annual_roo\": 0.96,\n\t\t\t\t\"min_annual_upside\": 0.0,\n\t\t\t\t\"min_downside\": 0.0,\n\t\t\t\t\"min_delta\" : 0.45,\n\t\t\t\t\"max_delta\" : 0.90\n\t\t\t}\n\n\tbull_call_spread.json\n\t\tThese files contain the parameters for screening the options.\n\t\t\tmin_open_interest - minimum number of options for viability\n\t\t\tmin_annual_roo    - minimum annualized gain return on the option spread\n\t\t\tmin_downside\t  - minumum downside protection of the option spread\n\t\t\tmin_short_delta\t  - minumum short call delta (roughtly equates to probabilty of success)\n\t\t\tmin_long_delta\t  - minimum delta for the long call\n\n\t\t\tThese parameters are set to 5% / month with 7% downside protection and 70% chance of success\n\t\tExample:\n\t\t\t{\n\t\t\t\t\"min_open_interest\": 10,\n\t\t\t\t\"min_annual_roo\": 0.60,\n\t\t\t\t\"min_downside\": 0.07,\n\t\t\t\t\"min_short_delta\" : 0.70,\n\t\t\t\t\"min_long_delta\" : 0.8\n\t\t\t}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilfoster%2Foption_screener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilfoster%2Foption_screener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilfoster%2Foption_screener/lists"}